News:

You may pay someone to create your store, or you visit our seminar and become a professional yourself with the silver certification

Main Menu

Paypal Pro plugin not passing last name of ship to address to Paypal

Started by consolecustoms, February 07, 2014, 04:15:54 AM

Previous topic - Next topic

consolecustoms

Hey everyone, I am using the new virtuemart paypal payments Pro plugin. When a payment is made and I view the transaction in paypal on the main history page it shows the full first and last name. but when I view the details the shipping address shows only the first name so when printing a label I have to fill in the last name manually. So it seems the plugin is not passing the last name for the shipping address to paypal. How can we verify and correct this?

Thank you,
Chris
www.consolecustoms.com - Xbox 360 and PlayStation 3 Rapid Fire controllers, LEDs and more.

consolecustoms

There must not be alot of people here who ship out of paypal or more people would see this problem, looks the same for payapl express except i don't use it so i cant verify. Anyway for those who also need a solution to this problem.

Edit "plugins/vmpayment/paypal/paypal/helpers/paypalapi.php" find the line below


$post_variables['SHIPTONAME'] = isset($addressST->first_name) ? $this->truncate($addressST->first_name, 50) : '';

and change to

$post_variables['SHIPTONAME'] = isset($addressST->first_name) ? $this->truncate($addressST->first_name, 50).' '.$this->truncate($addressST->last_name, 50) : '';

The First and Last name will not be passed to paypal for the shipping address.

This should be corrected officially for future releases

I also see many copy/paste type errors in the file ie.

$post_variables['SHIPTOSTREET'] = isset($addressST->first_name) ? $this->truncate($addressST->address_1, 60) : '';

your checking that the first name entry is not blank to fill the street address variable, does not make sense should be checking the the street address is not blank. Should never be a problem since both are required fields but should should be corrected. there are several similar errors in this file and  in paypalexp.php
www.consolecustoms.com - Xbox 360 and PlayStation 3 Rapid Fire controllers, LEDs and more.

blizam


klattr1

I can also confirm the same issue. The Last Name variable shows up on Virtuemart and everywhere else, except for the Shipping Address section of the Paypal details page (as well as email notification to merchant). It only passes through the first name. Mods, can you fix the issue in the core files with the fix above or provide any help on the issue?

Also, this is only problematic when using the Paypal Express option of the built-in PP shipping method. I'm using Virtuemart 2.6.0 and Joomla 5.19 on PHP 5.4.20.

klattr1


alatak

Hello
Quoteyour checking that the first name entry is not blank to fill the street address variable,
it is a bug
But this has been fixed in the 2.6
by
$post_variables['SHIPTOSTREET'] = isset($addressST->address_1) ? $this->truncate($addressST->address_1, 60) : '';

There was one bug left in the file plugins/vmpayment/paypal/paypal/helpers/paypalexp.php line 146

klattr1

Alatak, I'm still having the same issue with the Paypal Express checkout type. The last name field still doesn't appear under the Paypal transaction shipping details. This only occurs when the customer clicks on the "Check out with Paypal" Express button on the Shopping Cart page. The problem doesn't exist if the user chooses Paypal as payment option after they confirm their order.

alatak


klattr1

Quote from: alatak on May 13, 2014, 11:31:22 AM
Hello
For which VirtueMart version?
I'm using Virtuemart 2.6.0a and Joomla 5.19 on PHP 5.4.20.

alatak

Hello
I am not able to reproduce your problem, so i probably don't do it the same way as you. Can u contact me via skype and show me?

klattr1


alatak

Hello
Thank you for showing me the problem.
in file  plugins/vmpayment/paypal/paypal/helpers/paypalexp.php
after this line (line 145)
$post_variables['SHIPTONAME'] = isset($addressST->first_name) ? $this->truncate($addressST->first_name, 50) : '';

I have added this line
$post_variables['SHIPTONAME'] .= isset($addressST->last_name) ? ' '.$this->truncate($addressST->last_name, 50) : '';


This fix will be in the next release.

klattr1