我已经通过激活创业板将Paypal与我的rails应用程序集成在一起,目前我正在获得令牌和payer_id,但我需要receipt_id作为响应,这是空的。
我遵循了这个链接中给出的步骤。
贝宝的回应如下:
"timestamp"=>"2016-04-12T19:23:46Z", "ack"=>"Success",
"correlation_id"=>"000a000f000r", "version"=>"124", "build"=>"000000",
"token"=>"AB-000000000000000", "transaction_id"=>"kjKJKHkj09809FED2",
"parent_transaction_id"=>NULL, "receipt_id"=>NULL,
"transaction_type"=>"express-checkout", "payment_type"=>"instant",
"payment_date"=>"2016-04-12T19:23:46Z", "gross_amount"=>"160.00",
"gross_amount_currency_id"=>"USD", "fee_amount"=>"6.54",
"fee_amount_currency_id"=>"USD", "tax_amount"=>"0.00",
"tax_amount_currency_id"=>"USD", "exchange_rate"=>NULL,
"payment_status"=>"Completed", "pending_reason"=>"none",
"reason_code"=>"none", "protection_eligibility"=>"Eligible",
"protection_eligibility_type"=>"ItemNotReceivedEligible,UnauthorizedPaymentEligible",
"secure_merchant_account_id"=>"JHBJKJKJBKJBKJH",
"success_page_redirect_requested"=>"false",
"coupled_payment_info"=>NULL, "Token"=>"AB-000000000000000",
"PaymentInfo"=>"{"TransactionID"=>"kjKJKHkj09809FED2",
"ParentTransactionID"=>nil, "ReceiptID"=>nil,
"TransactionType"=>"express-checkout", "PaymentType"=>"instant",
"PaymentDate"=>"2016-04-12T19:23:46Z", "GrossAmount"=>"160.00",
"FeeAmount"=>"6.54", "TaxAmount"=>"0.00", "ExchangeRate"=>nil,
"PaymentStatus"=>"Completed", "PendingReason"=>"none",
"ReasonCode"=>"none", "ProtectionEligibility"=>"Eligible",
"ProtectionEligibilityType"=>"ItemNotReceivedEligible,UnauthorizedPaymentEligible",
"SellerDetails"=>{"SecureMerchantAccountID"=>"JHBJKJKJBKJBKJH"}}",
"SuccessPageRedirectRequested"=>"false", "CoupledPaymentInfo"=>NULL贝宝帐户中是否有任何获得receipt_id的配置,或者我必须添加/更改的任何请求参数?
请建议一下。
提前谢谢。
发布于 2016-05-14 02:59:45
我已经与paypal开发人员支持讨论过这一点,而且交易销售ID似乎是记录并返回给用户的适当ID,它也是信用卡交易的paypal帐户中记录的内容,所以如果用户有支持问题,这是向帐户提供查询交易详细信息的最简单的数字。
我并不100%确定如何访问所谓的receipt_id,但我不认为它是打算在对支付端点的响应中填充。如果要获得一个receipt_id,它很可能来自于访问端点GET /v1/payments/sale/<Transaction-Id>。
根据api,receipt_id被定义为
收据id为16位数字,付款识别号,返回给客人用户识别付款。
我认为“来宾用户”可能有一个特定的含义,这与任何事务无关,但我对此并不乐观。
在从端点端点获得事务ID之后,我建议您使用这个付款。位于payment.transactions.related_resources.sale.id的支付端点返回的json中的id似乎是记录简单信用卡事务的适当ID,我希望在那里向客户端返回一个引用号,并存储以便在稍后的日期查找事务。
我还能够使用该ID查询上面提到的销售端点以获得更多信息,但我从未能够让receipt_id填充沙箱操作。
希望这能有所帮助,我发现REST缺少一些文档。
"transactions": [
{
"amount": {
"total": "7.47",
"currency": "USD",
"details": {
"tax": "0.03",
"shipping": "0.03"
}
},
"description": "This is the payment transaction description.",
"related_resources": [
{
"sale": {
"id": "4RR959492F879224U",
"create_time": "2013-01-31T04:12:02Z",
"update_time": "2013-01-31T04:12:04Z",https://stackoverflow.com/questions/36568628
复制相似问题