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.

About: Sacha Greif

Sorry, I've not written a description yet. I'll get to it soon!


Topics I'm Subscribed To

Viewing 19 topics - 1 through 19 (of 19 total)
Topic Count Last Reply
Paymill + s2Member

By:  Sacha Greif in: Community Forum

voices: 2
replies: 1

4 years ago  Bruce

s2member + DigitalDelivery?

By:  Sacha Greif in: Community Forum

voices: 2
replies: 1

4 years, 3 months ago  Cristián Lávaque

braintree – any plans to support this gateway

By:  guil z in: Community Forum

voices: 3
replies: 5

4 years, 4 months ago  Sacha Greif

My MailChimp Integration: Daily Email Digest

By:  Sacha Greif in: Community Forum

voices: 1
replies: 0

4 years, 6 months ago  Sacha Greif

Help with paypal-central-ipn.php and IPN

By:  Sacha Greif in: Community Forum

voices: 4
replies: 13

4 years, 6 months ago  Cristián Lávaque

Reasons for API Notifications not working? 1 2

By:  Sacha Greif in: Community Forum

voices: 4
replies: 35

4 years, 7 months ago  Jason (Lead Developer)

Alternatives to PayPal in Europe

By:  Sacha Greif in: Community Forum

voices: 2
replies: 2

4 years, 7 months ago  Sacha Greif

Where do I set Max Failed Payments?

By:  Sacha Greif in: Community Forum

voices: 3
replies: 7

4 years, 7 months ago  Cristián Lávaque

Notifications: "item_number" is always "1"?

By:  Sacha Greif in: Community Forum

voices: 2
replies: 1

4 years, 7 months ago  Raam Dev

Billing Update form is empty

By:  Sacha Greif in: Community Forum

voices: 3
replies: 6

4 years, 8 months ago  Sacha Greif

Show if a member has cancelled?

By:  Sacha Greif in: Community Forum

voices: 2
replies: 6

4 years, 8 months ago  Cristián Lávaque

Sign-up form shown again on confirmation page

By:  Sacha Greif in: Community Forum

voices: 2
replies: 3

4 years, 8 months ago  Cristián Lávaque

Can't have multiple pro forms on same page?

By:  Sacha Greif in: Community Forum

voices: 3
replies: 3

4 years, 8 months ago  Sacha Greif

Losing Translation Files when Upgrading

By:  Sacha Greif in: Translations

voices: 3
replies: 2

4 years, 9 months ago  Eduan

Letting users register right after Paypal

By:  Sacha Greif in: Community Forum

voices: 3
replies: 5

4 years, 10 months ago  Sacha Greif

Strange unwanted redirect bug

By:  Sacha Greif in: Community Forum

voices: 3
replies: 5

4 years, 10 months ago  Jason (Lead Developer)

Import members who don't have an account

By:  Sacha Greif in: Community Forum

voices: 2
replies: 3

4 years, 10 months ago  Cristián Lávaque

french translation

By:  Jean-Michel MEYER in: Translations

voices: 5
replies: 9

4 years, 10 months ago  Cristián Lávaque

Viewing 19 topics - 1 through 19 (of 19 total)

Topics I've Started

Viewing 17 topics - 1 through 17 (of 17 total)
Topic Count Last Reply
Paymill + s2Member

By:  Sacha Greif in: Community Forum

voices: 2
replies: 1

4 years ago  Bruce

s2member + DigitalDelivery?

By:  Sacha Greif in: Community Forum

voices: 2
replies: 1

4 years, 3 months ago  Cristián Lávaque

My MailChimp Integration: Daily Email Digest

By:  Sacha Greif in: Community Forum

voices: 1
replies: 0

4 years, 6 months ago  Sacha Greif

Help with paypal-central-ipn.php and IPN

By:  Sacha Greif in: Community Forum

voices: 4
replies: 13

4 years, 6 months ago  Cristián Lávaque

Reasons for API Notifications not working? 1 2

By:  Sacha Greif in: Community Forum

voices: 4
replies: 35

4 years, 7 months ago  Jason (Lead Developer)

Alternatives to PayPal in Europe

By:  Sacha Greif in: Community Forum

voices: 2
replies: 2

