PriMoThemes — now s2Member® (official notice)

This is now a very OLD forum system. It's in READ-ONLY mode.
All community interaction now occurs at WP Sharks™. See: new forums @ WP Sharks™

ERROR: Unable to modify Subscription (AliPay Payment)

s2Member Plugin. A Membership plugin for WordPress®.

ERROR: Unable to modify Subscription (AliPay Payment)

Postby smallfish » October 18th, 2011, 5:14 am

Hi

I bought S2member Pro 3 days ago.

Today I started test it with AliPay (I only need AliPay as my prospects are Chinese) today, I encountered the following issue. Here are my detailed steps:

1. Create a AliPay button. Code:

[s2Member-Pro-AliPay-Button level="1" ccaps="" desc="自学版" custom="*****" ra="0.01" rp="1" rt="M" image="default" output="anchor" /]

2. Put it in my web page

3. Click the button and make payment

4. Payment success and I get redirected to my website.

5. Get an error message:

[ERROR: Unable to modify Subscription.
Please contact Support for assistance.

Could not get the existing User ID from the DB. ]

6. Read logs in the s2member log folder (I enabled the log option before test), but can't find more information.

For detailed error log and website url I'll send it privately.

Very appreciate for your kindly help.


Thanks
User avatar
smallfish
Registered User
Registered User
 
Posts: 4
Joined: October 18, 2011

Re: ERROR: Unable to modify Subscription (AliPay Payment)

Postby smallfish » October 19th, 2011, 12:22 am

Found the cause.

Should be a bug of S2Member.

Relative info In paypal_ipn.log,

Code: Select all
  'option_name1' => 'Referencing Customer ID',
  'option_selection1' => '68.68.**.**',
  'option_name2' => 'Customer IP Address',
  'item_number' => '1::1 M',
  'item_name' => 'basic',
  'proxy_verified' => 'alipay',
  's2member_log' =>
  array (
    0 => 'IPN received on: Tue Oct 18, 2011 9:15:46 am UTC',
    1 => 's2Member POST vars verified with a Proxy Key',
    2 => 's2Member originating domain ( `$_SERVER["HTTP_HOST"]` ) validated.',
    3 => 's2Member `txn_type` identified as ( `web_accept|subscr_signup` ).',
    4 => 's2Member `txn_type` identified as ( `web_accept|subscr_signup` ) w/ update vars.',
    5 => 'Unable to modify Subscription. Could not get the existing User ID from the DB. Please check the `on0` and `os0` variables in your Button Code.',
  ),


For option 1 "Referencing Customer ID", the value is ip address. But S2Member treat it like a user id and try to modify exist subscription instead of create new one.

I changed code line 107 in paypal-return-in-subscr-or-wa-w-level.inc.php. Check the value of option 1 to choose the correct route. It works now.

source line

Code: Select all
if (preg_match ("/(referenc|associat|updat|upgrad)/i", $paypal["option_name1"]) && $paypal["option_selection1"] )


modified line

Code: Select all
if (preg_match ("/(referenc|associat|updat|upgrad)/i", $paypal["option_name1"]) && $paypal["option_selection1"] && !preg_match ("/[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}/", $paypal["option_selection1"]))


Post it here for anyone who may encounter this issue.
User avatar
smallfish
Registered User
Registered User
 
Posts: 4
Joined: October 18, 2011

Re: ERROR: Unable to modify Subscription (AliPay Payment)

Postby Jason Caldwell » October 21st, 2011, 1:40 pm

Thanks for reporting this important issue.
Your email has also been received.
~ Investigating now.
~ Jason Caldwell / Lead Developer
& Zeitgeist Movie Advocate: http://www.zeitgeistmovie.com/

Is the s2Member plugin working for you? Please rate s2Member at WordPress.org.
You'll need a WordPress.org account ( comes in handy ). Then rate s2Member here Image
.
User avatar
Jason Caldwell
Lead Developer
Lead Developer
 
Posts: 4045
Joined: May 3, 2010
Location: Georgia / USA

Re: ERROR: Unable to modify Subscription (AliPay Payment)

Postby Jason Caldwell » October 23rd, 2011, 1:23 pm

Investigation completed.
Thank you. This bug has been identified and corrected in the development copy of s2Member Pro.

We'll include this fix in the next official release of s2Member Pro.
Until then, I'm attaching a patch file that you can use to fix an existing installation of s2Member Pro v111017. Please unzip and upload the attached file. Let it override your existing copy of:
/s2member-pro/includes/classes/gateways/alipay/alipay-button-in.inc.php
alipay-button-in.inc.php.zip
(2.61 KiB) Downloaded 90 times
~ Jason Caldwell / Lead Developer
& Zeitgeist Movie Advocate: http://www.zeitgeistmovie.com/

Is the s2Member plugin working for you? Please rate s2Member at WordPress.org.
You'll need a WordPress.org account ( comes in handy ). Then rate s2Member here Image
.
User avatar
Jason Caldwell
Lead Developer
Lead Developer
 
Posts: 4045
Joined: May 3, 2010
Location: Georgia / USA

Re: ERROR: Unable to modify Subscription (AliPay Payment)

Postby smallfish » October 27th, 2011, 11:51 pm

Thanks Jason
User avatar
smallfish
Registered User
Registered User
 
Posts: 4
Joined: October 18, 2011


Return to s2Member Plugin

Who is online

Users browsing this forum: No registered users and 0 guests

cron