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 Checkout without Paypal account: Incorrect billing fields mapping

Started by nikowitt, June 13, 2024, 05:44:14 AM

Previous topic - Next topic

nikowitt

Hi there,
I am currently implementing Paypal Checkout (4.2.6) on a Virtuemart 4.2.12. A crucial aspect is to allow payment without a paypal account. The Paypal process then requires a e-mail address to be selected and the presents a form where you need to select the payment method (debit or credit card) and then multiple fields to compose the billing address. Here, the issue starts as Paypal seems to rely on exact values in the fields as otherwise, payments get easily rejected.

Currently, in order to populate the billing address, the VM account title such as "Herr" is used to populate the Paypal billing address field "First name" and the VM first + last name are combined in the "last name" field. In these cases, the payment processor often refuses payment without manually correcting the data.

Is it possible to adapt the mapping accordingly so first and last name are populated in the correct fields of the billing address when no paypal account is used? So no "title" is required, first name is put to the "first name" field and the "last name" field only contains the last name?

Thanks in advance.
Regards,
Niko


nikowitt

Enabling the debug log, I can see that basically "full_name" is submitted only, containing title + first name + last name. So it seems that Paypal itself does some guessing based on the full name in that case, using the string up to the first blank in full name as first name and then the other stuff as last name.

Just confirmed. When commenting out line 614 in ppc_order.php, not including title in full name, the billing address is set correctly. The question is if there are other side affects as this code appearantly is inteded for a shipping address, not a billing address (as the function name is createShippingObj).

This also means I can easily confuse Paypal when I set a company to the billing address, as simply the first word of the company will then be taken.