簡體   English   中英

PayPal:錯誤 - 返回商家

[英]PayPal: error - return to merchant

以下代碼基於Drupal 7中Webform PayPal Integration的示例

$paypal = array();
$paypal['cmd'] = '_xclick';
$paypal['business'] = variable_get('event_reg_paypal_address');
$paypal['receiver_email'] = $paypal['business'];
$paypal['page_style'] = 'huang_checkout';
$paypal['amount'] = variable_get('event_reg_paypal_cost');
$paypal['currency_code'] = 'GBP';
$paypal['item_name'] = 'Test Event Registration';
$paypal['tax'] = 0;
$paypal['custom'] = $submission->sid;
$paypal['return'] = $base_url.'/test/thanks';
$paypal['notify_url'] = $base_url.'/test/thanks';
$paypal['cancel_return'] = $base_url;
$paypal['first_name'] = //first name from submission
$paypal['country'] = 'UK';

$query = http_build_query($paypal, '', '&');
$url = $paypal_host . $query;

drupal_goto($url);

它是自定義模塊代碼的一部分,並實現了hook_webform_submission_insert() 提交表單時, $url變量是從$paypal數組構建的,然后用戶的瀏覽器重定向到,例如,

https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_xclick&business=pete27_11_94-facilitator%40hotmail.com&receiver_email=pete27_11_94-facilitator%40hotmail.com&page_style=huang_checkout&amount=0.01&currency_code=GBP&item_name=Test+Event+Registration&tax=0&custom=24&return=http%3A%2F%2Fwww.pitmart.com%2Fformulak%2Ftest%2Fthanks&notify_url=http%3A%2F%2Fwww.pitmart.com%2Fformulak%2Ftest%2Fthanks&cancel_return=http%3A%2F%2Fwww.pitmart.com%2Fformulak&first_name=sdfgsdfg&country=UK

在我的paypal開發者帳戶中,有一個用戶的電子郵件地址在url中,類型為business-pro,但每次我提交時都會收到錯誤消息

We cannot process this transaction because there is a problem with the PayPal email address supplied by the seller. Please contact the seller to resolve the problem. If this payment is for an eBay listing, you can contact the seller via the "Ask Seller a Question" link on the listing page. When you have the correct email address, payment can be made at www.paypal.com.

我正在測試一個實時服務器,而不是無法訪問本地服務器。

我本來希望被帶到paypal登錄表單,但只是得到錯誤。

是否有可能以這種方式將數據傳遞給paypal? (直接在網址中而不是由表單“發布”)

我錯過了一些會導致這種失敗的變量/數據嗎? 是否有文檔列出了這種paypal請求的最小配置?

編輯 - 缺少currency_code 因為添加了仍然收到錯誤。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM