[英]“Cannot create payouts with an OAuth key” exception when creating payout for Stripe custom account
我們擁有我們的Stripe主帳戶和自定義/關聯帳戶,我們最終希望將資金轉入這些帳戶,然后將其支付到其外部銀行帳戶。
我有一些代碼可以在測試模式下正常工作,但是在生產環境中,執行付款步驟時會出現異常。 錯誤詳細信息是:
Stripe.StripeException: Cannot create payouts with an OAuth key.
at Stripe.Infrastructure.Requestor.ExecuteRequest(HttpRequestMessage requestMessage)
at Stripe.Infrastructure.Requestor.PostString(String url, StripeRequestOptions requestOptions)
據我所知,我們沒有為此請求使用OAuth密鑰,因為我在MVC Web應用程序的Startup.cs
中使用私有密鑰設置了StripeAPI:
StripeConfiguration.SetApiKey("sk_live_**************");
以及嘗試支付的實際代碼:
StripePayoutService sps = new StripePayoutService();
StripeRequestOptions connectRequest = new StripeRequestOptions();
connectRequest.StripeConnectAccountId = stripeConnectID; //"acct_*********"
StripePayoutCreateOptions spco = new StripePayoutCreateOptions();
spco.Amount = (int)(amount * 100);
spco.Currency = "GBP";
spco.StatementDescriptor = reference;
StripePayout result = sps.Create(spco, connectRequest);
我已經在初始化請求中指定了條帶請求選項和Api密鑰上的已連接帳戶ID,那么是什么導致請求抱怨OAuth憑據,或者在這種情況下我丟失/做錯了什么?
由於使用了錯誤的Stripe密鑰,因此出現了邊緣情況,因此OAuth密鑰錯誤消息為紅色鯡魚 。 我建議調查類似問題的任何人進行檢查:
您在這里沒有做錯任何事情。 連接帳戶的測試數據中沒有其完全正確的僅可用於支付的金額。 進行測試交易並將金額添加到分條測試帳戶。 它應該工作正常。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.