我正在尝试从订单页面将订单 ID 传递给 Paypal,然后返回感谢页面,以便我可以将订单标记为已付款,但我遇到了问题。目前我将这些变量传递给 Paypal,如下所示:
$vars = array(
'cmd' => "_cart",
'upload' => "1",
'business' => "paypalemail@gmail.com",
'item_name_1' => "Test Item",
'amount_1' => "1.00",
'return' => "http://www.website.com/thanks.php",
'custom' => $order_id,
);
header('Location: https://www.paypal.com/cgi-bin/webscr?' . http_build_query($vars));
但是,当他们付款清除并且我被重定向时,订单ID 似乎没有被发回。这是我给的网址:
thanks.php?tx=61G92224EW780500P&st=Completed&amt=1.00&cc=USD&cm=57&item_number=
我希望在此字符串中的某处看到“custom=”,后跟订单号。但它不存在。我做错什么了吗?