Skip to content

Commit 9c26407

Browse files
committed
DEBUG
1 parent 0b542ad commit 9c26407

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

components/server/ee/src/user/stripe-service.ts

+6
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ export class StripeService {
116116
customer: customer.id,
117117
});
118118
const paymentMethod = await this.getStripe().paymentMethods.retrieve(setupIntent.payment_method);
119+
log.info("Attaching payment method:", { paymentMethod });
119120
await this.getStripe().customers.update(customer.id, {
120121
invoice_settings: { default_payment_method: setupIntent.payment_method },
121122
...(paymentMethod.billing_details.address?.country
@@ -168,6 +169,11 @@ export class StripeService {
168169
if (!priceId) {
169170
throw new Error(`No Stripe Price ID configured for currency '${currency}'`);
170171
}
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+
});
171177
const isAutomaticTaxSupported = customer.tax?.automatic_tax === "supported";
172178
if (!isAutomaticTaxSupported) {
173179
log.warn("Automatic Stripe tax is not supported for this customer", { customer });

0 commit comments

Comments
 (0)