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

fix(payment-provider-code): Fix payment provider code change #2640

Merged
merged 4 commits into from
Oct 3, 2024

Conversation

ivannovosad
Copy link
Contributor

@ivannovosad ivannovosad commented Sep 30, 2024

Context

Payment provider integration code update does not reflect on assigned customers

How to reproduce issue?

  1. Create a payment provider integration (tested with stripe but probably happens with all of them)

  2. Assign it to a customer

  3. Update the integration code in the settings OR delete the integration

Expected behaviour

The payment provider value attached to my customer should wither be updated, if integration's code is updated, or removed if integration's code have been removed.

Description

This PR fixes all payment provider services that handle the code update.

It also adds soft-deleting of:

  • payment providers
  • payment provider customers

So there are also 2 new migrations that add deleted_at column and drop and re-create indices because of that.

@ivannovosad ivannovosad force-pushed the fix-payment-provider-code branch 3 times, most recently from 2b3e630 to 14885c5 Compare October 1, 2024 14:40
Copy link
Collaborator

@vincent-pochet vincent-pochet left a comment

Choose a reason for hiding this comment

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

Few comments, but it looks great!

app/services/payment_providers/adyen_service.rb Outdated Show resolved Hide resolved
app/services/payment_providers/destroy_service.rb Outdated Show resolved Hide resolved
app/services/payment_providers/stripe_service.rb Outdated Show resolved Hide resolved
@ivannovosad ivannovosad merged commit d977380 into main Oct 3, 2024
6 checks passed
@ivannovosad ivannovosad deleted the fix-payment-provider-code branch October 3, 2024 09:03
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.

3 participants