4 years, 7 months ago  Sacha Greif

Where do I set Max Failed Payments?

By:  Sacha Greif in: Community Forum

voices: 3
replies: 7

4 years, 7 months ago  Cristián Lávaque

Notifications: "item_number" is always "1"?

By:  Sacha Greif in: Community Forum

voices: 2
replies: 1

4 years, 7 months ago  Raam Dev

Billing Update form is empty

By:  Sacha Greif in: Community Forum

voices: 3
replies: 6

4 years, 8 months ago  Sacha Greif

Show if a member has cancelled?

By:  Sacha Greif in: Community Forum

voices: 2
replies: 6

4 years, 8 months ago  Cristián Lávaque

Sign-up form shown again on confirmation page

By:  Sacha Greif in: Community Forum

voices: 2
replies: 3

4 years, 8 months ago  Cristián Lávaque

Can't have multiple pro forms on same page?

By:  Sacha Greif in: Community Forum

voices: 3
replies: 3

4 years, 8 months ago  Sacha Greif

Losing Translation Files when Upgrading

By:  Sacha Greif in: Translations

voices: 3
replies: 2

4 years, 9 months ago  Eduan

Letting users register right after Paypal

By:  Sacha Greif in: Community Forum

voices: 3
replies: 5

4 years, 10 months ago  Sacha Greif

Strange unwanted redirect bug

By:  Sacha Greif in: Community Forum

voices: 3
replies: 5

4 years, 10 months ago  Jason (Lead Developer)

Import members who don't have an account

By:  Sacha Greif in: Community Forum

voices: 2
replies: 3

4 years, 10 months ago  Cristián Lávaque

Viewing 17 topics - 1 through 17 (of 17 total)

My Latest Replies (From Various Topics)

Viewing 25 replies - 1 through 25 (of 50 total)
Author Replies
Author Replies
Posted: Monday Sep 10th, 2012 at 9:11 am #24746
Sacha Greif
Username: sachag

To be honest any gateway will be great as long as
1) it’s available in France
and
2) it’s not PayPal ;)

Posted: Sunday Sep 9th, 2012 at 6:17 am #24683
Sacha Greif
Username: sachag

Just wanted to say that Braintree is now available in Europe, too. As far as I know, none of the gateways supported by s2member are available in France except for PayPal, and even then not all features are available (for example, in France you cannot charge users on your site for recurring subscriptions).

So it would be nice to get a little more choice of gateways, starting with Braintree and maybe GoCardless too :)

Posted: Saturday Jun 16th, 2012 at 10:22 pm #16698
Sacha Greif
Username: sachag

Hopefully this will be the last update on this. Things were still not working because the “custom” POST variable was not being properly replaced by the new domain.

This is the code I was using:

foreach($data as $key => $value){
  if(is_string($value)){
    $value = str_ireplace('www.oldomain.com', 'www.newdomain.com', $value);
  }
}

For some unknown reason, this was not working. So I decided to simply replace it by:

$data["custom"]="www.newdomain.com";

And now everything seems to work at last!

Posted: Tuesday Jun 12th, 2012 at 11:20 pm #16328
Sacha Greif
Username: sachag

It worked!

Well, I got rid of the errors in the IPN logs at least. I haven’t received the email notification, but that might be because I’m using old transaction data to test my setup and S2Member (or PayPal) doesn’t want to fire the same IPN twice. I’m a little burned out from working on this right now, so I’ll just assumes it really does work for now :)

Anyway, I’ll keep my fingers crossed that the notification does fire next time a real IPN comes through. I’ll keep you posted. Thanks a lot for your help!

Posted: Tuesday Jun 12th, 2012 at 10:26 pm #16317
Sacha Greif
Username: sachag

