Well, never thought this one would fail, but it did. I use a form to keep track of payment information, and I’ve configured a ‘Specific Post/Page ~ Sale Notification URLs’ to carry some data and initiate that script
‘http://example.com/wp-content/themes/Wanda/s2member.php?tid=%%txn_id%%&type=%%cv1%%¤t_eid=%%cv4%%’
Problem is, I test it directly like this ‘http://example.com/wp-content/themes/Wanda/s2member.php?tid=12345&type=event¤t_eid=129’. And it Works (saw the change in the database, confirmed twice), so the script is fine. And I got the email with the correct information.
Unfortunately, in all my 3 attempts, the Notification API didn’t fire off.
I’m currently using the single site license (which is installed on another site) and for testing on this site. This is the only culprit I can think of so far. If that’s the case, let me know, and I’ll upgrade to the multisite license.
I also found something suspicious in the Alipay IPN Log (that my Alipay configuration may not be correct), but it only showed up once, and I tested this for many times.
PHP v5.2.17 :: WordPress® v3.3.1 :: s2Member® v111220 :: s2Member® Pro v111220
Memory 40.09 MB :: Real Memory 40.25 MB :: Peak Memory 40.18 MB :: Real Peak Memory 40.25 MB
wanda.centilin.com/
User-Agent: Mozilla/4.0
array (
's2member_log' =>
array (
0 => 'Unable to verify POST vars. This is most likely related to an invalid AliPay® configuration. Please check: s2Member -> AliPay® Options.',
1 => 'If you're absolutely SURE that your AliPay® configuration is valid, you may want to run some tests on your server, just to be sure $_POST variables are populated, and that your server is able to connect to AliPay® over an HTTPS connection.',
2 => 's2Member uses the WP_Http class for remote connections; which will try to use cURL first, and then fall back on the FOPEN method when cURL is not available. On a Windows® server, you may have to disable your cURL extension. Instead, set allow_url_fopen = yes in your php.ini file. The cURL extension (usually) does NOT support SSL connections on a Windows® server.',
3 => 'array (
'discount' => '0.00',
'extra_common_param' => 'wanda.centilin.com|新春è”谊会|2|0.01å…ƒ/人',
'payment_type' => '1',
'subject' => 'wanda.centilin.com',
'trade_no' => '2012021066547394',
'buyer_email' => 'info@centilin.com',
'gmt_create' => '2012-02-10 15:04:16',
'notify_type' => 'trade_status_sync',
'quantity' => '1',
'out_trade_no' => '4f34c15b552a9~sp:1446:43800~1~120.36.100.48',
'seller_id' => '2088501820003753',
'notify_time' => '2012-02-10 15:04:24',
'body' => '新春è”谊会|2',
'trade_status' => 'TRADE_SUCCESS',
'is_total_fee_adjust' => 'N',
'total_fee' => '0.02',
'gmt_payment' => '2012-02-10 15:04:24',
'seller_email' => 'zling@centilin.com',
'price' => '0.02',
'buyer_id' => '2088701618471944',
'notify_id' => '121c4f5d93884a71c87e483c86a1353109',
'use_coupon' => 'N',
'sign_type' => 'MD5',
'sign' => 'f35a73ef12c7a6abb6a2bf5841af1ca4',
)',
),
)
PHP v5.2.17 :: WordPress® v3.3.1 :: s2Member® v111220 :: s2Member® Pro v111220
Memory 40.37 MB :: Real Memory 40.50 MB :: Peak Memory 40.46 MB :: Real Peak Memory 40.50 MB
wanda.centilin.com/
User-Agent: Mozilla/4.0
array (
'body' => '新春è”谊会|2',
'buyer_email' => 'info@centilin.com',
'buyer_id' => '2088701618471944',
'discount' => '0.00',
'extra_common_param' => 'wanda.centilin.com|新春è”谊会|2|0.01å…ƒ/人',
'gmt_create' => '2012-02-10 15:04:16',
'gmt_payment' => '2012-02-10 15:04:24',
'is_total_fee_adjust' => 'N',
'notify_id' => '121c4f5d93884a71c87e483c86a1353109',
'notify_time' => '2012-02-10 15:08:00',
'notify_type' => 'trade_status_sync',
'out_trade_no' => '4f34c15b552a9~sp:1446:43800~1~120.36.100.48',
'payment_type' => '1',
'price' => '0.02',
'quantity' => '1',
'seller_email' => 'zling@centilin.com',
'seller_id' => '2088501820003753',
'sign' => '8111325a4b22c3b1c7cede2e60be7565',
'sign_type' => 'MD5',
'subject' => 'wanda.centilin.com',
'total_fee' => '0.02',
'trade_no' => '2012021066547394',
'trade_status' => 'TRADE_SUCCESS',
'use_coupon' => 'N',
's2member_log' =>
array (
0 => 'IPN received on: Fri Feb 10, 2012 7:08:07 am UTC',
1 => 's2Member POST vars verified through a POST back to AliPay®.',
2 => 'AliPay® transaction identified as ( `TRADE_FINISHED|TRADE_SUCCESS` ).',
3 => 'IPN reformulated. Piping through s2Member's core/standard PayPal® processor as `txn_type` ( `web_accept` ).',
4 => 'Please check PayPal® IPN logs for further processing details.',
),
'customer_ip' => '120.36.100.48',
'referencing' => '1',
'item_number' => 'sp:1446:43800',
'invoice' => '4f34c15b552a9',
'last_name' => 'centilin.com',
'first_name' => 'info',
)
PHP v5.2.17 :: WordPress® v3.3.1 :: s2Member® v111220 :: s2Member® Pro v111220
Memory 40.44 MB :: Real Memory 40.75 MB :: Peak Memory 40.52 MB :: Real Peak Memory 40.75 MB
wanda.centilin.com/
User-Agent: Mozilla/4.0
array (
'body' => '新春è”谊会',
'buyer_email' => 'info@centilin.com',
'buyer_id' => '2088701618471944',
'discount' => '0.00',
'extra_common_param' => 'wanda.centilin.com|event新春è”谊会|2|0.01å…ƒ/人|125|',
'gmt_create' => '2012-02-10 23:09:27',
'gmt_payment' => '2012-02-10 23:09:42',
'is_total_fee_adjust' => 'N',
'notify_id' => 'aedbf89e8937519762dc91041444e88e09',
'notify_time' => '2012-02-10 23:09:42',
'notify_type' => 'trade_status_sync',
'out_trade_no' => '4f353311c5090~sp:1446:43800~~120.36.100.48',
'payment_type' => '1',
'price' => '0.02',
'quantity' => '1',
'seller_email' => 'zling@centilin.com',
'seller_id' => '2088501820003753',
'sign' => 'f2090fffed1cbc73b990fb5ca24ba0a2',
'sign_type' => 'MD5',
'subject' => 'wanda.centilin.com',
'total_fee' => '0.02',
'trade_no' => '2012021073542594',
'trade_status' => 'TRADE_SUCCESS',
'use_coupon' => 'N',
's2member_log' =>
array (
0 => 'IPN received on: Fri Feb 10, 2012 3:09:59 pm UTC',
1 => 's2Member POST vars verified through a POST back to AliPay®.',
2 => 'AliPay® transaction identified as ( `TRADE_FINISHED|TRADE_SUCCESS` ).',
3 => 'IPN reformulated. Piping through s2Member's core/standard PayPal® processor as `txn_type` ( `web_accept` ).',
4 => 'Please check PayPal® IPN logs for further processing details.',
),
'customer_ip' => '120.36.100.48',
'referencing' => '',
'item_number' => 'sp:1446:43800',
'invoice' => '4f353311c5090',
'last_name' => 'centilin.com',
'first_name' => 'info',
)
PHP v5.2.17 :: WordPress® v3.3.1 :: s2Member® v111220 :: s2Member® Pro v111220
Memory 40.44 MB :: Real Memory 40.75 MB :: Peak Memory 40.52 MB :: Real Peak Memory 40.75 MB
wanda.centilin.com/
User-Agent: Mozilla/4.0
array (
'body' => '新春è”谊会',
'buyer_email' => 'info@centilin.com',
'buyer_id' => '2088701618471944',
'discount' => '0.00',
'extra_common_param' => 'wanda.centilin.com|event新春è”谊会|2|0.01å…ƒ/人|129|',
'gmt_create' => '2012-02-10 23:26:09',
'gmt_payment' => '2012-02-10 23:26:18',
'is_total_fee_adjust' => 'N',
'notify_id' => '7eabc933b1cf4bbc43c6011d401c7aaf09',
'notify_time' => '2012-02-10 23:26:18',
'notify_type' => 'trade_status_sync',
'out_trade_no' => '4f3536ef0dead~sp:1446:43800~~120.36.100.48',
'payment_type' => '1',
'price' => '0.02',
'quantity' => '1',
'seller_email' => 'zling@centilin.com',
'seller_id' => '2088501820003753',
'sign' => 'b1249ffdf911f2d64605aea62d441618',
'sign_type' => 'MD5',
'subject' => 'wanda.centilin.com',
'total_fee' => '0.02',
'trade_no' => '2012021073720294',
'trade_status' => 'TRADE_SUCCESS',
'use_coupon' => 'N',
's2member_log' =>
array (
0 => 'IPN received on: Fri Feb 10, 2012 3:26:27 pm UTC',
1 => 's2Member POST vars verified through a POST back to AliPay®.',
2 => 'AliPay® transaction identified as ( `TRADE_FINISHED|TRADE_SUCCESS` ).',
3 => 'IPN reformulated. Piping through s2Member's core/standard PayPal® processor as `txn_type` ( `web_accept` ).',
4 => 'Please check PayPal® IPN logs for further processing details.',
),
'customer_ip' => '120.36.100.48',
'referencing' => '',
'item_number' => 'sp:1446:43800',
'invoice' => '4f3536ef0dead',
'last_name' => 'centilin.com',
'first_name' => 'info',
)
PHP v5.2.17 :: WordPress® v3.3.1 :: s2Member® v111220 :: s2Member® Pro v111220
Memory 40.44 MB :: Real Memory 40.75 MB :: Peak Memory 40.53 MB :: Real Peak Memory 40.75 MB
wanda.centilin.com/
User-Agent: Mozilla/4.0
array (
'body' => '新春è”谊会',
'buyer_email' => 'info@centilin.com',
'buyer_id' => '2088701618471944',
'discount' => '0.00',
'extra_common_param' => 'wanda.centilin.com|event新春è”谊会|2|0.01å…ƒ/人|132|',
'gmt_create' => '2012-02-10 23:38:07',
'gmt_payment' => '2012-02-10 23:38:16',
'is_total_fee_adjust' => 'N',
'notify_id' => '681801a2d7d2ba54da99554329b10ff909',
'notify_time' => '2012-02-10 23:38:16',
'notify_type' => 'trade_status_sync',
'out_trade_no' => '4f3539c8989ed~sp:1446:43800~~120.36.100.48',
'payment_type' => '1',
'price' => '0.02',
'quantity' => '1',
'seller_email' => 'zling@centilin.com',
'seller_id' => '2088501820003753',
'sign' => '27d29950b841b47f997265ce28f0b632',
'sign_type' => 'MD5',
'subject' => 'wanda.centilin.com',
'total_fee' => '0.02',
'trade_no' => '2012021073845594',
'trade_status' => 'TRADE_SUCCESS',
'use_coupon' => 'N',
's2member_log' =>
array (
0 => 'IPN received on: Fri Feb 10, 2012 3:38:29 pm UTC',
1 => 's2Member POST vars verified through a POST back to AliPay®.',
2 => 'AliPay® transaction identified as ( `TRADE_FINISHED|TRADE_SUCCESS` ).',
3 => 'IPN reformulated. Piping through s2Member's core/standard PayPal® processor as `txn_type` ( `web_accept` ).',
4 => 'Please check PayPal® IPN logs for further processing details.',
),
'customer_ip' => '120.36.100.48',
'referencing' => '',
'item_number' => 'sp:1446:43800',
'invoice' => '4f3539c8989ed',
'last_name' => 'centilin.com',
'first_name' => 'info',
)
Just in case you might need it, this is how I wrote the shortcode (and yes, all of these variables are tested and available. Well, all except the $uid):
[ s2Member-Pro-AliPay-Button sp=”1″ ids=”1446″ exp=”43800″ desc=”‘ . $event . ‘” custom=”example.com|event|’ . $event . ‘|’ . $num . ‘|’ . $amount . ‘|’ . $eid . ‘|’ . $uid . ‘” ra=”‘ . $amount_no * $num . ‘” image=”default” output=”anchor” / ]
-
This topic was modified 4 years, 11 months ago by
zhiling zou.