![](/img/trans.png)
[英]Stripe.NET add bank account using token to Stripe Managed Account
[英]Adding Bank Account in Stripe.NET for Managed Account
我已經在Stripe網站和JaymeDavis的GitHub上搜索了文檔,但仍然無法確定我是否為托管的Stripe帳戶正確創建了銀行帳戶。 從Stripe的網站上,很明顯這就是我所需要的...
curl https://api.stripe.com/v1/accounts/acct_1032D82eZvKYlo2C/external_accounts \
-u sk_test_xxxxxxxxxxxxxxxxxxxxxx: \
-d external_account=btok_xxxxxxxxxxxxxxxxxxx
我有從Stipe.js返回的令牌(btok ....),並且我有curl鏈接中所管理帳戶的帳戶ID以及密鑰。 但是,我無法弄清楚在C#中執行此過程的過程
到目前為止,我的猜測是:
//Sample code for creating a managed account
StripeAccountService stripeAccountService = new StripeAccountService();
StripeAccountCreateOptions managedAccountCreateOption = new StripeAccountCreateOptions();
managedAccountCreateOption.Managed = true;
managedAccountCreateOption.Country = "US";
StripeRequestOptions connectAccountRequest = new StripeRequestOptions();
connectAccountRequest.ApiKey = ConfigurationManager.AppSettings["StripeApiKey"];
Stripe.StripeAccount response = stripeAccountService.Create(managedAccountCreateOption, connectAccountRequest);
// ADD Bank Account
var myAccount = new StripeAccountUpdateOptions();
myAccount.ExternalBankAccount.TokenId = "SampleToken";
var accountService = new StripeAccountService();
Stripe.StripeAccount bankAccount = accountService.Update(response.Id, myAccount);
我在這里遇到的問題是添加銀行帳戶。 我想單獨創建銀行帳戶,以便可以在數據庫中保存用於付款的銀行卡/銀行帳戶的后4位數字(非敏感數據)。 上面的方法只是向受管理用戶添加了一個銀行帳戶,而無法正常工作,因為我想為付款添加多個銀行帳戶。 將銀行帳戶添加到現有托管帳戶中的任何示例代碼都將極大地幫助您(例如,使用Stripe.js返回的令牌創建一個銀行帳戶,然后在一個單獨的操作中將此銀行帳戶添加到托管用戶帳戶中,這樣我就可以抓取此銀行帳戶的后4位數字,以及以后以此方式添加的任何其他帳戶)。 預先感謝您的幫助和時間!
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.