在Omnipay / Pin Payments中找不到请求的资源

时间:2013-12-15 09:31:20

标签: payment omnipay

我正在努力让Omnipay与Pin Payments合作。

这是我到目前为止所做的:     

require 'vendor/autoload.php';
use Omnipay\Common\GatewayFactory;

$gateway = GatewayFactory::create('Pin');
$gateway->setSecretKey('KEY');
$gateway->setTestMode(true);
$response=$gateway->purchase(array(
  'amount'      => 1.00,
  'description' => 'test charge',
  'email'       => 'danielbk08@gmail.com',
  'currency'    => 'USD',
  'ip_address'  => '1.53.227.0',
   'card'        => array(
    'number'           => '4111111111111111',
    'expiry_month'     => '06',
    'expiry_year'      => '2016',
    'cvc'              => '333',
    'name'             => 'le minh luan',
    'address_line1'    => '184A Nguyen Thanh Vinh St Dist 12',
    'address_city'     => 'Ho Chi Minh City',
    'address_postcode' => '70000',
    'address_state'    => 'Ho Chi Minh City',
    'address_country'  => 'Vietnam'
  )
))->send();

if ($response->isSuccessful()) {
    // payment was successful: update database
    print_r($response);
} elseif ($response->isRedirect()) {
    // redirect to offsite payment gateway
    $response->redirect();
} else {
    // payment failed: display message to customer
    echo $response->getMessage();
}
?>

我收到错误“无法找到所请求的资源。” 任何帮助表示赞赏:)

0 个答案:

没有答案