2016-09-16 99 views
1

我是整合利用格子條紋+ API來ACH支付,但我不能讓從格子stripe_bank_account_token調用捲曲請求獲得帳戶ID後public_token格子條紋+ ACH支付集成

我是用PHP這裏是要求

curl https://tartan.plaid.com/exchange_token \ 
    -d client_id="[Plaid client ID]" \ 
    -d secret="[Plaid secret]" \ 
    -d public_token="[Plaid Link public_token]" \ 
    -d account_id="[Plaid Link account_id]" 

和響應爲{ 「沙箱」:真 「的access_token」: 「test_chase」}

我不能讓

{ 
    "sandbox": true, 
    "access_token": "[Plaid API access token]", 
    "stripe_bank_account_token": "btok_5gr1QIfvhgEKdYSr17rH", 
    "account_id": "[Plaid Account ID]" 
} 

此回覆

回答

0

您需要確保通過的客戶端ID和祕密不是沙盒憑證,而是您的實際客戶端ID和祕密,因爲它們已連接到您的條帶帳戶。

+0

此答案僅用於宣傳產品或服務,不透露作者的關係。 – techydesigner

+0

謝謝@Charley M,是的,我發送郵件支持。 – user3815779

+0

經過多次嘗試並獲得支持人員的幫助後,我無法將其恢復到開發模式。我結束了在PROD模式下的實驗編碼。 -not fun- –

0

我有同樣的問題,我解決它使用this,根據您在前端請求缺少selectAccount的鏈接,以便它應該是這樣的:

<script> 
var linkHandler = Plaid.create({ 
    env: 'sandbox', 
    selectAccount: true, /* this is what i have added */ 
    clientName: 'Stripe/Plaid Test', 
    key: '[Plaid key]', 
    product: ['auth'], 
    selectAccount: true, 
    onSuccess: function(public_token, metadata) { 
    // Send the public_token and account ID to your app server. 
    console.log('public_token: ' + public_token); 
    console.log('account ID: ' + metadata.account_id); 
    }, 
    onExit: function(err, metadata) { 
    // The user exited the Link flow. 
    if (err != null) { 
     // The user encountered a Plaid API error prior to exiting. 
    } 
    }, 
}); 

// Trigger the Link UI 
document.getElementById('linkButton').onclick = function() { 
    linkHandler.open(); 
}; 
</script> 
在他們返回響應

一個account_id這將用於最後一個不適合你的請求。

我希望這會有所幫助。