【问题标题】:I have integrated stripe connect payment process. I charge admin account its working fine but connect account returned insufficient balance error我已经集成了条带连接支付流程。我向管理员帐户收费,它工作正常,但连接帐户返回余额不足错误
【发布时间】:2019-09-27 03:31:27
【问题描述】:

我已经集成了条带连接支付流程。我向管理员帐户收费,它工作正常,但连接帐户返回余额不足错误

$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.

【问题讨论】:

  • 所以你已经收取了 100 的费用,但要转移 8800?
  • 不,我只为正常工作的管理员帐户收取了 100 英镑。我将在管理仪表板中检查货币货币是英镑兑美元。然后像我使用英镑货币一样转移过程它返回的余额不足..你能解决这个问题吗?帮帮我..我在上面的代码中做错了什么..
  • 很简单,你账户里没有8800可以转账,因为你一次只收100。您必须至少运行该脚本 88 次才能使帐户有足够的资金。

标签: php stripe-payments payment


【解决方案1】:

您向客户收取了 1 英镑的费用,Stripe 接受amount 的最低货币价值,在本例中为 100 便士。然后,您尝试将 88 英镑转入您只有 1 英镑可用的关联帐户。

您应该重新审视您的 $splitAmount 逻辑,因为无论您向客户收取多少费用,它总是等于 88

【讨论】:

    【解决方案2】:

    应付金额总是大于转账金额,Read More 更改应付金额。所以 $payable 总是比 splitAmount 大。

         $payable=100*100;  
    
          $charge = \Stripe\Charge::create(array(
                "amount" => $payable, // $100.00 this time
                "currency" => 'GBP',
                "customer" => $stripeDetails['stripe_customer_id']
          ));
    
          //charge working fine (In Dashboard currency converted GBP to UD)
               //Can only transfer up to the platform’s available account balance (with an exception when using source_transaction),before check it
    
           $balance = \Stripe\Balance::retrieve(
                 ["stripe_account" => CONNECTED_STRIPE_ACCOUNT_ID]
           );
    
    
          $splitAmount = 100 * 2 / 100;
          $splitAmount = 90 - $splitAmount;
    
          $transfer = \Stripe\Transfer::create(array(
              'amount' => $splitAmount * 100,
              'currency' => 'GBP',
              'destination' => $storeData['stripe_account_id']
          ));
    

    【讨论】:

    • OP 没有使用$payableAmount。在您的答案中添加更多解释也是值得的,而不是简单地说“阅读此链接”可以随时删除或更改。
    • 我试图给静态金额也不起作用.. $payableAmount = 10000 * 100 和转账金额我也给了 10000 * 100
    • 请检查客户账户余额是否超过转账金额
    • 管理员账户余额:9,544.98 美元,转账账户余额:2,714.98 美元。但它显示了管理员账户和客户账户美元货币。有什么问题吗?如果有问题,我该如何在条带帐户中手动更改货币
    猜你喜欢
    • 2023-03-18
    • 2020-09-05
    • 2021-07-20
    • 2020-03-07
    • 1970-01-01
    • 1970-01-01
    • 2013-06-07
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多