php - 将资金从一个 Stripe 账户转移到另一个 Stripe 账户

标签 php codeigniter stripe-payments stripe-connect

如何将资金从一个 Stripe 账户转移到另一个 Stripe 账户?
我正在关注 here 中的代码:

\Stripe\Stripe::setApiKey(PLATFORM_SECRET_KEY);
\Stripe\Transfer::create(array(
  'amount' => 1000,
  'currency' => "hkd",
  'destination' => {CONNECTED_STRIPE_ACCOUNT_ID}
));

但出现此错误:

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

但是在我必须转帐的测试帐户中大约有 3000 美元,但我仍然收到上述错误。

看到这个:test-account-balance

最佳答案

我也遇到过这种情况。我的错误是我使用了实时 key 。 你可以检查一下

  1. 您正在使用测试连接的帐户 ID(您必须连接 客户也处于测试模式。实时和测试连接的 ID 是 不同)。
  2. 您正在使用测试 key 进行测试。
  3. 创建一名卡号为 1 的客户。 4000 0000 0000 0077 并充电。使用此余额,您可以将金额转入另一个帐户。

关于php - 将资金从一个 Stripe 账户转移到另一个 Stripe 账户,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38829192/

相关文章:

php - 管理数据库中多种类型产品的付款

php - Stripe Checkout webhook 不传递客户电子邮件?

node.js - 带多个目标帐户 ID 的 Stripe Connect

javascript - Stripe : no such token

php - 在输入框中输入数据时,如何在PHP中执行SQL注入(inject)?

php - Codeigniter join() 不起作用

PHP fatal error : Class 'CI_DB_postgre_driver' not found in system/database/DB. php 第 144 行 - CodeIgniter

php - CodeIgniter CSS 问题

php - 在php中将数据从新窗口发送到上一个窗口

php - Codeigniter join 语句与 join 语句