I had completely forgotten about the IPN logs. I checked them and it turns out there’s an error:

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\',
  \'payer_id\' => \'EFKFZRFE******\',
  \'option_selection1\' => \'www.nrfight.tv\',
  \'option_selection2\' => \'89.90.******\',
  \'ipn_track_id\' => \'3838092******\',
  \'invoice\' => \'4ed531804a******\',
  \'charset\' => \'windows-1252\',
  \'payment_gross\' => \'\',
  \'verify_sign\' => \'AFcWxV21C7fd0v3bYYYRCpSSRl31AzzQ64U******\',
  \'item_name\' => \'Membre NRFight\',
  \'txn_type\' => \'subscr_payment\',
  \'receiver_id\' => \'CKBECGS******\',
  \'payment_fee\' => \'\',
  \'mc_currency\' => \'EUR\',
  \'transaction_subject\' => \'Membre NRFight\',
  \'custom\' => \'www.nrfight.tv\',
  \'protection_eligibility\' => \'Ineligible\',
  \'payer_status\' => \'verified\',
  \'first_name\' => \'Matthieu\',
  \'subscr_id\' => \'I-A71CCSB******\',
  \'mc_gross\' => \'10.00\',
  \'payment_date\' => \'05:14:34 Jun 06, 2012 PDT\',
  \'payment_status\' => \'Completed\',
  \'business\' => \'info@nrfight.com\',
  \'item_number\' => \'1\',
  \'last_name\' => \'******\',
  \'txn_id\' => \'41Y21071VD8******\',
  \'mc_fee\' => \'0.43\',
  \'resend\' => \'true\',
  \'payment_type\' => \'instant\',
  \'notify_version\' => \'3.4\',
  \'option_name1\' => \'Originating Domain\',
  \'option_name2\' => \'Customer IP Address\',
  \'payer_email\' => \'matt******@******.com\',
  \'receiver_email\' => \'******@nrfight.com\',
  \'residence_country\' => \'FR\',
)',
  ),

Just to be clear, IPN are working fine from PayPal to NRFight.tv (the new domain). It’s only when PayPal sends the IPN to NRFight.com (the old domain), and NRFight.com forwards it to NRFight.tv that this problem occurs.

  • This reply was modified 4 years, 6 months ago by  Sacha Greif.
  • This reply was modified 4 years, 6 months ago by  Sacha Greif.
  • This reply was modified 4 years, 6 months ago by  Sacha Greif.
  • This reply was modified 4 years, 6 months ago by  Sacha Greif.
Posted: Tuesday Jun 12th, 2012 at 8:13 pm #16303
Sacha Greif
Username: sachag

Any help with this? All I’d like to know is where to look for the class or function that deals with incoming notifications in the S2Member plugin files?

Posted: Saturday Jun 9th, 2012 at 2:06 am #16042
Sacha Greif
Username: sachag

I’ve done exactly this. I’m at a point where everything seems to be set up properly, the POST variables are sent from one site to the other, yet the notifications are not firing from new-domain.com?s2member_paypal_notify=1

If there are any common reasons why this might happen I’d love to know, otherwise I would also like to know where this behavior is handled in the S2member plugin files so that I can try and figure out what’s happening by myself.

Posted: Friday Jun 8th, 2012 at 9:34 pm #16011
Sacha Greif
Username: sachag

I’ve confirmed that the cURL call is passing the POST variables from one domain to the other, but nothing happens after this. Any idea why? If not, could you tell me where the code that deals with this is located in the S2Member plugin files?

Also, for some reason PayPal seems to be sending each notification twice… Will that be a problem, or is S2Member smart enough to ignore the second one?

Posted: Thursday Jun 7th, 2012 at 7:55 pm #15863
Sacha Greif
Username: sachag

@Jason thanks for dropping by. This is a very good summary of my problem up to now. Since I still have access to the old domain, it seems like the simplest solution would be to set up a forwarding script.

I tried that, and for some reason it’s not working. I created a separate thread about this since it’s a pretty specific issue, and would appreciate any help you can provide:

http://www.s2member.com/forums/topic/help-with-paypal-central-ipn-php-and-ipn/

Posted: Thursday Jun 7th, 2012 at 7:51 pm #15860
Sacha Greif
Username: sachag

That’s good to know! I can stay with PayPal for now, it was more of a medium/long-term inquiry.

I’m sure adding new gateways is not trivial, so I just wanted to let you guys know that there’s demand for more payment options :)

Posted: Thursday Jun 7th, 2012 at 7:48 pm #15858
Sacha Greif
Username: sachag

I did update the global IPN URL, and it wasn’t effective. And I got in touch with PayPal support directly and they told me you couldn’t change individual IPN URL, sorry I don’t have a more specific source.

