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.

Payment notification not working

Home Forums Community Forum Payment notification not working

Tagged: 

This topic contains 5 replies, has 2 voices. Last updated by  Cristián Lávaque 3 years, 12 months ago.

Topic Author Topic
Posted: Sunday Jan 6th, 2013 at 1:45 am #36369
Gaba
Username: upper

Hi,

What we need:

We need to upgrade client’s file upload limit based on subscription each he paid/upgrade.

We have setup

IPN log (letest 2 entries) from paypal-ipn.log:

PHP v5.2.17 :: WordPress® v3.5 :: s2Member® v121213
Memory 37.20 MB :: Real Memory 37.50 MB :: Peak Memory 37.27 MB :: Real Peak Memory 37.50 MB
copyrightwebstamp.com/?s2member_paypal_notify=1
User-Agent: 
array (
  'test_ipn' => '1',
  'payment_type' => 'instant',
  'payment_date' => '22:15:20 Jan 02, 2013 PST',
  'payment_status' => 'Completed',
  'address_status' => 'confirmed',
  'payer_status' => 'unverified',
  'first_name' => 'John',
  'last_name' => 'Smith',
  'payer_email' => 'buyer@paypalsandbox.com',
  'payer_id' => 'TESTBUYERID01',
  'address_name' => 'John Smith',
  'address_country' => 'United States',
  'address_country_code' => 'US',
  'address_zip' => '95131',
  'address_state' => 'CA',
  'address_city' => 'San Jose',
  'address_street' => '123, any street',
  'receiver_email' => 'seller@paypalsandbox.com',
  'receiver_id' => 'TESTSELLERID1',
  'residence_country' => 'US',
  'item_name1' => 'something',
  'item_number1' => 'AK-1234',
  'quantity1' => '1',
  'tax' => '2.02',
  'mc_currency' => 'USD',
  'mc_fee' => '0.44',
  'mc_gross_1' => '9.34',
  'mc_handling' => '2.06',
  'mc_handling1' => '1.67',
  'mc_shipping' => '3.02',
  'mc_shipping1' => '1.02',
  'txn_type' => 'cart',
  'txn_id' => '2013615',
  'notify_version' => '2.4',
  'custom' => 'xyz123',
  'invoice' => 'abc1234',
  'charset' => 'windows-1252',
  'verify_sign' => 'AFcWxV21C7fd0v3bYYYRCpSSRl31AFdxgZS4L.TsNUmKt0A05a8bg2F8',
  's2member_log' => 
  array (
    0 => 'IPN received on: Thu Jan 3, 2013 6:56:41 am UTC',
    1 => 's2Member POST vars verified through a POST back to PayPal®.',
    2 => 'Unable to verify `$_SERVER["HTTP_HOST"]`. Please check the `custom` value in your Button Code. It MUST start with your domain name.',
  ),
  'subscr_gateway' => 'paypal',
)

PHP v5.2.17 :: WordPress® v3.5 :: s2Member® v121213
Memory 37.20 MB :: Real Memory 37.50 MB :: Peak Memory 37.27 MB :: Real Peak Memory 37.50 MB
copyrightwebstamp.com/?s2member_paypal_notify=1
User-Agent: 
array (
  'test_ipn' => '1',
  'payment_type' => 'instant',
  'payment_date' => '22:15:20 Jan 02, 2013 PST',
  'payment_status' => 'Completed',
  'address_status' => 'confirmed',
  'payer_status' => 'unverified',
  'first_name' => 'Najeeb',
  'last_name' => 'Ahmad',
  'payer_email' => 'buyer@paypalsandbox.com',
  'payer_id' => 'TESTBUYERID01',
  'address_name' => 'John Smith',
  'address_country' => 'United States',
  'address_country_code' => 'US',
  'address_zip' => '95131',
  'address_state' => 'CA',
  'address_city' => 'San Jose',
  'address_street' => '123, any street',
  'receiver_email' => 'seller@paypalsandbox.com',
  'receiver_id' => 'TESTSELLERID1',
  'residence_country' => 'US',
  'item_name1' => 'something',
  'item_number1' => 'AK-1234',
  'quantity1' => '1',
  'tax' => '2.02',
  'mc_currency' => 'USD',
  'mc_fee' => '0.44',
  'mc_gross_1' => '9.34',
  'mc_handling' => '2.06',
  'mc_handling1' => '1.67',
  'mc_shipping' => '3.02',
  'mc_shipping1' => '1.02',
  'txn_type' => 'cart',
  'txn_id' => '2013615',
  'notify_version' => '2.4',
  'custom' => 'xyz123',
  'invoice' => 'abc1234',
  'charset' => 'windows-1252',
  'verify_sign' => 'An5ns1Kso7MWUdW4ErQKJJJ4qi4-A4Eb6GJ4PmSBnuI5VzzhGoPGN0aX',
  's2member_log' => 
  array (
    0 => 'IPN received on: Thu Jan 3, 2013 7:52:06 am UTC',
    1 => 's2Member POST vars verified through a POST back to PayPal®.',
    2 => 'Unable to verify `$_SERVER["HTTP_HOST"]`. Please check the `custom` value in your Button Code. It MUST start with your domain name.',
  ),
  'subscr_gateway' => 'paypal',
)

