PayPal订阅付款似乎无人认领

问题描述

我想创建一个订阅,并在批准后立即向客户收费。我正在使用PayPal Rest API创建subscription。理所当然的是,贝宝​​需要进行交易的用户身份验证,因此我将用户重定向到批准URL,在我的情况下,可以通过

进行检索
// axios response
subscription.data.links.find(v => v.rel == 'approve').href 

现在,在批准后,我在返回URL上获取我的订阅详细信息及其交易,激活了订阅,但付款已取消,并且在沙盒帐户的仪表板中,我可以看到付款正在等待并且订阅处于活动状态>

重定向return_url后的订阅详细信息

{
  status: 'ACTIVE',status_update_time: '2020-10-05T09:46:38Z',id: 'I-CFNDNP7NB53C',plan_id: 'P-8VN9595625142693PL55KTVA',start_time: '2020-10-04T23:00:00Z',quantity: '1',shipping_amount: { currency_code: 'USD',value: '0.0' },...
}

重定向return_url后的付款明细

{
  transactions: [
    {
      status: 'UNCLaimED',id: '884510049W6870025',amount_with_breakdown: [Object],payer_name: [Object],payer_email: 'sb-jalbi3379717@personal.example.com',time: '2020-10-05T09:42:40.000Z'
    }
  ],...
}

仪表板的屏幕截图

enter image description here

enter image description here

订阅配置

var subscriptioConfig = {
    plan_id: variant.paypalId,subscriber: {
        name: {
            given_name: name.slice(0,name.length - 1).join(" "),surname: name.reverse()[0],},email_address: billingDetail.email,application_context: {
        brand_name: "IODINE",shipping_preference: "NO_SHIPPING",user_action: "SUBSCRIBE_Now",payment_method: {
            payer_selected: "PAYPAL",payee_preferred: "IMMEDIATE_PAYMENT_required",standard_entry_class_code: "WEB",cancel_url: `${process.env.BACKEND}/api/plan/paypal-subscribe/fail?${qp}`,return_url: `${process.env.BACKEND}/api/plan/paypal-subscribe/approve?${qp}`,plan: {
        billing_cycles: [],payment_preferences: {
            auto_bill_outstanding: true,payment_failure_threshold: 3,};

解决方法

由于接收方帐户中没有该货币的余额,所以付款正在等待处理,并且默认情况下,PayPal帐户已设置为必须手动接受,拒绝或将新的货币付款转换为您的主要货币余额。

一旦您接受付款并以该币种开立余额,以后就不会再使用该币种付款了。