latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Users can't upgrade free to paid on WPEngine

Home Forums Community Forum Users can't upgrade free to paid on WPEngine

This topic contains 3 replies, has 2 voices. Last updated by  Raam Dev 4 years, 3 months ago.

Topic Author Topic
Posted: Sunday Sep 9th, 2012 at 12:45 am #24678
alancheuk
Username: alancheuk

* Background *

I am using PayPal Pro forms shortcodes with the “success” variable. It works fine on my current installation at HostGator, but now I am testing a migration to WPEngine. I copied all the files and the database to WPEngine, and faked out my local hosts file to treat WPEngine as the server for my domain.

On HostGator, users can purchase without problem. They can also get a free account, then get a paid membership (oddly, the form does not autofill with their info – they have to reenter that information).

The shortcode I am using is:
[s2Member-Pro-PayPal-Form template="custom-paypal-checkout-form.php" level="1" ccaps="theory_lsat_basic,lsat_46,lsat_47,lsat_48,lsat_49,lsat_64,lsat_65" desc="Name of membership - eight months of access for $179" ps="paypal" lc="" cc="USD" dg="0" ns="1" custom="domain.com" ta="0" tp="0" tt="D" ra="179.00" rp="8" rt="M" rr="BN" rrt="" rra="2" accept="paypal,visa,mastercard,amex" accept_via_paypal="paypal" coupon="" accept_coupons="1" default_country_code="" captcha="0" success="/success-lsat-complete/?utm_nooverride=1" /]

* Issue #1 *

On WPEngine, users can purchase, but they do not get forwarded to the page in the “success” variable. Instead, they see the following message:

Thank you. Your account has been approved.
— Please login.

* Issue #2 *

On WPEngine if a user signs up for a free subscriber account then goes to pay for a membership, then the fields do get autofilled (great!) and the payment goes through, BUT their account is not upgraded. First, they get a message like this:

Thank you. Your account has been approved.
— Please login.

Instead of seeing the the “success” page. Then, when they log in, they only have the same permissions from before. When I check out their account they are still listed as “Subscriber” with no custom capabilities, and nothing listed for Paid Subscr. Gateway

* Question *

How do I fix these issues? I contacted WPEngine. They have been very supportive, and we tried some things to solve it (turned off caching for checkout and success pages, reinstalled s2Member) but I am still having this problem.

List Of Topic Replies

Viewing 3 replies - 1 through 3 (of 3 total)
Author Replies
Author Replies
Posted: Sunday Sep 9th, 2012 at 1:06 am #24680
alancheuk
Username: alancheuk

WpEngine just passed on an error log for us. It looks like a function within s2Member is throwing off an error:

[Sun Sep 09 02:18:24 2012] [error] [client 72.38.22.18] PHP Warning: file_put_contents(/nas/wp/www/cluster-1262/wpenginedomain/wp-content/plugins/s2member-logs/mailchimp-api.log) [function.file-put-contents]: failed to open stream: Permission denied in /nas/wp/www/cluster-1262/wpenginedomain/wp-content/plugins/s2member/includes/classes/list-servers.inc.php on line 254, referer: https://domain.com/wp-admin/users.php?action=delete&user=828&_wpnonce=1ca7029379
[Sun Sep 09 02:32:43 2012] [error] [client 72.38.22.18] PHP Warning: file_put_contents(/nas/wp/www/cluster-1262/wpenginedomain/wp-content/plugins/s2member-logs/paypal-api.log) [function.file-put-contents]: failed to open stream: Permission denied in /nas/wp/www/cluster-1262/wpenginedomain/wp-content/plugins/s2member/includes/classes/paypal-utilities.inc.php on line 206, referer: https://domain.com/lsat-complete/

Posted: Sunday Sep 9th, 2012 at 11:05 pm #24715
alancheuk
Username: alancheuk

Okay, I think I have an idea what *might* be going on. I was going through s2Member’s PayPal settings, and noticed that under s2Member > PayPal Options > PayPal IPN Integration it says to:

set “IPN URL” to “https://domain.com/?s2member_paypal_notify=1”, and
set “Auto-Return Integration” to “https://domain.com/?s2member_paypal_return=1”

in my PayPal Account Settings. Since domain.com is only faked out on my local machine, PayPal must be communicating with the HostGator server!

But if this is the case… then why do purchases work right, but not upgrades?

If this is the case, then how can I test to make sure that s2Member works before doing the real migration to the new WPEngine server?

Posted: Monday Sep 10th, 2012 at 11:09 pm #24828
Raam Dev
Username: Raam
Staff Member

Alan,

You won’t be able to fully test things in an environment where PayPal cannot communicate back with the server. s2Member waits for certain messages from PayPal before proceeding with things like upgrades, where s2Member needs to make sure the payment went through successfully before proceeding with upgrading an account.

The success=”” attribute also uses the response from PayPal to redirect to the URL you specified (after a purchase on PayPal, the user is sent back to s2Member where it receives the response from PayPal and if successful redirects to the success page).

In short, there is no way to fully test a setup with PayPal without PayPal being able to communicate with s2Member. If you’re hosting s2Member on a site that is not publicly accessible, then PayPal won’t be able to communicate with s2Member and you’ll experience the problems that you’re experiencing.

Viewing 3 replies - 1 through 3 (of 3 total)

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.