magento / magento2

Prior to making any Submission(s), you must sign an Adobe Contributor License Agreement, available here at: https://opensource.adobe.com/cla.html. All Submissions you make to Adobe Inc. and its affiliates, assigns and subsidiaries (collectively “Adobe”) are subject to the terms of the Adobe Contributor License Agreement.
http://www.magento.com
Open Software License 3.0
11.5k stars 9.3k forks source link

Couldnot place order "An error occured on the server. Please try to place the order again" #9792

Closed puples closed 7 years ago

puples commented 7 years ago

hello

i have a problem with payment by credit card, I have magento 2.1.5

Steps to reproduce

i have a redirect to the cart when i add a product.

  1. go to the store (not connected to an account)
  2. add a simple product (redirect to the cart)
  3. click to checkout (a form login appear)
  4. connect and go the checkout
  5. enter shipping method & address
  6. go to payment (select payment by credit card)

I have nothing in log but i have this in chrome:

POST https://www.XXX.com/rest/default/V1/carts/mine/payment-information 400 () send @ jquery-latest.min.js:4 ajax @ jquery-latest.min.js:4 post @ storage.js:39 (anonymous) @ place-order.js:17 (anonymous) @ place-order.js:33 _super @ wrapper.js:73 (anonymous) @ place-order-mixin.js:20 (anonymous) @ wrapper.js:78 getPlaceOrderDeferredObject @ default.js:163 placeOrder @ default.js:140 (anonymous) @ knockout.js:3863 dispatch @ jquery-latest.min.js:3 r.handle @ jquery-latest.min.js:3

if i open "/rest/default/V1/carts/mine/payment-information" in chrome i have this:

This XML file does not appear to have any style information associated with it. The document tree is shown below.

checkmo Chèque systempay_standard Paiement par carte bancaire 33.18 35 33.18 33.18 0 0 33.18 33.18 0 0 0 0 1.82 1.82 0 0 35 0 0 EUR EUR 1 10853 33.18 33.18 1 33.18 33.18 0 1.82 1.82 5.5 0 0 0 35 35 35 35 [] Product subtotal Sous-total 35 shipping Frais de port 0 tax Taxe 1.82 1.82 5.5 TVA 5.5 1 grand_total Montant global 35 footer

for the checkout work after this i need to return at home, click on cart and go to the checkout.

can you help me please.

regards

joni-jones commented 7 years ago

Hi, @puples, please provide additional details, like selected payment method and custom extensions.

Also, you need to enable debug mode for the selected payment method and provide transaction details.

To find original reason of fails, you can use xdebug and set breakpoints in the https://github.com/magento/magento2/blob/2.1/app/code/Magento/Checkout/Model/GuestPaymentInformationManagement.php#L83 and https://github.com/magento/magento2/blob/2.1/app/code/Magento/Checkout/Model/PaymentInformationManagement.php#L71 or can use a logger to find original reason of failing like in https://github.com/magento/magento2/blob/develop/app/code/Magento/Checkout/Model/PaymentInformationManagement.php#L90

You can find these classes in the vendor directory.

puples commented 7 years ago

hi thanks for help, the problem come from shipping address. I can choose a shipping method with no adress selected (i have a button "Ship Here" but the only address of account is not selectionned) and go to the payment method.

it is possible to force default shipping address enable ?

thanks a lot

joni-jones commented 7 years ago

Please, clarify the issue with shipping address. Does customer have default shipping address?

On Magento 2.1.6 it looks like this: one address Or two addresses: 2 addresses The default shipping address is always selected.

joni-jones commented 7 years ago

We are closing this issue because it hasn’t been updated in more than two weeks.

If you still can reproduce the issue, please, be free to reopen it.

rab14191 commented 7 years ago

i m using magneto 2.1.7 in luma theme i got same problem

i m useing Flat Rate shiping method and payment Cash on D

puples commented 7 years ago

hello,

sometimes when a customer (not log in) add a product on the cart, clic on "checkout", log in and go to the checkout page the defaut adress was not check in :

image

the problem, he can select a shipping method go to the payment but he can't go to the bank detail (error). he must become in step 1 clic on ship here and go to step 2. a lot of customer doesn't see the "ship here" button and call us because it doesn't work...

Siyadev9 commented 6 years ago

This is really irritating