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.

Paypal Pro-Forms Shipping Address?

Home Forums Community Forum Paypal Pro-Forms Shipping Address?

This topic contains 21 replies, has 4 voices. Last updated by  Cristián Lávaque 4 years, 6 months ago.

Topic Author Topic
Posted: Thursday May 31st, 2012 at 3:18 pm #15074
Jeff Agard
Username: tlgc

My site deals with the selling of physical products. I need a way to collect the shipping address from a user on the checkout page. My checkout pages use Paypal Pro-Forms and not Paypal Buttons. I saw the documentation on the NS=”” short code attribute, but it doesn’t seem to work with Pro Forms?

Can you point me in the right direction?

Thanks!

List Of Topic Replies

Viewing 21 replies - 1 through 21 (of 21 total)
Author Replies
Author Replies
Posted: Friday Jun 1st, 2012 at 3:12 am #15131

Hi Jeff.

The [hilite mono]ns[/hilite] attribute is a bit different in the pro-form than the button.

ns=”1″ The no_shipping directive. Possible values: 0 = prompt for an address, but do not require one, 1 = do not prompt for a shipping address, 2 = prompt for an address, and require one. Applies only to PayPal® Express Checkout; because Pro Forms do not ask for a Shipping Address. However, you may request a Shipping Address by creating Custom Fields under: s2Member -> General Options -> Registration/Profile Fields. Not valid when cancel=”1″.

I hope that helps. :)

Posted: Friday Jun 1st, 2012 at 4:21 pm #15198

I am having the same problem. I have ns=”2″ but it is not working, paypal is not receiving a shipping address. I have also created the shipping address via creating custom fields during registration, but not sure how to send that to paypal.

Did you figure out a solution?

Posted: Friday Jun 1st, 2012 at 6:27 pm #15204
Jeff Agard
Username: tlgc

I will try the custom fields method, but I’m hearing that that will not send the shipping address to Paypal? Is there a way to send that information over to Paypal?

Thanks!

Posted: Saturday Jun 2nd, 2012 at 4:35 am #15243

Jeff, right, the custom registration fields aren’t sent to PayPal. You’re using a pro-form, right? With Express Checkout or PayPal Pro?

Meghan, are you using a button or pro-form, if the latter, Express Checkout or PayPal Pro?

From what I understand, ns=”2″ will work with the PayPal Standard button and the pro-form with Express Checkout. In those cases, the address would be collected over at PayPal during checkout.

Posted: Sunday Jun 3rd, 2012 at 2:22 pm #15284

I am using PayPal Pro Forms. I have set up the form to have a free trial and recurring monthly charges.

-Meghan

Posted: Sunday Jun 3rd, 2012 at 2:31 pm #15285

If only express checkout sends the address to paypal is there a hook or filter I can do to make the other form send it over?

I did find in the file paypal-checkout-rdp-in.inc.php on lines 172-177

$paypal_set_xco["PAYMENTREQUEST_0_SHIPTONAME"] = $post_vars["name"];
$paypal_set_xco["PAYMENTREQUEST_0_SHIPTOSTREET"] = $post_vars["street"];
$paypal_set_xco["PAYMENTREQUEST_0_SHIPTOCITY"] = $post_vars["city"];
$paypal_set_xco["PAYMENTREQUEST_0_SHIPTOSTATE"] = $post_vars["state"];
$paypal_set_xco["PAYMENTREQUEST_0_SHIPTOCOUNTRYCODE"] = $post_vars["country"];
$paypal_set_xco["PAYMENTREQUEST_0_SHIPTOZIP"] = $post_vars["zip"];
												

By reading the comments I see that this area is for express checkout. It looks like it is sending over the address info to paypal.

As an example farther below where it has code for “not using express checkout” I find this: lines 302-306

$_paypal["STREET"] = $post_vars["street"];
$_paypal["CITY"] = $post_vars["city"];
$_paypal["STATE"] = $post_vars["state"];
$_paypal["COUNTRYCODE"] = $post_vars["country"];
$_paypal["ZIP"] = $post_vars["zip"];

So this code doesn’t send it over to paypal. Is there a way to change this to send the info over to paypal.

Thanks!
-Meghan

Posted: Sunday Jun 3rd, 2012 at 9:27 pm #15297

With PayPal Pro you mean? I’ll ask Jason. :)

