2
我使用Paypal REST API(java)執行定期訂閱。貝寶REST API - 協議是否被取消?
流程是這樣的,它是工作:
- 我創造了我激活的計劃(OK)
- 我創建了一個協議(OK) 計劃(OK)
- 我用審批環節(OK)重定向用戶到貝寶
- 貝寶重定向用戶返回到我的網站(OK)
- 我可以執行協議(OK)
我發現作爲買家,我可以登錄paypal並隨時手動取消協議。
問題:
作爲賣家,我可以看到,買家購買後X取消了他在「個人資料>定期付款儀表盤」的協議,但我怎麼可以查詢的代碼這一信息?假設我有協議ID。協議對象內沒有這樣的信息。
請指點我正確的方向。 謝謝
UPDATE:
我的協議對象是這樣的:
{
"id": "I-HLK83FVHB5X2",
"description": "item name goes here",
"start_date": "2014-12-04T05:00:00Z",
"plan": {
"payment_definitions": [
{
"type": "TRIAL",
"frequency_interval": "3",
"frequency": "Month",
"cycles": "1",
"amount": {
"currency": "CAD",
"value": "900.00"
},
"charge_models": [
{
"type": "TAX",
"amount": {
"currency": "CAD",
"value": "11.11"
}
},
{
"type": "SHIPPING",
"amount": {
"currency": "CAD",
"value": "0.00"
}
}
]
},
{
"type": "REGULAR",
"frequency_interval": "1",
"frequency": "Month",
"cycles": "0",
"amount": {
"currency": "CAD",
"value": "300.00"
},
"charge_models": [
{
"type": "TAX",
"amount": {
"currency": "CAD",
"value": "22.22"
}
},
{
"type": "SHIPPING",
"amount": {
"currency": "CAD",
"value": "0.00"
}
}
]
}
],
"merchant_preferences": {
"setup_fee": {
"currency": "CAD",
"value": "0.00"
},
"max_fail_attempts": "0",
"auto_bill_amount": "YES"
}
},
"links": [
{
"href": "https://api.sandbox.paypal.com/v1/payments/billing-agreements/I-HLK83FVHB5X2/suspend",
"rel": "suspend",
"method": "POST"
},
{
"href": "https://api.sandbox.paypal.com/v1/payments/billing-agreements/I-HLK83FVHB5X2/re-activate",
"rel": "re_activate",
"method": "POST"
},
{
"href": "https://api.sandbox.paypal.com/v1/payments/billing-agreements/I-HLK83FVHB5X2/cancel",
"rel": "cancel",
"method": "POST"
},
{
"href": "https://api.sandbox.paypal.com/v1/payments/billing-agreements/I-HLK83FVHB5X2/bill-balance",
"rel": "self",
"method": "POST"
},
{
"href": "https://api.sandbox.paypal.com/v1/payments/billing-agreements/I-HLK83FVHB5X2/set-balance",
"rel": "self",
"method": "POST"
}
]
}
我沒有任何的這些「狀況」,「agreement_details」,「cycle_remaining」請看我更新的問題。 – 2014-12-04 17:03:59
這個答案正在考慮貝寶NVP/SOAP API,而問題是關於貝寶REST API。 – fiatjaf 2017-04-10 14:13:38