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

Bug: Free Registration in Stripe Checkout Options #569

Closed
jaswrks opened this issue May 18, 2015 · 6 comments
Closed

Bug: Free Registration in Stripe Checkout Options #569

jaswrks opened this issue May 18, 2015 · 6 comments
Assignees
Milestone

Comments

@jaswrks
Copy link
Contributor

jaswrks commented May 18, 2015

This bug impacts Stripe Pro-Forms whenever there are multiple "Checkout Options", and when one of those options offers Free Registration. Referencing internal ticket: https://websharks.zendesk.com/agent/tickets/6355

Steps To Reproduce

  • Generate a set of Stripe Pro-Forms and wrap them as Checkout Options.
  • One of those options must provide a Free Registration.
  • Switch from Free Registration to one of the paid options.
[s2Member-Pro-Stripe-Form]

[s2Member-Pro-Stripe-Form level="1" ccaps="" desc="Silver Thread Membership - It's Free! Sign-up now!" cc="USD" ta="0" tp="0" tt="D" ra="0" rp="1" rt="M" rr="1" coupon="" accept_coupons="0" default_country_code="US" captcha="0" /]

[s2Member-Pro-Stripe-Form level="2" ccaps="" desc="Gold Thread Membership - $8.00 USD / Monthly (recurring charge, for ongoing access)" cc="USD" ta="0" tp="0" tt="D" ra="8.00" rp="1" rt="M" rr="1" coupon="" accept_coupons="0" default_country_code="US" captcha="0" /]

[s2Member-Pro-Stripe-Form level="3" ccaps="" desc="Gold Thread Membership - $75.00 USD / Yearly (recurring charge, for ongoing access)" cc="USD" ta="0" tp="0" tt="D" ra="75.00" rp="1" rt="Y" rr="1" coupon="" accept_coupons="0" default_country_code="US" captcha="0" /]

[/s2Member-Pro-Stripe-Form]

Expected Behavior

The paid options would require payment, duh. i.e., the option to choose a credit card should display.

Observed Behavior

When switching from Free Registration to a paid Checkout Option, the special source token value of free is passed long with the switch; fooling the paid Pro-Form into thinking that it's UI does not need to show the Stripe credit card option.

This results in a server-side error, because the API attempts to add a funding source of free, which is special, and invalid for a paid option.

@jaswrks jaswrks self-assigned this May 18, 2015
jaswrks pushed a commit to wpsharks/s2member-pro that referenced this issue May 18, 2015
@jaswrks
Copy link
Contributor Author

jaswrks commented May 18, 2015

Short-Term Patch

  • Download this updated file
  • Upload via FTP, allowing it override your existing copy of s2member-pro/includes/classes/gateways/stripe/stripe-form-in.inc.php

@jaswrks jaswrks closed this as completed May 18, 2015
@jaswrks
Copy link
Contributor Author

jaswrks commented May 18, 2015

Next Release Changelog:

  • (s2Member Pro) Stripe Bug Fix: This release corrects a bug in Stripe Pro-Form Checkout Options, where a Free Registration option could cause other paid Checkout Options to result in a checkout error under the right conditions. See this GitHub issue for further details.

@patdumond
Copy link

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

@jaswrks
Copy link
Contributor Author

jaswrks commented Jun 2, 2015

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

Link updated with a new token. Thanks for the heads up Pat! :-)

@patdumond
Copy link

I tested this patch and it appears to resolve this issue. It does not resolve Issue #586. Details posted on Issue #586.

@jaswrks
Copy link
Contributor Author

jaswrks commented Jul 23, 2015

The latest release of s2Member v150722+ closes this issue.

This issue will now be locked to further updates. If you have something to add related to this GitHub Issue, please open a new GitHub Issue and reference this one. Thanks! :-)

@wpsharks wpsharks locked and limited conversation to collaborators Jul 23, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants