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

Hot Fix: Resolved issue with some Stripe gateways not recording incoming recurring donation renewals. #7077

Merged
merged 1 commit into from
Oct 30, 2023

Conversation

glaubersilva
Copy link
Contributor

@glaubersilva glaubersilva commented Oct 27, 2023

Resolves #7076

Description

The webhook events used by the Stripe Element were using the exit in the wrong place and it was preventing the events from the legacy codebase from running.

This PR fixes this problem.

Affects

Stripe renewals in donations/subscriptions created with v2 forms.

Testing Instructions

  1. Using the latest version of GiveWP and the Recurring Donations add-on, make a recurring donation on a V2 form
  2. Spoof a renewal in Stripe by resetting the billing cycle: https://somup.com/c06tcOBP02
  3. The renewals should be recorded on the Give side.

Pre-review Checklist

  • Acceptance criteria satisfied and marked in related issue
  • Relevant @unreleased tags included in DocBlocks
  • Includes unit tests
  • Reviewed by the designer (if follows a design)
  • Self Review of code and UX completed

@glaubersilva glaubersilva marked this pull request as ready for review October 27, 2023 21:41
Copy link
Contributor

@jonwaldstein jonwaldstein left a comment

Choose a reason for hiding this comment

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

@glaubersilva looks great thanks!

Copy link
Contributor

@JasonTheAdams JasonTheAdams left a comment

Choose a reason for hiding this comment

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

@glaubersilva @jonwaldstein Am I following the logic here that basically we're no longer exiting if the v3 form system did not process the event, which gives the v2 system the opportunity to process it?

@jonwaldstein
Copy link
Contributor

@glaubersilva @jonwaldstein Am I following the logic here that basically we're no longer exiting if the v3 form system did not process the event, which gives the v2 system the opportunity to process it?

Correct, we found the exit statement needed to be called conditionally - only if Stripe Payment Element processed the event. The original purpose of the action was for Stripe Payment Element to take over the request when need be (because it lived in the seperate next gen repo). In this scenario we don't want both webhook logics to run - it should be either the legacy Stripe webhook or new one.

We weighed many different options together and this was the simplest way to resolve the current issue at this time. When we have a little more time to dedicate to this, we would like to explore creating some kind of proper proxy up the chain and/or merging the logics so they can truly be handled separately to avoid conflict and confusion.

Copy link
Member

@rickalday rickalday left a comment

Choose a reason for hiding this comment

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

Passed manual QA tests.

@jonwaldstein jonwaldstein merged commit bc50c34 into master Oct 30, 2023
@jonwaldstein jonwaldstein deleted the hotifx/stripe-renewals-not-recording-7076 branch October 30, 2023 14:32
@jonwaldstein jonwaldstein changed the title Hot Fix: properly record the Stripe renewals on the Give side Hot Fix: Resolved issue with some Stripe gateways not recording incoming recurring donation renewals. Oct 30, 2023
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.

4 participants