Skip to content

Conversation

@joaquimds
Copy link
Member

This doesn't happen, as every time someone goes through the GoCardless flow, they get a new Customer ID.

However, it is incorrect code, so should be fixed.

Also ensures that the LRU specific webhook handler is registered before the generic one (in the main plugin repo) so it takes priority.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes a bug where new mandates could be incorrectly deleted when a customer ID is reused in the GoCardless flow, and ensures proper webhook handler priority.

Changes:

  • Added priority parameter (9) to webhook handler registration to ensure LRU-specific handler runs before the generic handler
  • Added mandate ID parameter to removeCustomerMandates() call to prevent deletion of the newly created mandate when customer ID is reused

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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