Posted: Monday Jun 4th, 2012 at 4:20 pm #15396

So we were doing some testing on our own. We were in the file : paypal-checkout-rdp-in.inc.php and added some code under line 306. (We found out for what we are using that is the correct place to put the changes we need. The users have to be logged in to fill out our paypal pro form and it is a recurring form with a trial period)

This is the normal code for that area:

$_paypal["STREET"] = $post_vars["street"];
$_paypal["CITY"] = $post_vars["city"];
$_paypal["STATE"] = $post_vars["state"];
$_paypal["COUNTRYCODE"] = $post_vars["country"];
$_paypal["ZIP"] = $post_vars["zip"];

We added this below …

$_paypal["SHIPTOSTREET"] = $post_vars["street"];
	$_paypal["SHIPTOCITY"] = $post_vars["city"];
	$_paypal["SHIPTOSTATE"] = $post_vars["state"];
	$_paypal["SHIPTOCOUNTRY"] = $post_vars["country"];
	$_paypal["SHIPTOZIP"] = $post_vars["zip"];
	

according to paypal (https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_api_nvp_r_CreateRecurringPayments) this is the ship to address nvp … so thought it would work.

Still not working, are we heading in the right direction? (Yes we did change the plugin’s php file instead of using a hook, because I wasn’t sure how to create a hook for that.)

-Meghan

Posted: Monday Jun 4th, 2012 at 5:02 pm #15399

I added the code under every section just in case I was in the wrong spot. I also added the below to that group:

$_paypal["SHIPTONAME"] = $post_vars["first_name"] . " " . $post_vars["last_name"];
$_paypal["SHIPTOCOUNTRYCODE"] = $post_vars["country"];

still not working :(

-Meghan

Posted: Monday Jun 4th, 2012 at 5:35 pm #15400

So I just found two more files that might be what my form is using, since I’m not completely for sure, they are: paypal-checkout-pf-in.inc.php and paypal-checkout-in.inc.php. I added my “shipto” code on all of those… but it is still not working.

Sorry to only be responding to my self over and over, but in case I figure it out wanted to be able to have my process :)

-Meghan

Posted: Monday Jun 4th, 2012 at 9:25 pm #15408
Jeff Agard
Username: tlgc

I’ve been trying a bunch of similar things to try and add the functionality, but also with no luck. If I figure it out, I’ll definitely post it here.

Perhaps the s2member Support folks could point us in the right direction?

Thanks!

Posted: Tuesday Jun 5th, 2012 at 6:23 am #15455

Sorry to only be responding to my self over and over, but in case I figure it out wanted to be able to have my process :)

No problem at all, I do that sometimes too. :)

Perhaps the s2member Support folks could point us in the right direction?

I really don’t know this one. I’m waiting for Jason to check his inbox and get to this email. He’s doing that once or twice a week now, since he’s so busy developing the new s2Member. Thanks for your patience.

Posted: Tuesday Jun 5th, 2012 at 12:44 pm #15541

Looks like my client might be having to switch from paypal being his only gateway to having multiple gateways, (not sure if s2member can handle that) and we might have to leave s2member.

But I am still trying to figure out this problem. I am definitely not one who knows how to do paypal api scripting, but I am enjoying the challenge :)

I do understand that Jason is a very busy person and I thank you for emailing him so that he can help us with our question/problem, I hope I do not sound impatient.

-Meghan

Posted: Tuesday Jun 5th, 2012 at 7:38 pm #15585

Oh, not at all, I’m sorry I couldn’t resolve your question and you have to wait a bit longer.

About handling multiple gateways, it’s not something the current s2 can do, but the new s2 being developed may be able to.

Yeah, PayPal can be a pain to work with, but I’m glad you’re enjoying it.

Posted: Thursday Jun 7th, 2012 at 3:19 pm #15826
Staff Member

Thanks for the heads up on this thread.

s2Member Pro is not currently designed to sell tangible items that would be shipped to a customer (i.e. where a shipping address would be collected). However, you are correct… it IS possible to send these fields through the PayPal Pro API, if you like.

If problems persist, please be sure that you’ve included a SHIPTONAME:
(click screenshot to enlarge)

Regarding these files:

