Php 我集成了stripe connect支付流程。我向管理员帐户收费,其工作正常,但连接帐户返回余额不足错误

Php 我集成了stripe connect支付流程。我向管理员帐户收费,其工作正常,但连接帐户返回余额不足错误,php,stripe-payments,payment,Php,Stripe Payments,Payment,我集成了stripe connect支付流程。我向管理员帐户收费,其工作正常,但连接帐户返回余额不足错误 $payableAmount = $payableAmount * 100; //Stripe admin account charge process $charge = \Stripe\Charge::create(array( "amount" => 100, // $15.00 this time "currency" => 'GBP',

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

$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英镑的费用,以最低货币价值收取
金额
价值,在本例中为100便士。然后,您试图将88英镑转账到您的连接帐户,而您只有1英镑可用


您应该重新查看您的
$splitAmount
逻辑,因为无论您向客户收取多少费用,它都将达到
88

应付金额始终大于转账金额, 更改应付金额。因此,应付美元的金额总是大于拆分金额

     $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']
      ));

所以你已经收了100英镑,但是你想转账8800英镑?不,我只收了100英镑的管理员帐户,效果很好。我会在管理员仪表板上登记,货币是英镑兑美元。然后转账过程与我使用英镑货币一样,它返回的余额不足。。你能解决这个问题吗。帮助我。。我在上面的代码中犯了错误。很简单,你的帐户中没有8800可转帐,因为你一次只收100英镑。您必须至少运行该脚本88次,帐户才能有足够的资金。OP没有使用
$payablemant
。这也值得在你的答案中添加更多的解释,而不是简单地说“阅读此链接”,它可以随时删除或更改。我试图给出静态量,这也不起作用$应付金额=10000*100,转账金额也为10000*100支票,请注意,可用客户账户余额超过转账金额管理账户余额:$9544.98,转账账户余额:$2714.98。。但它显示了管理员帐户和客户帐户的美元货币。有什么问题吗?如果出现问题,我如何在条带帐户中手动更改货币