We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6c669f7 commit d864580Copy full SHA for d864580
components/server/ee/src/user/stripe-service.ts
@@ -115,8 +115,10 @@ export class StripeService {
115
await this.getStripe().paymentMethods.attach(setupIntent.payment_method, {
116
customer: customer.id,
117
});
118
+ const paymentMethod = await this.getStripe().paymentMethods.retrieve(setupIntent.payment_method);
119
await this.getStripe().customers.update(customer.id, {
120
invoice_settings: { default_payment_method: setupIntent.payment_method },
121
+ ...(paymentMethod.card?.country ? { address: { line1: "", country: paymentMethod.card.country } } : {}),
122
123
}
124
0 commit comments