These files handle almost all transaction types.
1. paypal-checkout-in.inc.php (Handles most transactions)
2. paypal-checkout-rdp-in.inc.php (Real-time Direct Pay variation)
3. paypal-checkout-pf-in.inc.php (Payflow API variation)

You only need to edit paypal-checkout-rdp-in.inc.php, if you’ve configured s2Member’s Recurring Profile Behavior to “Real-Time Direct Pay”, under: Dashboard -› s2Member® -› PayPal® Options -› Account Details.

Conversely, you only need to edit paypal-checkout-in.inc.php, if you’ve configured s2Member’s Recurring Profile Behavior to “Consolidate w/ Recurring Profile”, under: Dashboard -› s2Member® -› PayPal® Options -› Account Details.

You only need to edit paypal-checkout-pf-in.inc.php if you’re running s2Member with a PayPal Payflow API integration, as configured here: Dashboard -› s2Member® -› PayPal® Options -› Payflow® Account Details.

4. paypal-sp-checkout-in.inc.php
This file handles all transactions for Specific Post/Page Access.
See: Dashboard -› s2Member® -› PayPal® Pro Forms -› Specific Post/Page (Buy Now) Forms

Posted: Monday Jun 11th, 2012 at 6:13 pm #16160

Conversely, you only need to edit paypal-checkout-in.inc.php, if you’ve configured s2Member’s Recurring Profile Behavior to “Consolidate w/ Recurring Profile”, under: Dashboard -› s2Member® -› PayPal® Options -› Account Details.

This is now I have mine set up.

So I edited the file

paypal-checkout-in.inc.php

and changed all areas in the file that looked like this:

$paypal["STREET"] = $post_vars["street"];
$paypal["CITY"] = $post_vars["city"];
$paypal["STATE"] = $post_vars["state"];
$paypal["COUNTRYCODE"] = $post_vars["country"];
$paypal["ZIP"] = $post_vars["zip"];

to look like this …

$paypal["STREET"] = $post_vars["street"];
$paypal["CITY"] = $post_vars["city"];
$paypal["STATE"] = $post_vars["state"];
$paypal["COUNTRYCODE"] = $post_vars["country"];
$paypal["ZIP"] = $post_vars["zip"];
$paypal["SHIPTONAME"] = $post_vars["name"];
$paypal["SHIPTOSTREET"] = $post_vars["street"];
$paypal["SHIPTOCITY"] = $post_vars["city"];
$paypal["SHIPTOSTATE"] = $post_vars["state"];
$paypal["SHIPTOCOUNTRY"] = $post_vars["country"];
$paypal["SHIPTOCOUNTRYCODE"] = $post_vars["country"];
$paypal["SHIPTOZIP"] = $post_vars["zip"];

is there something else I’m messing up on, because it will not send over the shipping address.

Posted: Monday Jun 11th, 2012 at 6:31 pm #16162

Never mind … that ended up fixing it. I was looking at the wrong order I processed. Its working now! Thanks!

Posted: Tuesday Jun 12th, 2012 at 7:39 am #16233

Great! Thanks for the update. :)

Posted: Tuesday Jun 26th, 2012 at 8:28 pm #17594
Jeff Agard
Username: tlgc

I had this working just fine with Paypal Pro Payments, but now I’ve been upgraded to the Payflow API. I’ve modified the paypal-checkout-pf-in.inc file and added the SHIPTO information as described above. It’s not sending the info over to paypal now. Any ideas? Can you (possibly) tell me each place (line number) in the file that needs to be updated?

Also.. What do these lines in particular do? They start at line 123 in my file.

/**/
$paypal_set_xco["ADDROVERRIDE"] = "1";
$paypal_set_xco["SHIPTONAME"] = $post_vars["name"];
$paypal_set_xco["SHIPTOSTREET"] = $post_vars["street"];
$paypal_set_xco["SHIPTOCITY"] = $post_vars["city"];
$paypal_set_xco["SHIPTOSTATE"] = $post_vars["state"];
$paypal_set_xco["SHIPTOCOUNTRY"] = $post_vars["country"];
$paypal_set_xco["SHIPTOZIP"] = $post_vars["zip"];
/**/
Posted: Tuesday Jun 26th, 2012 at 9:12 pm #17597
Jeff Agard
Username: tlgc

Scratch that. I figured it out. It’s all working now!

Posted: Thursday Jun 28th, 2012 at 7:20 am #17747

Great. :)

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