Paypal 如何从自适应支付API调用中获取发货地址?

Paypal 如何从自适应支付API调用中获取发货地址?,paypal,paypal-ipn,paypal-adaptive-payments,Paypal,Paypal Ipn,Paypal Adaptive Payments,您应该如何使用PayPal的自适应API系统从并行支付中获取配送信息?通常,当请求IPN脚本时,它将被传回为支付国等。然而,情况似乎并非如此 以下是调用IPN脚本时传入的参数: transaction[0].amount transaction[0].id verify_sign transaction[1].receiver reverse_all_parallel_payments_on_error transaction[1].pending_reason transactio

您应该如何使用PayPal的自适应API系统从并行支付中获取配送信息?通常,当请求IPN脚本时,它将被传回为支付国等。然而,情况似乎并非如此

以下是调用IPN脚本时传入的参数:

transaction[0].amount 
transaction[0].id 
verify_sign 
transaction[1].receiver 
reverse_all_parallel_payments_on_error 
transaction[1].pending_reason 
transaction[0].pending_reason 
transaction[1].id_for_sender_txn 
transaction[0].invoiceId 
payment_request_date 
test_ipn 
cancel_url 
charset 
return_url 
transaction[0].status_for_sender_txn 
ipn_notification_url 
transaction[1].is_primary_receiver 
transaction[1].status 
transaction_type 
transaction[1].amount 
transaction[0].status 
log_default_shipping_address_in_transaction 
transaction[0].receiver 
status 
transaction[0].id_for_sender_txn 
action_type 
fees_payer 
pay_key 
transaction[1].status_for_sender_txn 
transaction[0].paymentType 
transaction[1].invoiceId 
transaction[1].id 
sender_email 
notify_version 
transaction[1].paymentType 
transaction[0].is_primary_receiver 
然后,如果我调用
PaymentDetails
API,我会得到如下信息:

$VAR1 = {
  'currencyCode' => 'USD',
  'responseEnvelope' => {
                          'correlationId' => '9944330ab9a8c',
                          'timestamp' => '2014-04-07T06:08:16.094-07:00',
                          'ack' => 'Success',
                          'build' => '10273932'
                        },
  'status' => 'COMPLETED',
  'senderEmail' => 'andy.aaaa@ultranerds.co.uk',
  'cancelUrl' => 'http://somesite.net/paypal/cancel.html',
  'paymentInfoList' => {
                         'paymentInfo' => [
                                            {
                                              'pendingRefund' => 'false',
                                              'receiver' => {
                                                              'accountId' => 'NY3AD33DD739C',
                                                              'email' => 'andy-xxx@ultranerds.com',
                                                              'amount' => '65.00',
                                                              'invoiceId' => '1022',
                                                              'primary' => 'false',
                                                              'paymentType' => 'GOODS'
                                                            },
                                              'transactionId' => '8E1114341X895213Y',
                                              'senderTransactionStatus' => 'COMPLETED',
                                              'senderTransactionId' => '5EV71352C33256006',
                                              'transactionStatus' => 'COMPLETED',
                                              'refundedAmount' => '0.00'
                                            },
                                            {
                                              'pendingRefund' => 'false',
                                              'receiver' => {
                                                              'accountId' => 'YYP5C69YWCMKE',
                                                              'email' => 'andy.yyy@gmail.com',
                                                              'amount' => '15.00',
                                                              'invoiceId' => '1023',
                                                              'primary' => 'false',
                                                              'paymentType' => 'GOODS'
                                                            },
                                              'transactionId' => '68H86656UP574062X',
                                              'senderTransactionStatus' => 'COMPLETED',
                                              'senderTransactionId' => '2XW88939LK1112523',
                                              'transactionStatus' => 'COMPLETED',
                                              'refundedAmount' => '0.00'
                                            }
                                          ]
                       },
  'feesPayer' => 'EACHRECEIVER',
  'actionType' => 'CREATE',
  'ipnNotificationUrl' => 'http://somesite.net/paypal/test_ipn.cgi',
  'sender' => {
                'useCredentials' => 'false',
                'accountId' => 'B74RBM5F6SLZG',
                'email' => 'andy.aaa@ultranerds.co.uk'
              },
  'returnUrl' => 'http://somesite.net/paypal/success.html',
  'payKey' => 'AP-4EK17906VB6613533',
  'reverseAllParallelPaymentsOnError' => 'false'
};
正如您所看到的,根本没有提及送货地址。你要怎么把信息弄回来

更新:嗯,好吧,看来我需要的是GetShippingAddresses——但由于某种原因,当我调用它时,它返回时没有任何内容:

{“requestEnvelope”:{“errorLanguage”:“en_US”,“detailLevel”:“ReturnAll”},“key”:“AP-1B13774463N9785350”}/GetShippingAddresses_API_操作/

…只返回:

{
    'responseEnvelope' => {
                      'correlationId' => '3a4443aed09c9',
                      'timestamp' => '2014-04-07T06:40:35.460-07:00',
                      'ack' => 'Success',
                      'build' => '10273932'
                    }
}
我有点搞不懂它为什么这么做。有什么建议吗

我在这里找到了一句话:

不幸的是,尽管这遵循了 贝宝的文件,它不工作。当前在中有一个bug PayPal的自适应支付实施。对于传统的支付方式, 未收集发货地址;对于嵌入式支付 GetShippingAddresses调用不返回装运地址

PayPal已经确认了该漏洞,并表示预计会有 这一点在2011年4月确定。如果您现在需要送货地址, 建议在您的网站上收集它们,而不是依赖它们 在贝宝API上

那是从2011年开始的。。。但情况仍然如此吗


抱歉打扰了,有人有什么建议吗

好吧,我得到了我的答案——但不幸的是,这不是我所希望的:

是的,不幸的是,此功能仅适用于嵌入式支付 流动。

如果您使用的是嵌入式支付流,那么您可以检索 通过传入他们的PayPal帐户上的地址 senderOptions.requireShippingAddressSelection=true SetPaymentOption API调用。然后,您可以通过 GetShippingAddresses API调用


所以看起来我真正需要做的是,在发送给paypal之前,让用户提供他们的发货信息,然后将其存储起来。不太理想-但我想你只需要利用你所拥有的

这是我现在使用的paypal api:(╯°□°)╯︵ ┻━┻