使用连接帐户并将setup_future_usage
设置为off_session
时,PaymentIntent失败
创建付款意图
\Stripe\Stripe::setApiKey("sk_test_xxxxxxxxxxxxxxxxxxxxxxxx");
$result = \Stripe\PaymentIntent::create(
array(
"amount"=>1000,
"currency"=>"gbp",
"payment_method_types"=>array('card'),
"application_fee_amount"=>100,
"setup_future_usage"=>"off_session"
),
array("stripe_account"=>"acct_xxxxxxxxxxxxxxx")
);
print_r($result);
这是未捕获的错误响应
Fatal error: Uncaught exception 'Stripe\Error\InvalidRequest' with message 'You cannot update `setup_future_usage` from off_session to on_session on a PaymentIntent when using a publishable key. When `setup_future_usage` is already set, you can only update the value from on_session to off_session.'
如果我从数组中删除了stripe_account
和application_fee_amount
键,我将创建成功,这意味着与关联帐户有关
Stripe\PaymentIntent Object ( [id] => pi_xxxxxxxxxxxxxxxxxx [object] => payment_intent...
stripe文档简单地说出与上面的错误相同
答案 0 :(得分:0)
因此,第二天它没有任何变化。
可能是条纹错误