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: Todd Friskey & Meghan Miller

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


Topics I'm Subscribed To

Viewing 2 topics - 1 through 2 (of 2 total)
Topic Count Last Reply
Pro-Forms with Free Paypal

By:  Todd Friskey & Meghan Miller in: Community Forum

voices: 2
replies: 2

3 years, 11 months ago  Jason (Lead Developer)

Paypal Pro-Forms Shipping Address?

By:  Jeff Agard in: Community Forum

voices: 4
replies: 21

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

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

My Latest Replies (From Various Topics)

Viewing 18 replies - 1 through 18 (of 18 total)
Author Replies
Author Replies
Posted: Monday Jan 21st, 2013 at 2:18 pm #38606

Or would the pro forms work with the new PayPal Payments Advanced?

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: 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: 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: 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 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 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: 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 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: 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: Wednesday May 30th, 2012 at 2:24 pm #14964

I was able to do what I needed with that thread. Thanks!

-Meghan

Posted: Wednesday May 30th, 2012 at 12:36 pm #14960

Okay I found the email in this thread .

Posted: Wednesday May 30th, 2012 at 12:31 pm #14959

Okay so the email I received says:

Thank you! You've been updated to:
14 Day Trial of Enhanced Syntha-Testosterone just $4.95 for Shipping.

Please log back in now.
url link ...

None of the PayPal option emails match this …. do you happen to know which one this is?

-Meghan

Posted: Wednesday May 30th, 2012 at 12:18 pm #14958

I will do some testing with sandbox … thank you for steering me that way. I will let you know after I test if that is what I was looking for.

-Meghan

Posted: Wednesday May 23rd, 2012 at 10:44 pm #14390

I’m getting tired but I think I am doing this correctly … Here is what I have in my s2-hacks.php file.

<?php
/*GET USERS CUSTOM FIELDS ETC*/
add_action("ws_plugin__s2member_during_configure_user_registration", "my_function");
function my_function($vars_from_s2member = array())
{
extract($vars_from_s2member);
/* Here are a few variables now available to you here.
$role (s2member_level1, s2member_level2, etc)
$level = (level number of access now granted)
$email, $login, $ip, $custom, $subscr_id, $subscr_gateway
$fname, $lname, $name, $pass, $user_id (WP User ID), $ccaps
$user (a WP_User_object), $user->ID (the User's ID in WordPress)
$fields (an array of Custom Registration Fields for s2Member) */
var_dump($fields);
echo "First Name: ";
echo $fname;
echo $role;
echo $level;
echo $email;
echo $login;
}
?>

Then in one of my pages php template I am calling:

<?php do_action("ws_plugin__s2member_during_configure_user_registration", "my_function"); ?> 

What I am getting is:

NULL First Name: 

What am I doing wrong?

Posted: Wednesday May 23rd, 2012 at 10:19 pm #14387

As you can tell I don’t do php … where do I add this to have access to the variables? Does it need to go into my functions.php file or maybe my s2-hacks.php file … I can’t seem to get access to these variables that it gets … Or am I just going at this wrong …

Posted: Wednesday May 23rd, 2012 at 10:04 pm #14383

Okay so found this here :

<?php
add_action("ws_plugin__s2member_during_configure_user_registration", "my_function");
function my_function($vars_from_s2member = array())
{
extract($vars_from_s2member);
/* Here are a few variables now available to you here.
$role (s2member_level1, s2member_level2, etc)
$level = (level number of access now granted)
$email, $login, $ip, $custom, $subscr_id, $subscr_gateway
$fname, $lname, $name, $pass, $user_id (WP User ID), $ccaps
$user (a WP_User_object), $user->ID (the User's ID in WordPress)
$fields (an array of Custom Registration Fields for s2Member) */
}
?>

Going to see if I can get this to work.

Posted: Wednesday May 23rd, 2012 at 9:52 pm #14381

I have most of it figured out now. One snag I have is that I’m trying to populate the billing address in the paypal pro forms with custom fields I created during the users registration.

My first test was putting my custom field’s code %%address%% in the value of the form, that doesn’t work. Gonna keep trying ….

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