1

Magento-2.1.1 : "400 (Bad Request)" issue generate while place order using custom payment method not Display Error Message on page.

Error Log also empty..

enter image description here

3
  • please check log files for the errors and let me know the same to provide you a solution.
    – user41152
    Oct 1, 2016 at 10:02
  • log file in not getting code error..just normal log generate. Oct 3, 2016 at 5:03
  • Did you get to the bottom of this? I attempted to create a custom payment method based on various tutorials as each seemed to not work however have got to here where its shown in frontend but just throws above error and nothing logged to exception.log
    – harri
    Jan 24, 2018 at 16:37

1 Answer 1

0

I Have Fixed The Issue By Editing A Core File Magento\Checkout\Model\PaymentInformationManagement inside this i have replaced content of function savePaymentInformationAndPlaceOrder with following

$this->savePaymentInformation($cartId, $paymentMethod, $billingAddress);

return $this->cartManagement->placeOrder($cartId);

(Change : Remove The Try/Catch Block)

Note : Please Use A Plugin To Change Core System

6
  • change core and remove cache but not work..same error Oct 7, 2016 at 6:05
  • can you post the error message ? Oct 7, 2016 at 9:59
  • above image in define..400 bad request. Oct 7, 2016 at 10:50
  • Released magento2.1.2 also this issue there again...any idea how to solve it? Oct 13, 2016 at 11:32
  • As far as i know , error messages are not showing since whole placeOrder status is included in try catch block , if any exception thrown from your custom payment module will be cached by this o uter try catch and will show specified error not the catched one. ` throw new CouldNotSaveException( __('An error occurred on the server. Please try to place the order again.'), $e );` . instead of this try to throw the exception itself Exception $e. Oct 14, 2016 at 7:29

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.