【发布时间】:2019-09-07 22:23:57
【问题描述】:
我正在按照Payment Intents Quickstart 中的说明使用 Stripe Payment Intents。正如文档所述:
为确保您的集成为 SCA 做好准备,请务必始终向
stripe.handleCardPayment电话提供客户的姓名、电子邮件、帐单地址和送货地址(如果有)。
const stripe = Stripe('pk_test_lolnothisisnotreal', {
betas: ['payment_intent_beta_3']
})
根据the handleCardPayment doc in the link,我提供billing details in the format specified:
// https://stripe.com/docs/stripe-js/reference#stripe-handle-card-payment
const {paymentIntent, error} = await stripe.handleCardPayment(clientSecret, cardElement, {
// https://stripe.com/docs/api/payment_methods/create#create_payment_method-billing_details
payment_method_data: {
billing_details: {
address: {
line1: cardholderAddressLine1.value,
line2: cardholderAddressLine2.value,
city: cardholderAddressCity.value,
state: cardholderAddressState.value,
country: cardholderAddressCountry.value,
postal_code: cardholderAddressPostalCode
},
name: cardholderName.value,
email: cardholderEmail.value,
phone: cardholderPhone.value
}
}
})
但是handleCardPayment() 返回:
Received unknown parameter: source_data[billing_details]
如何使用 Stripe Payment Intents 提供 SCA 合规性的账单详情?
【问题讨论】:
标签: javascript stripe-payments strong-customer-authentication