magento / magento2

Prior to making any Submission(s), you must sign an Adobe Contributor License Agreement, available here at: https://opensource.adobe.com/cla.html. All Submissions you make to Adobe Inc. and its affiliates, assigns and subsidiaries (collectively “Adobe”) are subject to the terms of the Adobe Contributor License Agreement.
http://www.magento.com
Open Software License 3.0
11.54k stars 9.32k forks source link

Paypal > Customer data mismatch (prefix, firstname, lastname) #39061

Open Detzler opened 2 months ago

Detzler commented 2 months ago

Preconditions and environment

Steps to reproduce

Expected result

Fields should be filled correctly.

Actual result

image

Additional information

No response

Release note

No response

Triage and priority

m2-assistant[bot] commented 2 months ago

Hi @Detzler. Thank you for your report. To speed up processing of this issue, make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, Add a comment to the issue:

Detzler commented 2 months ago

@magento give me 2.4-develop instance

magento-deployment-service[bot] commented 2 months ago

Hi @Detzler. Thank you for your request. I'm working on Magento instance for you.

magento-deployment-service[bot] commented 2 months ago

Hi @Detzler, here is your Magento Instance: https://f7b5e2fa480259116ce3040594f10b12.instances-prod.magento-community.engineering Admin access: https://f7b5e2fa480259116ce3040594f10b12.instances-prod.magento-community.engineering/admin_114b Login: 5d0f1cfe Password: 33317b251f6a

Detzler commented 2 months ago

Reproduced at the magento instance:

image

Detzler commented 2 months ago

I've deleted my paypal sandbox credentials in the backend. Please use yours for your further work.

m2-assistant[bot] commented 2 months ago

Hi @engcom-Delta. Thank you for working on this issue. In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:

Detzler commented 2 months ago

Found the cause in:

https://github.com/magento/magento2/blob/d196d504d8b387454a123033ec2a74d7fd3d5430/app/code/Magento/Paypal/Model/Api/Nvp.php#L1599C34-L1599C49

After changing the line from:

$to['SHIPTONAME'] = $shippingAddress->getName();

to:

$to['SHIPTONAME'] = $shippingAddress->getFirstname() . ' ' . $shippingAddress->getLastname();

... the popup looks right now:

image

Kindly asking to fix it in a new magento release.