我一直在使用貝寶REST API,並已成功創建並啓動一個BillingPlan
,但我無法更新說計劃的return_url
。我認爲這與我使用的JSON路徑有關,儘管我不確定爲什麼!?貝寶REST API - 更新結算方案返回URL
無論如何,我打電話的更新計劃方法: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」:「無效的 Path。」}],「message」:「驗證 錯誤。 「 」information_link「:」 https://developer.paypal.com/webapps/developer/docs/api/#BUSINESS_VALIDATION_ERROR」, 「debug_id」: 「2ae68f9f0aa72」}
概括起來 - 我想從http://example.com
改變計費計劃return_url
到http://example.com/payment/return
。
我已經改變了path
各種事情都無濟於事。誰能幫忙?
我並不完全相信你的問題是什麼,你可以更具體一點嗎? – Pseudonym
嘗試在''path「前添加''/」',即''path「:」/ merchant_preferences「'。 – dbc
此外,顯然你不能更新這個計劃是積極的,請參閱https://github.com/paypal/PayPal-Python-SDK/issues/73 – dbc