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

misc(stripe): Refact payment method update webhooks #2808

Merged
merged 1 commit into from
Nov 14, 2024

Conversation

vincent-pochet
Copy link
Collaborator

Context

This PR is related to the remaining PaymentProviders::Stripe::HandleEventJob dead jobs with BaseService::NotFoundFailure: stripe_customer_not_found error

Description

The main goal of the PR is to refactor the handling of the setup_intent.succeeded and customer.updated to move the logic in a dedicated webhook service (in the objective of killing the unmaintainable PaymentProviderCustomers::StripeService).

It also fixes a case in setup_intent.succeeded when the webhook has a customer with null value and no Lago ids in the metadata. Since in this specif case the webhook does not target a lago resource, the handling should not raise an error but should be ignored.

@vincent-pochet vincent-pochet force-pushed the fix-refact-stripe-payment-method-update branch 3 times, most recently from aaba01a to d12a15b Compare November 12, 2024 17:28
Copy link
Contributor

@nudded nudded left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

Left some small comments

@vincent-pochet vincent-pochet force-pushed the fix-refact-stripe-payment-method-update branch 2 times, most recently from 8d527b4 to 12d353d Compare November 14, 2024 08:20
@vincent-pochet vincent-pochet force-pushed the fix-refact-stripe-payment-method-update branch from 12d353d to 5d2c14c Compare November 14, 2024 08:32
@vincent-pochet vincent-pochet merged commit b1b848c into main Nov 14, 2024
6 checks passed
@vincent-pochet vincent-pochet deleted the fix-refact-stripe-payment-method-update branch November 14, 2024 08:57
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 this pull request may close these issues.

2 participants