我一直在使用PayPal Rest API,成功创建并激活了一个“BillingPlan”,但我在更新该计划的“return_url”方面遇到了麻烦。我认为问题出在我使用的JSON路径上,但不确定原因。
无论如何,我正在调用更新计划方法:https://developer.paypal.com/docs/api/#update-a-plan “BillingPlan”的格式如下:
无论如何,我正在调用更新计划方法:https://developer.paypal.com/docs/api/#update-a-plan “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应该看起来非常像:
{
"path": "merchant_preferences",
"value": {
"return_url": "http://example.com/payment/return"
},
"op": "replace"
}
我一直收到以下类似的回复:
{"name":"BUSINESS_VALIDATION_ERROR","details":[{"field":"validation_error","issue":"提供了无效路径。"}],"message":"验证错误。","information_link":"https://developer.paypal.com/webapps/developer/docs/api/#BUSINESS_VALIDATION_ERROR","debug_id":"2ae68f9f0aa72"}
总之,我想将计费计划的return_url
从http://example.com
更改为http://example.com/payment/return
。
我已经尝试将path
更改为各种内容,但都没有成功。有人可以帮忙吗??