Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Street and Housenumber with more than 100 characters blocks placing order with mollie payment method #589

Closed
t-heuser opened this issue Nov 28, 2022 · 4 comments

Comments

@t-heuser
Copy link

Describe the bug
If you create a cart and set a street and housenumber with more than 100 characters (rare case, but happened in our online shop recently) it's not possible to create an order, the following error occurs:
Error executing API call (422: Unprocessable Entity): The 'streetAndNumber' field should not be longer than 100 characters. Field: billingAddress.streetAndNumber. Documentation: https://docs.mollie.com/reference/v2/payments-api/create-payment.

Used versions

  • Magento Version number: 2.4.5
  • Open source/Enterprise/B2b: Open Source
  • Mollie version number (Check configuration): 2.19.0

To Reproduce
Steps to reproduce the behavior:

  1. Create a cart with atleast 1 item
  2. Set a billing address with more than 100 characters
  3. Select a mollie payment method
  4. Place the order

Expected behavior
The order should be placed regardless of the length of the street field. If the limitation of 100 characters for the street of the mollie API cannot be removed, there should be a Plugin for the address validation which throws an error when trying to set the street field with more than 100 characters so that the error doesn't occur when trying to place the order.

Actual behavior
The order cannot be placed.

@Frank-Magmodules
Copy link
Collaborator

Hi @oneserv-heuser ,

We are happy to share that we've just released the new 2.20.0 version where we have fixed this issue. Thank you for opening this request and for the detailed steps to reproduce. 

We are closing this issue now but please feel free to reopen the issue if you need any help on this.

@mokadev
Copy link

mokadev commented Sep 23, 2024

Hi @Frank-Magmodule

sorry to reopen this issue, but why do you need to disable the module when the street is longer than 100 caracteres ?

We had at least two customers who wasn't able to order (they called the customer service, how many didn't call ...)

I see this code in the isAvailable function

if ($quote && $quote->getShippingAddress()) {
            $street = $quote->getShippingAddress()->getStreetFull();

            if (mb_strlen($street) > 100) {
                return false;
            }
        }

why do you use the the getStreetFull() method? If you have 2 or 3 street lines of course you will have more than 100 caracteres.

Can we just use the first line of the street for exemple or truncate the full street to 100 caracteres before send it to the Mollie API?

@Frank-Magmodules
Copy link
Collaborator

Hi @mokadev, no worries!
Feel free to reopen this if needed. I’ll get back to your question shortly!

michielgerritsen added a commit to michielgerritsen/mollie-magento2 that referenced this issue Oct 14, 2024
@Frank-Magmodules
Copy link
Collaborator

Hi @mokadev, I’m happy to share that we’ve just released a new version of the plugin, which includes the improvement to truncate the street field when it exceeds 100 characters.

I’ll close this issue for now, but feel free to comment or reopen it if needed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants