编程语言
首页 > 编程语言> > php – 条纹账户资金不足

php – 条纹账户资金不足

作者:互联网

我的条带帐户在测试模式下具有以下平衡:

$958,395.72
Available balance

$2,659.48
Pending balance

$3,010,474.35
Total volume (HKD)

这笔余额以港元计算.
现在我必须以美元汇款.
如果我尝试转移4.25美元,那么它会给我以下错误:

Type: Stripe\Error\InvalidRequest

Message: Insufficient funds in Stripe account. In test mode, you can
add funds to your available balance (bypassing your pending balance)
by creating a charge with 4000 0000 0000 0077 as the card number. You
can use the the /v1/balance endpoint to view your Stripe balance (for
more details, see stripe.com/docs/api#balance).

转移代码:

$check_balnace = \Stripe\Balance::retrieve();
$balanceArr = $check_balnace->__toArray(true);
$available_amount = $balanceArr['available']['0']['amount'];
echo $available_amount; // $958,395.72
$amount = 4.25*100;
$amount = 425;
\Stripe\Transfer::create(array("amount" => $amount, "currency" => "usd", "destination" => 'stripr_uid', "description" => 'test'));

即使我有足够的平衡,为什么会发生这种错误?

解决方法:

您的Stripe帐户只有一个HKD银行帐户,因此它只有HKD余额.您无法以美元创建转帐,因为您的帐户没有美元余额.

为了使您的帐户拥有美元余额,您需要将美元银行帐户与其相关联.但是,此时,香港条纹账户只能拥有港币银行账户,如here所示.

标签:php,payment-gateway,stripe-payments,payment
来源: https://codeday.me/bug/20190711/1436994.html