initial_fail_amount_action无法正常工作

问题描述 投票:1回答:1

我正在尝试创建一个定期付款计划,该计划可让我立即获得用户的第一笔付款,为此,我使用了将选项setup_fee设置为14.99,但是由于某些原因,我无法获得此付款工作。实际上,我用于此操作的沙盒用户没有任何资金,因此订阅不应同时获得批准。这些是付款明细:

{
    "name": "Monthly Plan",
    "description": "Monthly plan based subscription",
    "status": "ACTIVE",
    "usage_type": "LICENSED",
    "product_id": "PROD-32M79039A8219464Y",
    "billing_cycles": [
        {
            "frequency": {
                "interval_unit": "MONTH",
                "interval_count": 1
            },
            "tenure_type": "TRIAL",
            "sequence": 1,
            "total_cycles": 1,
            "pricing_scheme": {
                "fixed_price": {
                    "value": "0",
                    "currency_code": "EUR"
                }
            }
        },
        {
            "frequency": {
                "interval_unit": "MONTH",
                "interval_count": 1
            },
            "tenure_type": "REGULAR",
            "sequence": 2,
            "total_cycles": 0,
            "pricing_scheme": {
                "fixed_price": {
                    "value": "14.99",
                    "currency_code": "EUR"
                }
            }
        }
    ],
    "payment_preferences": {
        "auto_bill_outstanding": true,
        "setup_fee": {
            "value": "14.99",
            "currency_code": "EUR"
        },
        "setup_fee_failure_action": "CANCEL",
        "payment_failure_threshold": 0
    },
    "taxes": {
        "percentage": "0",
        "inclusive": false
    },
    "merchant_preferences": {
        "initial_fail_amount_action": "CANCEL",
        "max_fail_attempts": 0
    }
}

我指定了merchant_preferences,必须取消PayPal智能按钮过程中的订阅过程。但这没有任何作用。预期的行为:

  1. 用户使用PayPal智能按钮批准订阅
  2. 用户没有资金,因此PayPal应该以merchant_preference配置停止该过程
  3. 如果找到了用户,则必须创建订阅,并且必须将资金发送到商家帐户才能在我的服务器上激活订阅
paypal paypal-sandbox paypal-rest-sdk paypal-subscriptions
1个回答
1
投票

沙箱用户是哪个国家,帐户上有哪些资金来源?大多数沙盒用户从默认的银行帐户资金来源或信用卡获得无限资金。他们的PayPal余额为零并不重要。

通常,无法仅使用PayPal余额创建PayPal订阅-需要备用资金来源。

© www.soinside.com 2019 - 2024. All rights reserved.