PayPal Rest API-更新计费计划返回URL [英] PayPal Rest API - Update Billing Plan Return URL

查看:219
本文介绍了PayPal Rest API-更新计费计划返回URL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在使用PayPal Rest API,已经成功创建并激活了BillingPlan,但是在更新上述计划的return_url时遇到了问题.我认为这与我使用的JSON路径有关,尽管我不确定为什么!!

I have been using the PayPal Rest API and have successfully created and activated a BillingPlan but I'm having trouble updating said plan's return_url. I think it's something to do with the JSON path I'm using although I'm not sure why!?

无论如何,我正在调用更新计划方法: https://developer .paypal.com/docs/api/#update-a-plan

Anyway, I am calling the update plan method: https://developer.paypal.com/docs/api/#update-a-plan

A BillingPlan遵循以下格式:

{
  "id": "P-94458432VR012762KRWBZEUA",
  "state": "ACTIVE",
  "name": "T-Shirt of the Month Club Plan",
  "description": "Template creation.",
  "type": "FIXED",
  ...
  "merchant_preferences": {
    "setup_fee": {
      "currency": "USD",
      "value": "1"
    },
    "max_fail_attempts": "0",
    "return_url": "http://example.com",
    "cancel_url": "http://example.com",
    "auto_bill_amount": "YES",
    "initial_fail_amount_action": "CONTINUE"
  },
  ...
}

我正在使用C#SDK,但我的请求JSON应该非常像:

I'm using the C# SDK but my request JSON should look very much like:

{
    "path": "merchant_preferences",
    "value": {
        "return_url": "http://example.com/payment/return"
    },
    "op": "replace"
}

我不断收到以下答复:

{名称":"BUSINESS_VALIDATION_ERROR",详细信息":[{字段":"validation_error",问题":无效 提供的路径.}],"消息:"验证 错误.," information_link:" https://developer.paypal.com /webapps/developer/docs/api/#BUSINESS_VALIDATION_ERROR ," debug_id:" 2ae68f9f0aa72}

{"name":"BUSINESS_VALIDATION_ERROR","details":[{"field":"validation_error","issue":"Invalid Path provided."}],"message":"Validation Error.","information_link":"https://developer.paypal.com/webapps/developer/docs/api/#BUSINESS_VALIDATION_ERROR","debug_id":"2ae68f9f0aa72"}

总结-我想将计费计划return_urlhttp://example.com更改为http://example.com/payment/return.

To sum up - I want to change the billing plan return_url from http://example.com to http://example.com/payment/return.

我已将path更改为各种方法,但无济于事.谁能帮忙?

I've changed the path to various things to no avail. Can anyone help??

推荐答案

将计划设置为活动后,您将无法更新该计划.限制的原因是因为可能基于该计划达成协议,因此对其进行修改会影响已经达成协议的结算协议.

You cannot update the plan, once it is set to active. The reason for that restriction is that because there could be possible agreements based on that plan, modifying it would affect the already agreed billing agreements.

但是,我同意您的问题说明,更改返回URL不应成为问题,因为这不是协议的一部分,而是更多的配置更改.即使启用后,也可以通过某种方式允许在Plan中更新类似的设置,这将是很好的.我会让API小组知道这一点.

However, I agree with your problem statement, that changing the Return URL should not be an issue as this is not a part of agreement, but more of a configuration change. It would be nice to somehow allow updating similar settings in Plan, even after active. I will let the API team know about that.

但是,与此同时,您将无法做到这一点.或者,您可以创建一个新计划,然后使用它.不是您要寻找的答案,而是可能的解决方案.

however, in the mean time, there is no way you would be able to do that. Alternatively, you could possibly create a new plan, and use that instead. Not the answer you are looking for, but a probable solution.

这篇关于PayPal Rest API-更新计费计划返回URL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