繁体   English   中英

paypal多卖家中的无限循环

[英]Infinity loop in paypal multi seller

我目前正在使用贝宝 api v2 编写贝宝多卖家结账。 在结帐时,我总是在单击继续后陷入循环。 它只是说处理并保持这样。 我也尝试创建另一个 Paypal 应用程序,但同样的问题。我该如何解决这个问题? 我使用以下代码生成订单:

const axios = require('axios')

axios
  .post('https://api-m.sandbox.paypal.com/v2/checkout/orders', {
        "intent":"CAPTURE",
        "application_context":{
        "return_url":"C:\Users\Felix\Desktop\index.html",
        "cancel_url":"C:\Users\Felix\Desktop\index.html"
    },
        "purchase_units":[
          {
             "reference_id":"test1",
             "payee": {
                    "email_address": "sb-lgj1x6610750@business.example.com"
             },
             "amount":{
                "currency_code":"EUR",
                "value":"100.00"
             },
             "payment_instruction":{
                "disbursement_mode":"INSTANT",
                "platform_fees":[
                   {
                      "amount":{
                         "currency_code":"EUR",
                         "value":"2.00"
                      }
                   }
                ]
             }
          },
          {
             "reference_id":"test2",
             "payee": {
                    "email_address": "sb-bong06236339@business.example.com"
             },
             "amount":{
                "currency_code":"EUR",
                "value":"7.00"
             },
             "payment_instruction":{
                "disbursement_mode":"INSTANT",
                "platform_fees":[
                   {
                      "amount":{
                         "currency_code":"EUR",
                         "value":"2.00"
                      }
                   }
                ]
             }
          }
        ]
  },{
      headers:{
            'Content-Type': "application/json",
            'Authorization': "Bearer A21AAJwo7sZjHVhLX3jHjR3HQzE-ojoUzbJUe--WXulQqOzEoV8sF0wNgCUqhOO3N3mDQl5pjnogxOBFmwywr3iXPpj9_VmGA",
            'PayPal-Partner-Attribution-Id': 'FLAVORsb-7vgls6637891_MP'
      }
  })
  .then(res => {
    console.log(`statusCode: ${res.statusCode}`)
    console.log(res.data)
  })
  .catch(error => {
    console.error(error)
  })

return_url 必须是有效的 HTTP/S

接收(卖家)帐户的电子邮件必须在沙盒环境中确认, https://www.sandbox.paypal.com/businessprofile/settings/email -- 如果他们没有交易货币的余额(这里是欧元)例如),他们必须在其帐户的界面中接受付款才能打开此类余额,或者启用付款接收首选项以自动将收到的付款转换为其帐户的主要余额(通常为美元,具体取决于国家/地区)

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM