#Alma error Member 'givenName' in billing address is missing or incorrect

1 messages · Page 1 of 1 (latest)

proud glade
#

Hello,
I am trying to activate Alma on Magento 2.4.6p6 version. When I click to place an order, I get an error message in response.

[2024-08-28T09:28:07+0000] Error executing API call (422: Unprocessable Entity): Member 'givenName' in billing address is missing or incorrect.. Field: billingAddress.givenName. Documentation: https://docs.mollie.com/overview/handling-errors

I don't really understand what field is faulty. Looking at the method creating the billing address array from the order billing address, I have those fields (see img). In Xdebug I have values for all of them (except region which should not cause the issue I guess).

Can anyone help me please ?

Mollie Documentation

HTTP status codes Whenever you send a request to the Mollie API you will get a response in JSON (JavaScript Object Notation) format. This is a standard for data communication that’s easy to read for humans as well as machines. Alongside the JSON-response an HTTP status code is sent that shows whethe...

charred flame
#

Hi! The problem is that you are missing the first name (givenName) 🙂

#

The first (givenName) and last name (familyName) are mandatory

proud glade
#

And where is it added to the data ? I can't find a reference to that. Because the getAdressLine doesn't seem to include it

#

And thx for the answer 😀

charred flame
#

See the docs link I've sent. It should be in the address object

#

So part of billingAddress and/or shippingAddress

proud glade
#

I am not really familiar with Mollie, are you maintaining the magento's connector to Mollie yourself or is that another company that does the module?

charred flame
#

A 3rd party is doing that for us. So if you think that you discovered an error, please open an issue on GitHub 🙏

proud glade
#

Ok! Thx, yeah I guess something is wrong because it's clearly not converting the order address properly then, it's only sending this as billingAddress :
return [
'streetAndNumber' => rtrim(implode(' ', $address->getStreet()), ' '),
'postalCode' => $address->getPostcode(),
'city' => $address->getCity(),
'region' => $address->getRegion(),
'country' => $address->getCountryId(),
];

#

Will open one, thanks for your answers