Skip to content
This repository has been archived by the owner on Jan 9, 2023. It is now read-only.

"We can't place the order" at PayPal Review Step #1

Closed
bobbyshaw opened this issue Sep 14, 2016 · 2 comments
Closed

"We can't place the order" at PayPal Review Step #1

bobbyshaw opened this issue Sep 14, 2016 · 2 comments

Comments

@bobbyshaw
Copy link
Member

We've had a report of this error on PayPal review step when clicking place order.

It's been identified as related to magento/magento2#5021

It appears that checkout doesn't complete if the carrier and method code are too long when concatenated. We see this because the code is truncated:

Royal Mail Method: meanbee_royalmail_secondclasssmallparcel {"is_exception":false} []
Royal Mail Method: meanbee_royalmail_firstclasssignedforsma {"is_exception":false} []
@punkstar
Copy link
Contributor

So it looks like there's a 40 character limit being imposed somewhere? I propose we add a test to ensure that our codes are no longer than 40 characters, and trim them down if they are.

@bobbyshaw
Copy link
Member Author

bobbyshaw commented Sep 14, 2016

Renamed the carrier code from "meanbee_royalmail" to "rm" to save some characters in the short term. Unlikely but still more likely this will then conflict with another shipping extension. There is also a risk that with the method the string is still too long. We should spend some time creating shorter method codes. It may mean we have to may every method code from the Royal Mail library to a shorter version within the Magento extension. This is bad for future updates with new methods. But we don't want to lose the clarity that the full code provides in the library.

@punkstar There is a risk that the first 40 characters may not be unique between different methods. All of the meanbee_royalmail_parcelforceworldwideexpress* methods would experience this problem. some of these methods will still break even with the carrier being rm. By doing rm & truncating the code though we might make it under the limit.

#2

This pull request only does RM for now but I can't spend any more time on it today.

bobbyshaw added a commit that referenced this issue May 23, 2017
… format.

With this control, we use a dictionary to shorten method codes. Magento fails
with longer method codes, presumably because of length of database fields.

Fixes #1
bobbyshaw added a commit that referenced this issue May 23, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants