我正在为 PayFast 现场集成而苦苦挣扎。
PayFast 在成功付款后无法重定向。看起来好像我的网址正在更改。
$data = [
// Merchant details
'merchant_id' => 'xxx', //required
'merchant_key' => 'xxx', //required
'return_url' => 'https://www.example.co.za/signup/success_temp.php', // optional
'cancel_url' => 'https://www.example.co.za/signup/cancel.php', // optional
'notify_url'=> 'https://www.example.co.za/signup/notify.php', // optional];
$data_subscription = [
// Payment methods
'payment_method' => 'cc', // *optional - Must include for subscriptions
// Subscriptions
'subscription_type' => '1', // required
'billing_date' => $billing_date, // *optional
'recurring_amount' => $recurring_amount, // *optional
'frequency' => '3', // required
'cycles' => '0' // required];
// Add subscription data to $data
if (1 == 1) {
$data = array_merge($data, $data_subscription);
}
从这里我为他们的在线集成运行标准 PayFast 代码,但 return_url 回来了:https:\/\/www.example.co.za\/signup\/success_temp.php
而cancel_url:https:\/\/www.example.co.za\/signup\/cancel.php
我已经测试了到 google.com 的重定向,我遇到了同样的问题。
有什么想法我哪里出错了吗?