Posted: Wednesday Jun 6th, 2012 at 9:09 pm #15740
Sacha Greif
Username: sachag

Just tried it, everything seems to be ok:

http://www.nrfight.tv/s2member-server-check-120526.php

Posted: Wednesday Jun 6th, 2012 at 8:54 pm #15736
Sacha Greif
Username: sachag

I have confirmed with PayPal support that there is no way to change the IPN url for existing users, unless these users recreate a new account.

My only hope is now to set up the redirection script to redirect notifications from the old site to the new.

Posted: Tuesday Jun 5th, 2012 at 10:55 pm #15625
Sacha Greif
Username: sachag

That’s what I did. I don’t have high hopes for PayPal support, but we’ll see…

And by the way, I haven’t got the script to work yet. Although the script gets the PayPal POST request, it doesn’t redirect it to the new notification URL. I’m in the process of debugging it, I’ll keep you posted.

Edit: it seems like the cURL call in paypal-central-ipn.php is failing, but I’m not sure why. I understand if it’s out of the scope of this question though.

  • This reply was modified 4 years, 7 months ago by  Sacha Greif.
Posted: Tuesday Jun 5th, 2012 at 8:57 pm #15604
Sacha Greif
Username: sachag

This seems like a very relevant paragraph from the docs:

*Quick Tip* In addition to the default IPN settings inside your PayPal® account, the IPN URL is also set on a per-transaction basis by the special PayPal® Button Code that s2Member provides you with. In other words, if you have multiple sites operating on one PayPal® account, that’s OK. s2Member dynamically sets the IPN URL for each transaction. The result is that the IPN URL configured from within your PayPal® account, becomes the default, which is then overwritten on a per-transaction basis. In fact, PayPal® recently updated their system to support IPN URL preservation. One PayPal® account can handle multiple sites, all using different IPN URLs.

So this is what happened: the users who signed up before the domain change still have the old IPN notification URL in their profile. The question now becomes, how can I change it?

Alternatively, the second paragraph provides a possible workaround:

