我在 laravel 应用程序中使用 stripe php sdk,卖家用户在银行详细信息中添加虚拟银行帐号和路由号码。现在卖家使用下面的条带转账 API 将他的条带余额支付到他们的银行账户中
function payout()
{
Stripe::setApiKey($this->secret_key);
$balance = Balance::retrieve();
$balance = $balance->available[0]->amount;
if ($balance == 0) {
return true;
}
$transfer = Transfer::create([
"amount" => $balance ,
"currency" => 'gbp',
"destination" => 'default_for_currency',
"description" => config('app.name') . ' payout.'
]);
if ($transfer->failure_code !== null) {
throw new Exception($transfer->failure_message);
}
$transaction = new StripeTransfer();
$transaction->user_id = $this->user_id;
$transaction->stripe_id = $transfer->id;
$transaction->amount = $balance;
$transaction->save();
return true;
}
但这给出了以下错误-
"No such destination: default_for_currency"
我在测试环境中使用它。愿此影响。请帮助提供好的解决方案。谢谢