File tree 1 file changed +6
-0
lines changed
components/server/ee/src/user
1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -116,6 +116,7 @@ export class StripeService {
116
116
customer : customer . id ,
117
117
} ) ;
118
118
const paymentMethod = await this . getStripe ( ) . paymentMethods . retrieve ( setupIntent . payment_method ) ;
119
+ log . info ( "Attaching payment method:" , { paymentMethod } ) ;
119
120
await this . getStripe ( ) . customers . update ( customer . id , {
120
121
invoice_settings : { default_payment_method : setupIntent . payment_method } ,
121
122
...( paymentMethod . billing_details . address ?. country
@@ -168,6 +169,11 @@ export class StripeService {
168
169
if ( ! priceId ) {
169
170
throw new Error ( `No Stripe Price ID configured for currency '${ currency } '` ) ;
170
171
}
172
+ log . info ( "DEBUG: Old customer vs new:" , {
173
+ oldCuster : customer ,
174
+ midCustomer : await this . findCustomerByAttributionId ( customer . metadata . attributionId ) ,
175
+ newCustomer : await this . getStripe ( ) . customers . retrieve ( customer . id , { expand : [ "tax" ] } ) ,
176
+ } ) ;
171
177
const isAutomaticTaxSupported = customer . tax ?. automatic_tax === "supported" ;
172
178
if ( ! isAutomaticTaxSupported ) {
173
179
log . warn ( "Automatic Stripe tax is not supported for this customer" , { customer } ) ;
You can’t perform that action at this time.
0 commit comments