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();
}
?>
そして、「要求されたリソースが見つかりませんでした」というエラーが表示されました。どんな助けでも感謝します:)