貝寶REST API文檔說結算協議對象包含信息關於它的結算方案https://developer.paypal.com/docs/api/payments.billing-agreements#agreement(ID,名稱,描述,狀態等)如何獲取特定結算協議的結算計劃的編號?
然而,有一個協議的ID,我不能得到的ID與之相關的計劃。
我用一個example for PayPal Node.js SDK得到一個協議的細節,並得到這個響應(截斷以提高可讀性):
{
"id": "I-UR6MTL02G0UE",
"state": "Active",
"description": "Agreement for Basic (EUR) plan",
"payer": {
...
},
"plan": {
"payment_definitions": [
{
"type": "REGULAR",
"frequency": "Month",
"amount": {
"currency": "EUR",
"value": "7.99"
},
"cycles": "0",
"charge_models": [
{
"type": "TAX",
"amount": {
"currency": "EUR",
"value": "0.00"
}
},
{
"type": "SHIPPING",
"amount": {
"currency": "EUR",
"value": "0.00"
}
}
],
"frequency_interval": "1"
}
],
"merchant_preferences": {
...
}
},
"start_date": "2017-06-19T07:00:00Z",
"shipping_address": {
...
},
"agreement_details": {
...
},
"httpStatusCode": 200
}
正如你可以在部分我已經得到的信息只能看到它的付款定義,但我需要得到它的ID。那麼我怎麼能做到這一點?
我看到了休息的API,它確實返回你的ID。檢查出來https://developer.paypal.com/docs/integration/direct/billing-plans-and-agreements/ –
謝謝。我已經檢查過這個文檔。出於某種原因,只有在創建協議時纔會返回ID。但是,當我試圖在稍後獲得協議的細節時,事實並非如此。 – poohitan