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: Show Stripe credit card form after upgrade when Stripe Checkout is not enabled #4260 #4261

Merged
merged 3 commits into from
Sep 27, 2019

Conversation

mehul0810
Copy link
Contributor

Description

This PR resolves #4260

How Has This Been Tested?

I've tested this PR as per the acceptance criteria on the issue description and also check the testing video https://www.loom.com/share/787bf1bdf025405390b0311f89e4d562

Types of changes

Bug fix (non-breaking change which fixes an issue)

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows has proper inline documentation.

@mehul0810 mehul0810 changed the title fix: add backward compatibility to handle smooth onboarding to checkout fix: Show Stripe credit card form after upgrade when Stripe Checkout is not enabled #4260 Sep 26, 2019
@mikejhale
Copy link
Contributor

I have tested this PR with the following steps for Stripe Checkout and Stripe Credit Card after upgrading to GiveWP 2.5.8 and donations are working as expected in both cases.

I haven't been able to reproduce any of the Payment Intents errors yet.

Scenario 1 - Stripe Checkout

  1. Install GiveWP 2.5.4
  2. In DB manually change wp_options > give_version option_value to 2.5.4
  3. In DB manually change wp_options > give_version_upgraded_from option_value to 2.5.3
  4. Donations > Settings > Payment Gateways > Gateway: Enable Stripe - Credit Card Gateway
  5. Donations > Settings > Payment Gateways > Stripe Settings: Make sure Stripe is connected, Check Enable Stripe Checkout
  6. Change code to issue/4260 (run composer/npm)
  7. Reload wp-admin/edit.php?post_type=give_forms&page=give-settings&tab=gateways

Verify Settings > Gateways:

Stripe - Checkout - Enabled
Stripe - Credit Card - Not enabled

Verify Settings > Stripe > Stripe Checkout:

Checkout Type: Modal (Legacy Checkout)

In DB wp_options:

give_version: 2.5.8
give_version_upgraded_from: 2.5.4

Test Donations:

  • Existing email: Stripe Modal appears, Donation successful (Shows in Donations and Stripe)
  • New Email: Stripe Modal appears, Donation successful (Shows in Donations and Stripe)

Scenario B - Stripe Credit Card (Checkout disabled):

Same as above, except:
5. Donations > Settings > Payment Gateways > Stripe Settings: Disable Enable Stripe Checkout (unchecked)

Verify:

  • Stripe - Credit Card enabled
  • Stripe - Checkout not enabled

Test Donations:

  • Existing email: Stripe CC Form appears, Donation successful (Shows in Donations and Stripe)
  • New Email: Stripe CC Form appears, Donation successful (Shows in Donations and Stripe)

@DevinWalker DevinWalker merged commit 1203b9d into develop Sep 27, 2019
@DevinWalker DevinWalker deleted the issue/4260 branch September 27, 2019 03:08
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.

fix: Show Stripe credit card form after upgrade when Stripe Checkout is not enabled
3 participants