【问题标题】:Not able to create payment plan agreement无法创建付款计划协议
【发布时间】:2019-08-29 17:38:04
【问题描述】:

无法创建 PayPal 付款协议。得到错误响应。

{"name":"MALFORMED_REQUEST","message":"Incoming JSON request does not map to API request","information_link":"https://developer.paypal.com/webapps/developer/docs/api/#MALFORMED_REQUEST","debug_id":"2c640b4ae1908"}

发送 JSON 请求:

{"name":"Base Agreement","description":"Basic Agreement","start_date":"2019-04-09T00:00:00Z","plan":{"id":"P-0XM25908D436124367U2FLSI"},"payer":{"payment_method":"credit_card","funding_instruments":[{"payment_card":{"type":"amex","number":"372336613695525","expire_month":"9","expire_year":"2028","cvv2":"5681","first_name":"Buyer","last_name":" ","billing_country":"US","billing_address":"8484848484"}}]},"shipping_address":{"line1":"38 Street, aa","city":"New York","state":"New York","postal_code":"10011","country_code":"US"}}

【问题讨论】:

  • 看起来您没有包含所有必需的数据。查看the plan object所需的行
  • 您发送的链接用于创建计划。但我的计划已成功创建并获得计划 ID。在获得计划 ID 后尝试创建付款协议。
  • 很难判断它是否是虚拟数据,但无论如何:请在粘贴之前混淆信用卡数据(至少是 PAN)

标签: php codeigniter paypal paypal-sandbox paypal-subscriptions


【解决方案1】:

您已将 payment_method 设置为 credit_card。根据payments.billing-agreements 的文档,这不适用于计费协议。

如果您想与直接信用卡建立协议,我认为您此时需要使用Braintree。他们不久前取消了 REST 信用卡。

【讨论】:

    猜你喜欢
    • 2016-06-29
    • 1970-01-01
    • 2018-07-09
    • 2019-04-12
    • 2017-07-13
    • 2016-09-03
    • 2019-04-27
    • 1970-01-01
    • 2017-10-23
    相关资源
    最近更新 更多