PayPal Adaptive-买家名称



在PAY交易后,是否可以在IPN调用中获取买家的名字和姓氏?我尝试了各种方法,从简单的链式PAY调用,到将payType设置为"CREATE",然后通过将"requireShippingAddressSelection"设置为true,使用payKey从"setPaymentOptions"API检索地址。两者都不起作用。我收到的关于买家的唯一信息是他们的电子邮件地址"sender_email"和支付的金额,无论我如何打电话。

我还尝试过"getShippingAddresses"API,但也没有成功。我在文档中找不到任何具体内容。下面是一个示例IPN响应,我去掉了一些无用的部分,比如重定向URL:transaction: '0': .is_primary_receiver: 'true' .id_for_sender_txn: TXN_CODE .receiver: RECEIVER_EMAIL .amount: USD 10.00 .status: Completed .id: TRANS_ID .status_for_sender_txn: Completed .paymentType: SERVICE .pending_reason: NONE '1': .paymentType: SERVICE .id_for_sender_txn: TXN_CODE .is_primary_receiver: 'false' .status_for_sender_txn: Completed .receiver: RECEIVER_EMAIL .amount: USD 10.00 .pending_reason: NONE .id: TRANS_ID .status: Completed log_default_shipping_address_in_transaction: 'false' action_type: CREATE charset: windows-1252 transaction_type: Adaptive Payment PAY notify_version: UNVERSIONED sender_email: SENDER_EMAIL fees_payer: EACHRECEIVER reverse_all_parallel_payments_on_error: 'false' pay_key: 'PAY_KEY' status: COMPLETED test_ipn: '1'

打电话:

pay_request = PaypalAdaptive::Request.new
data = {
"returnUrl" => "", 
"requestEnvelope" => {"errorLanguage" => "en_US"},
"currencyCode"=>"USD",  
"receiverList"=>{"receiver"=>[{"email"=>"", "amount"=>"10.00"},{"email"=>"", "amount"=>"10.00"}]},
"cancelUrl"=>"",
"actionType"=>"PAY",
"ipnNotificationUrl"=>""
}
pay_response = pay_request.pay(data)
//OTHER ATTEMPT: was to grab payKey here and try setting payment options with another request call, but that didn't work either
if pay_response.success?
  redirect_to pay_response.preapproval_paypal_payment_url
else
  puts pay_response.errors.first['message']
  redirect_to failed_payment_url
end

我想也许将这行->log_default_shipping_addr_in_transaction:'false'设置为true会给我一个名字,但无论我尝试什么,我都无法将其从false更改。有人知道发生了什么,是否有可能使用PayPal Adaptive获得买家的名字?我一定错过了一些很简单的事情。。。谢谢

从这样的事务中为发送方返回的唯一信息是sender_email值。

这是我们的IPN指南的链接,其中有一节关于在支付API调用中返回的信息:https://www.paypalobjects.com/webstatic/en_US/developer/docs/pdf/ipnguide.pdf

相关内容

  • 没有找到相关文章

最新更新