我知道這是一個非常具體的問題,但我設法得到了一些很好的幫助。我已經在PayPal的開發人員網站(www.x.com)上發佈了此信息,但尚未有任何答覆。貝寶API錯誤 - 錯誤處理付款
我一直在試圖通過NVP使用BMCreateButton API創建一個PayNow按鈕。我收到了成功的消息和按鈕的代碼,但是每當有人點擊,他們會立即顯示該消息的按鈕:
「錯誤處理支付
您的付款無法處理,請直接與商家與此代碼聯繫。 「
我使用生成按鈕的代碼如下:
$sendData = array(
"METHOD" => "BMCreateButton",
"VERSION" => "65.2",
"USER" => "[username]",
"PWD" => "[password]",
"SIGNATURE" => "[signature]",
"BUTTONCODE" => "ENCRYPTED",
"BUTTONTYPE" => "PAYMENT",
"BUTTONSUBTYPE" => "SERVICES",
"BUTTONCOUNTRY" => "GB",
"BUTTONIMAGE" => "reg",
"L_BUTTONVAR1" => "item_number=$userID",
"L_BUTTONVAR2" => "item_name=$invoiceID",
"L_BUTTONVAR3" => "subtotal=$invoiceTotal",
"L_BUTTONVAR4" => "currency_code=GBP",
"L_BUTTONVAR5" => "no_shipping=1",
"L_BUTTONVAR6" => "no_note=1",
"L_BUTTONVAR7" => "notify_url=[full url to ipn]",
"L_BUTTONVAR8" => "cancel_return=[full url to cancel]",
"L_BUTTONVAR9" => "return=[full url to return]"
);
$curl = curl_init();
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($curl, CURLOPT_URL, 'https://api-3t.sandbox.paypal.com/nvp?'.http_build_query($sendData));
$nvpReturn = curl_exec($curl);
curl_close($curl);
結果我真正想要的是讓我能夠動態創建一個按鈕,每一個我們的用戶發票這可數量不同(即有滯納金,加班費等)。
想知道是否有人使用PayPal NVP API體驗可以發現問題。
謝謝:)