API/Notifications Settings

Under Payment Notifications we have set following URL
http://copyrightwebstamp.com/upgrade-subscription.php?var=%%first_name%%

Script under upgrade-subscription.php file is:

<?php
mail('ceo@najeebmedia.com', 'Hello man','Hellow man '.$_REQUEST['var']);
?>

Problem

Our script is not running whenever payment is made. You are requested to help us out to fix this issue.

List Of Topic Replies

Viewing 5 replies - 1 through 5 (of 5 total)
Author Replies
Author Replies
Posted: Monday Jan 7th, 2013 at 8:04 pm #36509

Hi Gaba.

The log says your custom attribute is wrong, it has to start with your domain name. [hilite path]Dashboard -› s2Member® -› PayPal® Buttons -› Shortcode Attributes (Explained)[/hilite]

The button generator will populate that attribute correctly for you. [hilite path]Dashboard -› s2Member® -› PayPal® Buttons -› Membership Level # Buttons[/hilite]

‘custom’ => ‘xyz123’,

2 => ‘Unable to verify `$_SERVER[“HTTP_HOST”]`. Please check the `custom` value in your Button Code. It MUST start with your domain name.’,

Fix that first and see if then notifications happen, please. If they still don’t, then try the suggestions in this article: Knowledge Base » Common Troubleshooting Tips.

If you’re using the post-registration auto-login hack, remove it for your tests, since it’s known to cause the notifications API to not work.

I hope that helps.

Posted: Wednesday Jan 9th, 2013 at 2:37 am #36690
Gaba
Username: upper

Thanks for reply, well IPN Log I pasted was wrong, as it was showing IPN txn being tested from Sandbox Tool, here is IPN log:

PHP v5.2.17 :: WordPress® v3.5 :: s2Member® v121213
Memory 37.20 MB :: Real Memory 37.50 MB :: Peak Memory 37.27 MB :: Real Peak Memory 37.50 MB
copyrightwebstamp.com/?s2member_paypal_notify=1
User-Agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11
array (
  's2member_log' => 
  array (
    0 => 'Unable to verify $_POST vars. This is most likely related to an invalid configuration of s2Member, or a problem with server compatibility.',
    1 => 'If you\'re absolutely SURE that your 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/communicate with your Payment Gateway 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; and 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 => 'Please see this thread: `http://www.s2member.com/forums/topic/ideal-server-configuration-for-s2member/` for details regarding the ideal server configuration for s2Member.',
    4 => 'array (
  \'s2member_paypal_notify\' => \'1\',
)',
  ),
)

And I checked custom variable, it is started with domain name.

Posted: Wednesday Jan 9th, 2013 at 7:48 am #36736
Posted: Wednesday Jan 9th, 2013 at 12:21 pm #36792
Gaba
Username: upper

Also when I try to checkout to buy subscription (in sandbox mode) I got this error:

https://docs.google.com/a/najeebmedia.com/file/d/0B2u2KiDYT-rnYVp0dW80RXBWNmM/edit

any idea?

Posted: Friday Jan 11th, 2013 at 6:37 am #36948

Well, it says there that it’s a temporary error they were having, apparently something on their side, not your fault.

Still, what I’d recommend is to not use the Sandbox at all, instead do live transactions, 1 cent is fine. Once you have those working without problems in your tests, if you can, do a final test for the actual amount you’ll charge your customers to make sure it works fine.

Viewing 5 replies - 1 through 5 (of 5 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.