我正在集成条带终端,并且遵循以下步骤:
步骤1:
stripe.paymentIntents.create({
currency: 'usd',
payment_method_types: ['card_present'],
capture_method: 'manual',
amount: 1000,
})
Response : success with status 'requires_payment_method'
第2步:
stripe.terminal.readers.processPaymentIntent({
'reader_id',
'payment_intent'
})
Response : success with status 'in_progress'
步骤3:
stripe.terminal.readers.retrieve({'reader_id'});
Response : success with status 'in_progress'
步骤4:
stripe.paymentIntents.retrieve({'payment_intent'});
Response : success with status 'requires_payment_method'
步骤5:
stripe.paymentIntents.capture('{payment_intent}')
Response : error with status 'requires_payment_method'
Error : 'This PaymentIntent could not be captured because it has a status of requires_payment_method. Only a PaymentIntent with one of the following statuses may be captured: requires_capture.',
以下文档链接:https://stripe.com/docs/terminal/ payments/collect- payment
您使用的是模拟阅读器吗?如果是,在第 2 步检索后,您需要使用 stripe.terminal.Reader.TestHelpers.present_ payment_method 。然后继续执行其余步骤。