php - 我已经集成了条带连接支付流程。我向管理员帐户收费,它工作正常,但连接帐户返回余额不足错误
问题描述
我已经集成了条带连接支付流程。我向管理员帐户收费,它工作正常,但连接帐户返回余额不足错误
$payableAmount = $payableAmount * 100;
//Stripe admin account charge process
$charge = \Stripe\Charge::create(array(
"amount" => 100, // $15.00 this time
"currency" => 'GBP',
"customer" => $stripeDetails['stripe_customer_id']
));
//charge working fine (In Dashboard currency converted GBP to UD)
$splitAmount = 100 * 2 / 100;
$splitAmount = 90 - $splitAmount;
$transfer = \Stripe\Transfer::create(array(
'amount' => $splitAmount * 100,
'currency' => 'GBP',
'destination' => $storeData['stripe_account_id']
));
//transfer return Insufficient funds in Stripe account. In test mode, you can add funds to your available balance.
解决方案
您已向客户收取 1 英镑的费用,Stripe 接受amount
最低货币价值,在本例中为 100 便士。然后,您尝试将 88 英镑转入您只有 1 英镑可用的关联帐户。
您应该重新审视您的逻辑,因为无论您向客户收取多少费用$splitAmount
,它总是等于。88
推荐阅读
- qt - 如何在 qtquickcontrols2.conf 中定义颜色的深浅?
- file - 阅读 Julia 中的特定行
- ios - 如何在堆栈视图中居中对齐视图,而不是拉伸任何视图或分布?
- node.js - 猫鼬无法在 docker-compose 中连接
- php - 如何在php中创建图像
- c# - 无法在没有定义命名空间的情况下访问类库中类的引用
- google-apps-script - 是否有任何批处理方法可以加快 Google Drive 上的文件创建速度?
- ios - 如何在点击按钮后立即激活拖动和排序模式
- azure - 刷新 Azure Function 的函数令牌
- r - R Shiny App 中的简单计算提供了与 Rstudio 中相同计算不同的输出