Page 1 of 1

Address missing in IPN processing

PostPosted: July 24th, 2010, 7:42 pm
by martonic
Hi again Jason,

I'm using this hook

ws_plugin__s2member_during_paypal_notify_during_subscr_signup_w_update_vars

(all of our transactions are "upgrades")

and logging all of the data coming from get_defined_vars() through the hook.

There is a "paypal" key which contains lots of information - however, the only address information that is passed through is a country code (in a key called "residence_country").

What happened to the street, city, state and zip parts of the address data that were originally sent through the IPN? :?:

Re: Address missing in IPN processing

PostPosted: July 28th, 2010, 6:55 am
by Jason Caldwell
PayPal only sends that information in the IPN response whenever a billing address is provided during checkout. From what I understand, this is intended as a form of security ( Customer privacy ). So although the "Buyer Information" variables are documented here, they are not passed back to s2Member's IPN processor, unless your Button Code specifically asks for an address.

The solution ( although I've not tested this myself ), is to set:
Code: Select all
<input type="hidden" name="no_shipping" value="2" />
which requires a shipping address.

~ although I'm not sure that will work with a "Subscription" button; you'll have to test it with the Full version of s2Member's Button Code ( change no_shipping=2 ). Also, you might try poking around on X.com. See if you can find additional information. Please feel free to share any additional information you can.

Re: Address missing in IPN processing

PostPosted: July 31st, 2010, 6:57 pm
by martonic
Hi Jason,

Thank you. I will see what we get using a live purchase.

IMPORTANT: Address missing in IPN processing

PostPosted: August 23rd, 2010, 7:00 pm
by martonic
Hi again Jason,

Please perform this simple, but very important update next time you get around to it.

In

s2member\includes\templates\buttons\paypal-checkout-button.html

and

s2member\includes\templates\buttons\paypal-sp-checkout-button.html

you have

Code: Select all
<input type="hidden" name="no_shipping" value="1" />


Please simply change that (in both files) to:

Code: Select all
<input type="hidden" name="no_shipping" value="0" />


This does not change anything from the user's standpoint, nor the administrator's, but it does allow the address fields - when available, as they are nearly all the time - to come through from Paypal, where they can be accessed in the following hooks:

ws_plugin__s2member_during_paypal_notify_after_subscr_signup_wo_update_vars
s_plugin__s2member_during_paypal_notify_during_subscr_signup_w_update_vars
ws_plugin__s2member_during_paypal_notify_during_subscr_eot_refund_reversal

Once you do this, I can remove the LAST REMAINING HACK from my client's WP configuration!

Thanks in advance,

Marty

Re: Address missing in IPN processing

PostPosted: August 27th, 2010, 2:04 pm
by Jason Caldwell
Hi Marty. Thanks for the great tip.
~ I'll be sure to check that out.


I'm sure you're busy, but if you have time,
please consider testing the BETA release of s2Member v3.2.3.
viewtopic.php?f=4&t=522&p=2604&hilit=beta#p2604
~ We'll see about getting that change in the official release of 3.2.3 for you.