Stripe payments 获取错误:在PaymentMethod创建期间,无法将PaymentMethod附加到客户。在定期付款意向条中
我正在处理定期付款意图,当我稍后尝试在服务器端为保存的卡收费时,我得到以下响应:Stripe payments 获取错误:在PaymentMethod创建期间,无法将PaymentMethod附加到客户。在定期付款意向条中,stripe-payments,Stripe Payments,我正在处理定期付款意图,当我稍后尝试在服务器端为保存的卡收费时,我得到以下响应: Array ( [error] => Array ( [message] => You cannot attach a PaymentMethod to a Customer during PaymentMethod creation. Please instead create the PaymentMethod and then attach it u
Array
(
[error] => Array
(
[message] => You cannot attach a PaymentMethod to a Customer during PaymentMethod creation. Please instead create the PaymentMethod and then attach it using the attachment method of the PaymentMethods API.
[type] => invalid_request_error
)
)
为此,我使用了旋度方法
curl https://api.stripe.com/v1/payment_methods \
-u ********: \
-d customer="{{CUSTOMER_ID}}" \
-d type=card
谁能帮我解决这个问题?我必须参考这一页
https://stripe.com/docs/payments/save-and-reuse
我遇到了同样的问题。。根据他们的想法,我们需要首先创建一种付款方式,然后将其附加到客户身上。不过,我不知道他们为什么提供客户字段欢迎使用SO!请阅读,然后。虽然此链接可能有一个解决方案,但最好在此处添加代码并进行解释。