amzn / amazon-payments-magento-2-plugin

Extension to enable Amazon Pay on Magento 2
https://amzn.github.io/amazon-payments-magento-2-plugin/
Apache License 2.0
109 stars 77 forks source link

Express checkout not working with Salutation #1154

Closed p24-max closed 1 year ago

p24-max commented 1 year ago

What I expected

That the amazon pay express checkout works also when Salutation (prefix) is a required field in magento 2 checkout.

What happened instead

Order cannot be placed, error message is shown in magento stating "prefix is a required field". Money is reserved (authorized) for 30 days and needs to be cancelled manually.

Steps to reproduce the issue

Enable "Prefix" in magento 2 store configuration for the customer and set it to required

Your setup

image

sgabhart22 commented 1 year ago

Hello @p24-max ,

Typically, if the Amazon Pay module cannot populate a given shipping address field based on the address data returned from Amazon (such as Mr./Mrs./Ms. for a prefix field), the shipping form will be partially displayed with the required fields called out that must be filled manually. Are you using any checkout extensions or customizations that may affect the way the AP module creates and validates addresses on the shipping step? Or would you have a staging site where we could investigate the behavior personally?

Thanks, Spencer

p24-max commented 1 year ago

Hi @sgabhart22 , thank you for your response.

Yes, we are using a onestep-checkout extension (FireCheckout). But also when I disable this module, it results in same behavior. There is no additional selection for the Salutation showing up when using AmazonPay Express-Checkout: amazon_pay

sgabhart22 commented 1 year ago

Hello again @p24-max ,

I created a 2.4.3-p3 CE instance and tested this with FireCheckout, and I'm unable to reproduce the behavior. If the Prefix Dropdown Options configuration option is left blank, then the field is treated as an open text field and the validation seems to run normally:

image

If the Prefix Dropdown Options field is set to a list of acceptable values (like Mr.;Mrs.), then Magento appears to use the default value for this field (option ID = 0). Are there any other possible customizations on this particular field that might be affecting default behavior, such as custom code that might touch customer attributes/addresses? Are you using a list of values to choose from for this Salutation field?

Thanks, Spencer

p24-max commented 1 year ago

@sgabhart22 thank you so much for your help! I'm going to check by disabling all other modules and customizations and come back to you once I have the check result. But your screenshot looks like I would expect it. :)

sgabhart22 commented 1 year ago

Hello again @p24-max ,

Just checking in to see if you were able to determine anything else about this issue on your end. Let us know!

Thanks, Spencer

p24-max commented 1 year ago

Hi @sgabhart22 , thanks for your help. We are still on it getting it working. We now figured out that adding an empty value to Prefix Dropdown Options might fix it. I close this issue for now. Thank you!