close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

PayPal buyer address when shipping address different

Thread began 10/17/2019 2:58 pm by paulshoe379536 | Last modified 11/01/2019 9:35 am by Ray Borduin | 1507 views | 10 replies |

paulshoe379536

PayPal buyer address when shipping address different

When a visitor uses PayPal and changes the shipping address so that it is different than the billing address, some of the values for the billing customer are lost. First name and last name are retained but the address information is the same as the shipping address.

In "pp_confirm.php" I added the code for "First_Name", "Address_1", etc. to the shipping information section as shown by the attached JPG. The first name, last name, and phone number are correct for the buyer but the address lines mimic the "ship to" address (PayPal does not provide for phone numbers on shipping addresses).

What needs to be done to correct this? I would like to have the correct buyer's information as well as the shipping information for my email invoice.

"pp_confirm.php" code clipped below:
----------------------------------------------------------------------------------------------------------------------------------------------
<p class="eC_OrderInfo" style="font-size: 120% !important; font-weight: bold;"><?php echo(WA_getSavedFormValue('CheckoutWizard_Sharp_Default','First_Name')); ?>&nbsp;<?php echo(WA_getSavedFormValue('CheckoutWizard_Sharp_Default','Last_Name')); ?><br />
<?php echo(WA_getSavedFormValue('CheckoutWizard_Sharp_Default','Address_1')); ?><br />

<?php if( WA_getSavedFormValue('CheckoutWizard_Sharp_Default','Address_2') !='') {
echo(WA_getSavedFormValue('CheckoutWizard_Sharp_Default','Address_2').'<br />'); } ?>

<?php echo(WA_getSavedFormValue('CheckoutWizard_Sharp_Default','City')); ?>,&nbsp;<?php echo(WA_getSavedFormValue('CheckoutWizard_Sharp_Default','State')); ?>&nbsp;<?php echo(WA_getSavedFormValue('CheckoutWizard_Sharp_Default','Postal_Code')); ?><br />
<?php //echo(WA_getSavedFormValue('CheckoutWizard_Sharp_Default','Country_2')); ?><br />
<?php echo(WA_getSavedFormValue('CheckoutWizard_Sharp_Default','Phone_Number')); ?>
</p>

<p class="eC_OrderInfo" style="font-size: 120% !important; font-weight: bold;"><?php echo(WA_getSavedFormValue('CheckoutWizard_Sharp_Default','First_Name_2')); ?>&nbsp;<?php echo(WA_getSavedFormValue('CheckoutWizard_Sharp_Default','Last_Name_2')); ?><br />
<?php echo(WA_getSavedFormValue('CheckoutWizard_Sharp_Default','Address_1_2')); ?><br />

<?php if( WA_getSavedFormValue('CheckoutWizard_Sharp_Default','Address_2_2') !='') {
echo(WA_getSavedFormValue('CheckoutWizard_Sharp_Default','Address_2_2').'<br />'); } ?>

<?php echo(WA_getSavedFormValue('CheckoutWizard_Sharp_Default','City_2')); ?>,&nbsp;<?php echo(WA_getSavedFormValue('CheckoutWizard_Sharp_Default','State_2')); ?>&nbsp;<?php echo(WA_getSavedFormValue('CheckoutWizard_Sharp_Default','Postal_Code_2')); ?><br />
<?php //echo(WA_getSavedFormValue('CheckoutWizard_Sharp_Default','Country_2')); ?><br />
<?php echo(WA_getSavedFormValue('CheckoutWizard_Sharp_Default','Phone_Number_2')); ?>
</p>
----------------------------------------------------------------------------------------------------------------------------------------------

Sign in to reply to this post

Ray BorduinWebAssist

Please attach a copy of the pp_confirm.php page and I can take a look at what might need to be updated.

Sign in to reply to this post
Did this help? Tips are appreciated...

paulshoe379536

file attached

Sign in to reply to this post

Ray BorduinWebAssist

That information is all retrieved from paypal on lines 32-58. I'd have to debug with you to see if paypal simply doesn't pass the billing address or if it is referenced improperly in the code. The code looks correct to me, so I'd need to debug further with you. If you post a US phone number or Skype contact information, then I can call you and set up a screen sharing session to look over this with you and debug what is going on.

Sign in to reply to this post
Did this help? Tips are appreciated...

paulshoe379536

That sounds great Ray but I am done working for today. I'll try to contact you on Monday about this.

Sign in to reply to this post

paulshoe379536

I wasn't thinking when I said I would get back to you on Monday. I'll be out of my office until Wednesday. I'll try to contact you mid-week.

Sign in to reply to this post

paulshoe379536

I will be in my office tomorrow, Thursday, 24th and Friday morning the 25th. My phone number is in the private message.

Sign in to reply to this post

Ray BorduinWebAssist

We went through this in a screen sharing session. We discovered that paypal doesn't pass back billing information if you pay with paypal. So our solution was to use the information on the checkout page and ignore the values passed back from paypal. We just commented out the fields we didn't want updated on the pp_confirm.php page.

Sign in to reply to this post
Did this help? Tips are appreciated...

paulshoe379536

Here's what I found using PayPal credit card purchases. PayPal returns:

First Name > First_Name
Last Name > Last_Name

From PayPal's "Billing Address" when "Shipping Address" is not used:
Street Address > Address_1 and Address_1_2
Apt., ste., bldg. > Address_2 and Address_2_2
City > City and City_2
State > State and State_2
ZIP code > Postal_Code and Postal_Code_2

From PayPal's "Contact Information":
Email Address > to both Email_Address and Email_Address_2
Phone Number > to Phone_Number

If PayPal's "Shipping Address" is used:
Street Address > Address_1 and Address_1_2
Apt., ste., bldg. > Address_2 and Address_2_2
City > City and City_2
State > State and State_2
ZIP code > Postal_Code and Postal_Code_2

I did not see a reference in PayPal to shipping-address email or shipping-address phone.

Based on our work and conversation on Friday, I am able to do a work around by blocking the $PPVals updates in "pp_confirm.php." That will take care of the information displayed in the shopping cart after the visitor returns from PayPal.

However, my shipping charges are based on "$_SESSION['WASF_CheckoutWizard_Sharp_Default']['State']." So, if I do not allow the update of "$PPVals["State"]" in "pp_confirm.php" and the shipping state has been changed in PayPal, the shipping charges do not update.

Here's my dilemma. I want to show the visitor the shipping charges on the "checkout.php" page. If the visitor changes the ship-to state in PayPal, this will automatically update when they return the the shopping cart as long as "$PPVals["State"] = WA_PP_ECO_GetValue($WA_PP_ECO_GetResult, "PayerInfo->StateOrProvince")."

I'm thinking the best I can do is let the $PPVals update normally and then use "Billed via PayPal to (buyer's name)" in my "Sold To:" and then whatever PayPal returns as shipping information will be valid for my "Ship To:"

Sign in to reply to this post

Ray BorduinWebAssist

You should be able to set up your shipping rules to use the value of "State2" instead of state and then make sure your checkout page sets that value the same as "State" when it is entered on the checkout page.

Then you can let paypal update the "State2" value with the shipping information without updating the "State" field and get the shipping shown on the checkout page and updated on the confirm page when it is updated on paypal.

Sign in to reply to this post
Did this help? Tips are appreciated...
loading

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...