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

Stripe issue with multiple checkout options #586

Closed
bryanthankins opened this issue May 26, 2015 · 12 comments
Closed

Stripe issue with multiple checkout options #586

bryanthankins opened this issue May 26, 2015 · 12 comments

Comments

@bryanthankins
Copy link

When creating multiple checkout options on stripe pro-form, choosing a pay option, and entering a duplicate email, the duplicate email validation does not display and the form resets to the free option.

Here are the steps to reproduce:

  1. Install a fresh wordpress
  2. Install a fresh s2Member pro
  3. Configure Stripe test private and public key
  4. Create a Membership Options page
  5. Add the following to your membership options page:

[s2Member-Pro-Stripe-Form]
[s2Member-Pro-Stripe-Form register="1" level="0" ccaps="" desc="Signup now, it's Free!" tp="0" tt="D" captcha="clean"/]
[s2Member-Pro-Stripe-Form level="1" ccaps="" desc="$10 USD / Monthly (recurring charge, for ongoing access)" cc="USD" ta="0" tp="0" tt="D" ra="10" rp="1" rt="M" rr="1" coupon="" accept_coupons="0" default_country_code="US" captcha="0" /]
[s2Member-Pro-Stripe-Form level="2" ccaps="" desc="$99 USD / Yearly (recurring charge, for ongoing access)" cc="USD" ta="0" tp="0" tt="D" ra="99" rp="1" rt="Y" rr="1" coupon="" accept_coupons="0" default_country_code="US" captcha="0"/]
[/s2Member-Pro-Stripe-Form]

  1. Logout and go to the member ship options page.
  2. Choose the $10/month signup
  3. Fill out the fields
  4. IMPORTANT: When filling out the email address, pick one that has already been used by another user
  5. Add a billing method using the test stripe credit card
  6. Press submit
  7. You will be redirected back to a blank form and it will choose the free checkout option and not give you your validation error.

NOTE: This error only happens with the Stripe Pro forms and not with the Paypal pro forms. Also, it does not happen if you choose the "Free" checkout option. Everything works correctly when you do that.

@patdumond
Copy link

I have verified that this occurs on my test site using the parameters Bryant has set here.

@jaswrks
Copy link
Contributor

jaswrks commented Jun 2, 2015

@bryanthankins @patdumond This appears to be a duplicate of #569 (i.e., indirectly related). Would you mind applying the patch provided in #569 and let me know if this still occurs on your end please?

@patdumond
Copy link

I'm getting a "File Not Found" error on that patch, Jason.

@patdumond
Copy link

Jason,

Tested the patch to #569 for this issue. I tested 3 times yesterday and got no error message when using a duplicate email. The transaction failed, but I was simply returned to a blank form: no error message at the top.

Then I went in today to test a different issue and accidentally used a duplicate email (not the same email I used yesterday -- which was definitely in the database, I triple-checked) and got an error message that the email address already existed. I tested the same address I used yesterday again and got an error message. So, it appears to be fixed. I must not have been "holding my mouth right" yesterday, as my mother used to say.

@jaswrks
Copy link
Contributor

jaswrks commented Jun 3, 2015

So, it appears to be fixed. I must not have been "holding my mouth right" yesterday, as my mother used to say.

@patdumond Thank you! So it does appear that both issues were corrected by #569 then? Sorry, just want to make sure that I understand. If not, I will open this back up and run another round of tests.

@bryanthankins
Copy link
Author

Thanks for the fix and the great product!

@bryanthankins
Copy link
Author

This fix resolves the issue of not seeing the error message, but it still resets the form to the free option if you have selected another option.

@patdumond
Copy link

There is more information on what Bryant said above in this ticket. I elevated the ticket to Level 2 to make sure you see it one way or another.

@jaswrks
Copy link
Contributor

jaswrks commented Jun 7, 2015

I elevated the ticket to Level 2 to make sure you see it one way or another.

@patdumond Thank you. I am reviewing now.

jaswrks pushed a commit to wpsharks/s2member-pro that referenced this issue Jun 7, 2015
@jaswrks
Copy link
Contributor

jaswrks commented Jun 7, 2015

@bryanthankins @patdumond Thank you for identifying a remaining problem with this. I found the underlying issue (in JavaScript) and it has been corrected in the development copy. It will come soon with the next release of s2Member Pro.

Short-Term Patch

  • Download this updated file and upload via FTP. Allowing it to override your existing copy of s2member-pro/includes/separates/gateways/stripe/stripe-min.js
  • IMPORTANT: Clear your browser cache (i.e., temp files) before re-testing.

@jaswrks jaswrks closed this as completed Jun 7, 2015
@jaswrks
Copy link
Contributor

jaswrks commented Jun 7, 2015

Next Release Changelog:

  • (s2Member Pro) Stripe Bug Fix: This release corrects a bug in s2Member's Stripe Pro-Forms, related to having multiple Checkout Options. The bug resulted in a missing error message whenever one of the Checkout Options was submitted incorrectly, and also resulted in the default Checkout Option being magically selected instead of the one that a customer was working with. Props to @patdumond and @bryanthankins. See: this GitHub issue if you'd like additional details.

@bryanthankins
Copy link
Author

@jaswsinc Thanks for the quick fix on this and the shout out in the release notes. I have confirmed that this patch does indeed solve the problem.

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

No branches or pull requests

3 participants