Magento2: Payment failure does not provide full exception information to allow debugging

Created on 19 Aug 2016  路  12Comments  路  Source: magento/magento2

Preconditions

  1. Magento 2.1, PHP 7, Mysql 5.7
  2. Developer mode

    Steps to reproduce

  1. Get to a point where placing checkmo payment causes an error (sadly, the problem is that I'm trying to figure out why this is occurring so I cannot give any more).

Expected result

  1. A full stack trace if in developer
  2. The exception output in the exception log.

Actual result

  1. "Unable to place order. Please try again later" shown on the screen. A partial stack trace is shown in the returned json. Partial as in it's just the backtrace but not the main error message or the line and file position of the error itself:
    #0 .../vendor/magento/framework/Interception/Interceptor.php(146): Magento\Checkout\Model\GuestPaymentInformationManagement->savePaymentInformationAndPlaceOrder('42456ccf80561bf...', 'some.guy...', Object(Magento\Quote\Model\Quote\Payment), Object(Magento\Quote\Model\Quote\Address)) #1 .../var/generation/Magento/Checkout/Model/GuestPaymentInformationManagement/Interceptor.php(26): Magento\Checkout\Model\GuestPaymentInformationManagement\Interceptor->___callPlugins('savePaymentInfo...', Array, Array) #2 [internal function]: Magento\Checkout\Model\GuestPaymentInformationManagement\Interceptor->savePaymentInformationAndPlaceOrder('42456ccf80561bf...', 'robert.egginton...', Object(Magento\Quote\Model\Quote\Payment), Object(Magento\Quote\Model\Quote\Address)) #3 .../vendor/magento/module-webapi/Controller/Rest.php(307): call_user_func_array(Array, Array) #4 .../vendor/magento/module-webapi/Controller/Rest.php(216): Magento\Webapi\Controller\Rest->processApiRequest() #5 .../var/generation/Magento/Webapi/Controller/Rest/Interceptor.php(37): Magento\Webapi\Controller\Rest->dispatch(Object(Magento\Framework\App\Request\Http)) #6 .../vendor/magento/framework/App/Http.php(135): Magento\Webapi\Controller\Rest\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http)) #7 .../vendor/magento/framework/App/Bootstrap.php(258): Magento\Framework\App\Http->launch() #8 .../pub/index.php(37): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http)) #9 {main}
  2. Nothing added to exception log

In this case I am unable to find the actual file and position of the error (and thus I cannot tell you exactly how to reproduce the problem as I lack information to diagnose this).

I'm generally finding in M2 that the logs are less useful than in M1 due to 1) the stream of nonsense about layout in the system.log and 2) many exceptions do not seem to get into the exception log.

Checkout Ready for Work bug report

All 12 comments

Another example is after Paypal Express fails in sandbox mode (a common occurrence), there are no log messages and all I see on the frontend is this:
screenshot 2016-08-19 12 39 44

Hi, @maderlock. This is a known issue and internal ticket already created MAGETWO-55065.

Any progress there?

@janepoltoratskaya sorry, there are some internal procedures which don't allow us to publish a fix right now.

Issue Is Fixed ?

I'm still wondering the status of this... when will 2.1.2 be released?
It only works in production with test mode disabled with a live key.
Any errors however with why payment failed due to invalid card data, address etc do not get displayed. duplicated orders are created, etc etc etc.

@jvreeken software engineers are not authorized to announce releases. Sorry, cannot help you with that date.

Ce2.1.1
Was running php7.1 but rolled back to 5.6
Still same problem.
Using PayPal payflow. Is this issue with all payment methods?
Read another thread that said it might be related to two address lines.

Any word on a fix for this issue?
Thanks
Rich

@SerhiyShkolyarenko Same issue here - trying to create a custom payment method and no useful error is displayed. It's probably my di.xml but how am I supposed to find the issue? :)

I figured out that the fix is delivered to develop branch squashed with some other fixes. Please, look at 9666070bd190a1095e3c776b4f2a0f4f8bcac497. Fix of this issue is in code/Magento/Checkout/Model/GuestPaymentInformationManagement.php and code/Magento/Checkout/Model/PaymentInformationManagement.php

I'll be glad if you give a feedback if it works for you or not.

Closing the issue as far as fix was delivered to develop branch. Internal issue for backporting is MAGETWO-55065.

@SerhiyShkolyarenko , not sure where the fix for this issue is. Could you please elaborate?

Was this page helpful?
0 / 5 - 0 ratings