私のomnipay laravel 4とPayfastの統合を完了しようとしています。トランザクションを正常に実行できるようになりましたが、notify_url を機能させるのに問題があります。
$gateway = Omnipay::create('PayFast');
$gateway->setMerchantId = '10000100';
$gateway->setMerchantKey = '46f0cd694581a';
$response = $gateway->purchase([
'merchant_id' => '10000100',
'merchant_key' => '46f0cd694581a',
'return_url' => 'http://signup.areweup.co.za/return',
'cancel_url' => 'http://signup.areweup.co.za/cancel',
'notify_url' => 'http://signup.areweup.co.za/notify',
'name_first' => 'Warren',
'name_last' => 'Hansen',
'm_payment_id' => '8542',
'amount' => '39.00',
'item_name' => 'Are We Up',
'description' => 'Peace of mind at just R39 a month.'
])->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();
}
ITN 応答を受信するための POST ルート設定があります
$gateway = Omnipay::create('PayFast');
$gateway->setMerchantId = '10000100';
$gateway->setMerchantKey = '46f0cd694581a';
$response = $gateway->CompletePurchase([
'merchant_id' => '10000100',
'merchant_key' => '46f0cd694581a',
'return_url' => 'http://signup.areweup.co.za/return',
'cancel_url' => 'http://signup.areweup.co.za/cancel',
'notify_url' => 'http://signup.areweup.co.za/notify',
'name_first' => 'Warren',
'name_last' => 'Hansen',
'm_payment_id' => '8542',
'amount' => '39.00',
'item_name' => 'Are We Up',
'description' => 'Peace of mind at just R39 a month.'
])->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();
}
notify_url の唯一の違いは、CompletePurchase メソッドを呼び出していることです。ここで何か助けていただければ幸いです。ITN Payfast のドキュメントはこちら: payfast itn documentation