Page 1 of 1

S2 Pro ignoring alt filter

PostPosted: April 23rd, 2011, 4:05 pm
by peterhuk
Hi J/C,

After configuring and testing the ws_plugin__s2member_redirection_url_after_modification
filter which works fine under S2 Standard.

After upgrading to Pro, the above filter is being totally ignored.

is there a pro vertion of above filter?

Many thanks

Pete..

Re: S2 Pro ignoring alt filter

PostPosted: April 23rd, 2011, 4:18 pm
by peterhuk
Please ignore, answer was available in
s2Member Pro / PayPal® Pro Forms -> Custom Return URLs On Success

Many thanks

Pete..

Re: S2 Pro ignoring alt filter

PostPosted: April 24th, 2011, 8:06 pm
by peterhuk
Another on topic quetion,

Is there a simular filter in Pro for 'ws_plugin__s2member_sp_access_link_gen'
I used the above to grab some information off returning buy now specific
post/page transactions.

The info is pushed into my function by the filter allowing to save info as
meta data. On S2 Pro, option does not appear available and I prefered not to set
up listerning $_GET routines if it is not necessary.

Any suggestions?

Thanks

Pete..

Re: S2 Pro ignoring alt filter

PostPosted: April 25th, 2011, 7:07 am
by Jason Caldwell
Thanks for your inquiry Pete. Glad to hear you found the Custom Return URLs for s2Member Pro Forms.

This Filter "ws_plugin__s2member_sp_access_link_gen" should continue to work with s2Member Pro. What information are you trying to grab exactly? Have you seen that Custom Return URLs can also be configured to receive data from the transaction? This is detailed in your Dashboard, under: s2Member -> PayPal Pro Forms -> Custom Return URLs on Success.

Re: S2 Pro ignoring alt filter

PostPosted: April 25th, 2011, 7:49 am
by peterhuk
Many thanks Jason,

Currently the buy now is being logged as meta data. The info used is:

Code: Select all
function vmp_sp_access($array){
   $data = array(
      'payment_date' => $array['paypal']['payment_date'],
      'txn_type' => $array['paypal']['txn_type'],
      'item_name' => $array['paypal']['item_name'],
      'payer_email' => $array['paypal']['payer_email'],
      'txn_id' => $array['paypal']['txn_id'],
      'item_number' => $array['paypal']['item_number'],
      'mc_gross' => $array['paypal']['mc_gross'],
      'best_time_2_call' => '',
      'note' => '',
      'contact_number' => ''
   );

   $user_id = $array['paypal']['sp_ids'];
   add_user_meta( $user_id, 'paid_support', $data );
}


This also allows for triggering alerts to admin for users who have made a buy now purchase.

I have set up both Pro and standard checkout and only the standard seem to trigger the above filter.
Pete..

Re: S2 Pro ignoring alt filter

PostPosted: April 25th, 2011, 8:22 am
by Jason Caldwell
I see. Yea, that's the wrong Hook then.

Try adding your Hook into this file.
/wp-content/mu-plugins/s2-hacks.php
( or name the file whatever you like best )
Code: Select all
<?php
add_action
("ws_plugin__s2member_during_paypal_notify_during_sp_access", "vmp_sp_access");
function vmp_sp_access($array=array()){
   $data = array(
      'payment_date' => $array['paypal']['payment_date'],
      'txn_type' => $array['paypal']['txn_type'],
      'item_name' => $array['paypal']['item_name'],
      'payer_email' => $array['paypal']['payer_email'],
      'txn_id' => $array['paypal']['txn_id'],
      'item_number' => $array['paypal']['item_number'],
      'mc_gross' => $array['paypal']['mc_gross'],
      'best_time_2_call' => '',
      'note' => '',
      'contact_number' => ''
   );
}
?>

Re: S2 Pro ignoring alt filter

PostPosted: April 25th, 2011, 8:55 am
by peterhuk
Jason,

Not sure if anyone has mentioned it but "You Are The Man!!".
That action worked perfectly.

Many thanks

Whilst I'm here just a quick on topic question.

Using paypal sandbox, when a reoccuring payments is set up with S2 Standard, a payment
is made straight away.

If I do a simular setup with Pro the reoccuring payment is set up but nothing is paid. It just
states that a payment is due for the same day but that is it.

Maybe this is just a problem with sandbox, but it migth be a bit late to findout when
I go live.

Any ideas?

Pete..

Re: S2 Pro ignoring alt filter

PostPosted: April 26th, 2011, 11:27 pm
by Jason Caldwell
Hi Pete. Thanks for the follow-up.

Yea, despite PayPal's claim that this problem has been fixed in the Sandbox, we've seen the same thing on our end. This is currently being worked on by PayPal support, but for now, it's to be expected in Sandbox Mode. The Sandbox does not always process Recurring Profiles to their full extent. You'll need to run some of your final tests on a live account.

Re: S2 Pro ignoring alt filter

PostPosted: April 27th, 2011, 2:11 am
by peterhuk
Many thanks Jason

Pete..