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.

Get PayPal address field to WordPress Data

Home Forums Community Forum Get PayPal address field to WordPress Data

This topic contains 4 replies, has 2 voices. Last updated by  Bruce 3 years, 6 months ago.

Topic Author Topic
Posted: Sunday Jun 23rd, 2013 at 2:03 am #52409
Koff
Username: koff

Hi,

I am using pro paypal forms to sign users to my membership site.

I need to send “real” goods to any member who registers.

What I would like to happen, is that the user will register on my site, will enter his details ( shipment address) on the paypal interface, and I will get this data back to the WP user data.

What is the way to achieve such a behavior?

Thanks,

Koff

List Of Topic Replies

Viewing 4 replies - 1 through 4 (of 4 total)
Author Replies
Author Replies
Posted: Monday Jun 24th, 2013 at 8:43 pm #52480
Bruce
Username: Bruce
Staff Member

Thank you for your inquiry.

Currently with s2Member to accept shipping information through a Pro Form, you can change the ns (no shipping) directive/attribute from 1 to 0 in your Shortcode. This will enable a Shipping Address field and tell PayPal that you are shipping physical goods so you can do things like add a shipping price.

However, s2Member does not store this information when it gets it back for security reasons and PCI compliance. You will need the User’s Shipping Address when it gets back, so you will have to have a developer set up catch during s2Member’s PayPal IPN handler to receive this information and send it to whatever service you’re using to ship your product, or store it in your database to get later. You can find the processes for PayPal here:

s2member-pro/includes/classes/gateways/paypal/

Also, in the /s2member/includes/classes/ directory, in all of the files starting with paypal-notify-in…


I’m sorry for the involved setup here. s2Member takes all of the steps it can to make shipping possible without overstepping into it and having to supporting shipping items itself, but that unfortunately still leaves a some custom code for those Users that do need to ship physical goods.

Let us know if you have any further questions about this. :-)

Posted: Tuesday Jun 25th, 2013 at 7:34 am #52543
Koff
Username: koff

Hi

Thank you for the answer.

Further Coding is not a problem.

Can you maybe point me to the right hook to catch this data, or maybe some example code to start with,
that could save some time.

Best regards,
Koff

Posted: Tuesday Jun 25th, 2013 at 8:07 am #52544
Koff
Username: koff

Just to make sure,

NS should maybe be 2?

paypal api

Determines where or not PayPal displays shipping address fields on the PayPal pages. For digital goods, this field is required, and you must set it to 1. It is one of the following values:

0 – PayPal displays the shipping address on the PayPal pages.
1 – PayPal does not display shipping address fields whatsoever.
2 – If you do not pass the shipping address, PayPal obtains it from the buyer’s account profile.

Posted: Tuesday Jun 25th, 2013 at 11:07 pm #52574
Bruce
Username: Bruce
Staff Member

NS should maybe be 2?

You could use 2 as well.

Can you maybe point me to the right hook to catch this data, or maybe some example code to start with,
that could save some time.

When you get s2Member Pro there’s a file in your Account page that has a bunch of example code that would be useful for you. I can tell you a good hook for doing this would be this:

ws_plugin__s2member_before_paypal_notify

You’d want to use some of s2Member utilities in the paypal-utilities.inc.php file to make sure that the variables that came are good, though.

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