Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Bug: %%sp_access_url%% #1024

Closed
jaswrks opened this issue Nov 30, 2016 · 8 comments
Closed

Bug: %%sp_access_url%% #1024

jaswrks opened this issue Nov 30, 2016 · 8 comments
Assignees
Labels
Milestone

Comments

@jaswrks
Copy link
Contributor

jaswrks commented Nov 30, 2016

In a Pro-Form shortcode, if you set success="%%sp_access_url%%", a redirect does not occur because the final value is nothing but a URL-encoded string (i.e., will not validate as being a URL). Normally, that is correct, because these replacement codes are normally a set of values intended for use as a URL component, and not as the URL itself.

For example, one might choose to configure it this way instead:

success="http://example.com?redirect_to=%%sp_access_url%%"

However, if the only replacement code is the URL itself, the value for this replacement code should not be URL-encoded. That way a redirect can occur and forward a customer to the Specific Post/Page they have just purchased access to. Which would be very useful.

@jaswrks jaswrks added the bug label Nov 30, 2016
@jaswrks
Copy link
Contributor Author

jaswrks commented Nov 30, 2016

Referencing internal/private ticket:
https://app.intercom.io/a/apps/zbpo3mkk/inbox/me@jaswsinc.com/conversations/6876833911
Customer was sent a bleeding edge copy for further testing, following the fix for this bug.

@jaswrks
Copy link
Contributor Author

jaswrks commented Nov 30, 2016

Next Release Changelog:

  • (s2Member Pro) Bug Fix: Allow Pro-Forms to use success="%%sp_access_url%%" without issue. See Issue #1024.

@renzms
Copy link
Contributor

renzms commented Jan 27, 2017

@jaswsinc

Possible Bug

Tested using:

WordPress Version: 4.7.2
Current WordPress Theme: Twenty Seventeen version 1.1
Theme Author: the WordPress team - https://wordpress.org/
Theme URI: https://wordpress.org/themes/twentyseventeen/
Active Plugins: s2Member Pro v170126-RC
PHP Version: 7.0.10-2+deb.sury.org~xenial+1
MySQL Version: 10.0.29-MariaDB-0ubuntu0.16.04.1

Using the following generated code for Specific Post Access with success="%%sp_access_url%%"


[s2Member-Pro-Stripe-Form sp="1" ids="295" exp="72" desc="Description and # details here." cc="USD" custom="domain.net" ra="0.50" coupon="" accept_coupons="0" default_country_code="US" captcha="0" success="%%sp_access_url%%" /]

screen shot 2017-01-28 at 12 43 24 am

Backend:

screen shot 2017-01-28 at 12 42 31 am

Upon Successful redirect, it says the link has expired:

screen shot 2017-01-28 at 12 42 37 am

jaswrks pushed a commit to wpsharks/s2member-pro that referenced this issue Jan 31, 2017
@jaswrks
Copy link
Contributor Author

jaswrks commented Jan 31, 2017

Great catch! I've had this fixed. See: wpsharks/s2member-pro@c3fce12

@renzms
Copy link
Contributor

renzms commented Feb 2, 2017

Confirmed Working in update

@jaswsinc @raamdev

Tested again with the update you made and it works! Thanks!

screen shot 2017-02-02 at 3 06 38 pm

@jamiefolsom
Copy link

Could this be related to an ongoing issue I'm seeing when users successfully pay via paypal, and are redirected to the WP site, but prevented from registering, with the message "User Registration is Currently Not Allowed"?

@raamdev
Copy link
Contributor

raamdev commented Feb 20, 2017

@jamiefolsom Not likely, no. The most likely cause for the issue you're describing would be that IPN notifications from PayPal are not making it to your site for some reason, so s2Member doesn't know that the person being redirected to your site successfully paid for an account.

The "User Registration is Currently Not Allowed" message is shown when you have Open Registration disabled (s2Member → General Options → Open Registration) and someone who hasn't yet paid tries to visit the registration page. If PayPal wasn't able to confirm the payment immediately (i.e., just before the redirect), then s2Member instead waits until it receives an IPN notification from PayPal of a successful payment and then sends off an email to the new user with a special registration URL.

I suggest double-checking all of your PayPal configuration (both on s2Member and PayPal) and enabling logging (s2Member → Log Files (Debug) → Logging Configuration) to see if you can locate the issue. Good luck!

@raamdev
Copy link
Contributor

raamdev commented Feb 21, 2017

s2Member v170221 has been released and includes changes from this GitHub Issue. See the v170221 announcement for further details.


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 (#1024).

@raamdev raamdev closed this as completed Feb 21, 2017
@wpsharks wpsharks locked and limited conversation to collaborators Feb 21, 2017
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants