我正在尝试从关联帐户的客户那里负责,
我有这个错误Cannot use stripe token more than once
这是我的代码:
$customer = \Stripe\Customer::create(array(
"email" => $customer_email,
"source" => $token,
),
array("stripe_account" => $stripe_connected_account)
);
$charge = \Stripe\Charge::create(array(
"amount" => $the_fix_fee_convert,
"currency" => "eur",
"source" => $token,
"description" => "Charge for subscription"
));
我尝试customer
改用source
:
$charge = \Stripe\Charge::create(array(
"amount" => $the_fix_fee_convert,
"currency" => "eur",
"customer" => $customer->id,
"description" => "Charge for subscription"
));
但是 Stripe 没有找到,customer->id
因为它来自$stripe_connected_account
我也试过这个:
$charge = \Stripe\Charge::create(array(
"amount" => $the_fix_fee_convert,
"currency" => "eur",
"customer" => $customer->id,
"description" => "Charge for subscription"
),
array("stripe_account" => $stripe_connected_account)
);
它可以工作,但费用是在连接的帐户上而不是在应用程序帐户上转移的。
对此有任何想法吗?