我的 stripe 账户在测试模式中有以下余额:
$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 帐户并转到Payments
,然后单击Create your first payment
或new payment
按钮。
当你点击它时,你会看到一个弹出窗口打开,你可以在这里填写你的金额。
请记住使用卡号:4000000000000077
然后点击 Create payment
按钮。
您的付款将直接添加(绕过待定状态),您可以使用您的 strip 测试帐户进行转账。
关于php - strip 账户资金不足,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39448578/