If you’re using a single PayPal® Pro account for multiple cross-domain installations, and you need to receive IPN notifications for each of your domains; you’ll want to create a central IPN processing script that scans variables in each IPN response, forking itself out to each of your individual domains. In rare cases when this is necessary, you’ll find two variables in all IPN responses for s2Member. The originating domain name ( i.e. http://www.nrfight.tv ) will always be included somewhere within, either: custom and/or rp_invoice_id; depending on the type of transaction. These variables can be used to test incoming IPNs, and fork to the proper installation. For your convenience, an example script has been provided inside: /s2m-pro-extras/paypal-central-ipn.php. You can download all Extras here: s2m-pro-extras.zip.

So I’m going to see if that example script can help me implement a script that redirects all the nrfight.com IPN notifications to nrfight.tv.

Posted: Tuesday Jun 5th, 2012 at 8:49 pm #15602
Sacha Greif
Username: sachag

It turns out that my rra parameter is already set to 1 or 2 (for PayPal standard or Pro).

But PayPal does let you set it higher than 2, or even set it to unlimited tries. It’s not very clear from the wording in the documentation is you can set rra=3 when using PayPal Pro, or if you’re limited to 2?

Posted: Tuesday Jun 5th, 2012 at 6:54 am #15468
Sacha Greif
Username: sachag

Thanks, that helps a lot!

Posted: Tuesday Jun 5th, 2012 at 6:54 am #15467
Sacha Greif
Username: sachag

I already changed the custom values for all the users, so I don’t think that was it.

And I don’t know exactly how S2Member works, but I assume that if PayPal was sending the notifications to the right URL, S2Member would receive them… so it seems like the problem is probably with PayPal?

Posted: Monday Jun 4th, 2012 at 11:32 pm #15421
Sacha Greif
Username: sachag

So I’ve found that you can set this number on a user-per-user basis via the PayPal admin panel, by listing all your subscription profiles, clicking on one, and then clicking “edit”.

It remains to be seen if you can set this number on a global level for all new subscriptions, or if it can be set via the PayPal API when creating a new profile.

This Stack Overflow post seems to indicate that this variable can be set through the API somehow:

http://stackoverflow.com/questions/9253891/paypal-subscription-payment-failed

Posted: Monday Jun 4th, 2012 at 11:22 pm #15418
Sacha Greif
Username: sachag

OK, I think I got it. The reason for the problem might be that I changed the site’s domain, from nrfight.com to nrfight.tv.

Here’s the profile for a user who is not triggering notifications, and as you can see it still says “nrfight.com”:

The domain change now seems like a pretty obvious reason for the problem. But since I changed all the URLs from within S2Member, I thought PayPal would be smart enough to know about the move…

Now it remains to be seen how I can fix this mess from within PayPal… :(

Oh and by the way, editing a user’s profile within PayPal triggers a S2Member modification notification, so it’s a good way to test which users are hooked up and which are not.

  • This reply was modified 4 years, 7 months ago by  Sacha Greif.
Posted: Monday Jun 4th, 2012 at 11:08 pm #15417
Sacha Greif
Username: sachag

Thanks a lot for taking a look, I really appreciate you taking the time to help me out!

Some users don’t have payment information because they’re using the site for free.

But even users with all fields correctly filled in (paid subsc gateway, paid subscr id, custom value, etc.) still fail to trigger the notifications when they make a Paypal payment.

Posted: Monday Jun 4th, 2012 at 8:30 am #15355
Sacha Greif
Username: sachag

Nope, didn’t fix the problem… And by the way yes, all my Paypal buttons were created with S2member.

Let me know if you have any idea of how I can debug or at least identify the problem, I’ll keep trying things out as well.

Posted: Monday Jun 4th, 2012 at 3:27 am #15320
Sacha Greif
Username: sachag

OK, I changed the custom values. I don’t know if it’ll have an impact on the problem, but for what it’s worth here’s the code I used to do that, maybe it’ll help others:

/*-----------------------------------------------------------------------------------*/
/*                                 Fill in all custom values                         */
/*-----------------------------------------------------------------------------------*/
add_action('admin_menu', 'fill_custom_values_menu');

function fill_custom_values_menu() {
	add_options_page('Fill Custom Values', 'Custom Values', 'manage_options', 'fill-custom-values', 'fill_custom_values');
}

function fill_custom_values(){
	global $wpdb;
	echo '<table>';
	$sort = "user_nicename";
	$aUsersID = $wpdb->get_col( $wpdb->prepare(
		"SELECT $wpdb->users.ID FROM $wpdb->users ORDER BY %s ASC"
		, $sort ));
	foreach ( $aUsersID as $iUserID ) :
		$user = get_userdata( $iUserID );
		$custom_value =  get_user_meta($iUserID, "wp_s2member_custom", true);
		$new_custom_value = "YOUR_NEW_VALUE";
	
		echo "<tr><td>".$user->first_name ." " .$user->last_name."</td>";
		if($custom_value != $new_custom_value){
			update_user_meta( $iUserID, "wp_s2member_custom", $new_custom_value );
			echo '<td>Changed "'.$custom_value.'" to "'.$new_custom_value.'"</td>';
		}else{
			echo '<td>Nothing to change </td>';
		}
		echo "</tr>";
	endforeach; // end the users loop.
	echo '</table>';
}
Posted: Sunday Jun 3rd, 2012 at 11:59 pm #15314
Sacha Greif
Username: sachag

OK, I might have an explanation. I’ve compared the profiles of users who trigger notifications and users who don’t, and the difference is that for users who don’t, their “Custom Value” field is empty.

I’m not sure why that is, but maybe it’s because they signed up a long time ago when I was using a different version of S2Member and didn’t have S2Member Pro?

In any case, to test out my theory I’d like to fill in the “Custom Value” field for every user on the site and see if I get more notifications. Is there a quick way to do that by any chance, or should I hack a custom function?

Posted: Sunday Jun 3rd, 2012 at 11:04 pm #15308
Sacha Greif
Username: sachag

I can confirm that the notifications are only working maybe 50% of the time.

I also checked the PayPal logs, and the transactions that are not sending out notifications also don’t appear in the log.

So it seems that there’s a breakdown of communication somewhere between PayPal and S2Member, but only for some of the transactions.

Viewing 25 replies - 1 through 25 (of 50 total)

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.