0

i experienced another bug (?) after migrating from Magento 1.9.1.0 to Magento 2.1.3 within the Checkout.

Steps to reproduce:

1) Setup a store in Magento 1.9.1.0 with some products and customer

2) Migrate that Store to Magento 2.1.3 - using the Magento Data migration tool

3) Add custom payment methods and shipping rates - actually migrated from 1.9.1.0

4) Login to an existing customer account and order something.

What should happen

  • Order gets placed

What happens

  • Failed to load resource: the server responded with a status of 400 (Bad Request) - www.host.domain/rest/default/V1/carts/mine/payment-information

  • POST host.domain/rest/default/V1/carts/mine/payment-information 400 (Bad Request)

Anyone who can help me with this ? A store with no orders cant be a working store :)

Thanks in andance

EDIT

Log from debug.log:

[2017-02-08 09:47:44] main.DEBUG: cache_invalidate:  {"method":"POST","url":"http://host.domain/rest/default/V1/carts/mine/payment-information","invalidateInfo":{"tags":["catalog_product_12265","FPC"],"mode":"matchingTag"},"is_exception":false} []

EDIT 2

After some more testing and google'ing i found out that the error only appears on migrated customers. With a new created one the order went straight through without any problems.

EDIT 3

After editing the PaymentInformationManagement.php to display the actuall error i finally get a exception.log with the following content:

[2017-02-14 11:04:51] main.CRITICAL: PDOException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '201600769-1' for key 'SALES_ORDER_INCREMENT_ID_STORE_ID' in /usr/www/users/nullnp/de_nullbar/vendor/magento/zendframework1/library/Zend/Db/Statement/Pdo.php:228

So my guess was to increase the increament ID but i cant figure out where..

  • Check your exception log, it should contain the origin reason of exception because payment-information WEB API provides only high-level errors. – joni jones Feb 8 '17 at 13:29
  • no exception.log inside the var/log folder. Problem is still existend – Marcel H. Feb 14 '17 at 10:22
0

First of all

1)flush the cache

2)setup upgrade using "php bin/magento setup:upgrade" command.

3)and enable the cache. it will solve your issue.

  • sadly it didnt solve my issue. Still got the same error. I flushed the cache, disabled it, run the setup:upgrade command and re-enabled the cache. – Marcel H. Feb 8 '17 at 10:28
0

Problem solved

I change the increment number for every store-view that i got.

PhpMyAdmin -> sequence_order_ -> Operations -> Tableoptions -> AUTO_INCREMENT

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.