Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Customer Phone keep getting deleted #632

Open
Sberla84 opened this issue Jul 8, 2024 · 0 comments · May be fixed by #634
Open

Customer Phone keep getting deleted #632

Sberla84 opened this issue Jul 8, 2024 · 0 comments · May be fixed by #634

Comments

@Sberla84
Copy link

Sberla84 commented Jul 8, 2024

Bug report

  • Extension name: invertase/stripe-firebase-extensions

Describe the bug

after creating the customer and successfully made a checkout session, the extension rerun, updating the customer phone with the payment method data, that could have an empty value. That results in a wrong update of the correct phone number with null.

To Reproduce

Just try to create a customer and do a checkout session paying with credit card, you will notice in strupe events multiple actions on the profile, the last of them update the customer with a null phone number.

the problem is in the firestore-stripe-payments/functions/src/index.ts at row 513

const copyBillingDetailsToCustomer = async ( payment_method: Stripe.PaymentMethod ): Promise<void> => { const customer = payment_method.customer as string; const { name, phone, address } = payment_method.billing_details; await stripe.customers.update(customer, { name, phone, address }); };

KR

Nic

Sberla84 added a commit to Sberla84/stripe-firebase-extensions that referenced this issue Jul 8, 2024
@Sberla84 Sberla84 linked a pull request Jul 8, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant