-
Notifications
You must be signed in to change notification settings - Fork 9.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Braintree and Custom Payment Method Product 400 Bad Request on purchase #5409
Comments
What type of payment action ( |
@stevewinni, this is known issue and related to incorrect upgrade scripts for Sales module. On the fresh install, it should work. |
Opppss.... OK for those who come after the fix is; ALTER TABLE sales_invoice_grid ADD base_grand_total decimal(12,4) AFTER grand_total; |
For now, there is no workaround, because problem is related to db schema changes between upgrades. |
Thank Joni... Looks like the DB amend listed in #4785 works.... I have success payment posts via Braintree after I amend DB.. |
@joni-jones On the fresh install, it still doesn't work. |
@flecxie. I don't use table prefixing |
@Nerogee: Do you have debugging enabled / do you see anything in var/report/debug.log? I have tried setting up a Braintree account on a vanilla Magento CE 2.1.0 installation (without table prefixing) and it did work for me (see #5902). The "400 Bad Request" can be caused by a large variety of reasons, you will probably have to debug with Xdebug (see https://www.fontis.com.au/blog/debugging-magento-with-xdebug) to figure out where things go wrong exactly... |
@flecxie sorry for late reply. I don't use table prefixing. Magento2.1 is fresh installed. I got message like "can't place order, please try again later.". I did notice for the debug.log that the Invoice ID is not updated which result in paypal keep receiving the same Invoice ID and thus fail to pass through or this may even cause problem when try to save order in system due the duplicate order ID (duplicated key). |
hi there, But we also always get the '400 Bad Request' in the console and the message "Unable to place order. Please try again later". Nothing worth to be mentioned in debug.log (see attachment). thanks a lot, |
Hi, @romeof1980, you can use xdebug to find the reason of error. You need to set a breakpoint on this line and you will see original exception message. |
hi @joni-jones , thanks a lot for your reply. No when trying to checkout I get the following message from the console: About xdebug.. still trying to figure it out the right procedure to debug this issue. any hint will be highly appreciated. thanks a lot, |
You should be able to set |
Just to add a note (since I just fixed it after 3 full days), renaming the tables and removing the table prefix also solved the 400 error for me using PayFlow Pro. |
Issue was fixed for us following the solution suggested in #5902 (deleting table prefixing and updating table sales_sequence_meta) |
Hi, 2017-02-23T21:33:14+00:00 DEBUG (7): Quote Before Quote Submit {"Reserved Order ID":null,"Quote ID":"324944","Customer Email":"[email protected]","Checkout Session":"{"shipper_global":{"dateFormat":"mm/dd/yyyy","currencyCode":"usd","weightUnit":"lb","dropshipShowMergedRates":true,"dropshipShowItemDesc":false,"dropshipDescription":"Multiple Warehouses","dropshipTitle":"Shipping","distanceUnit":"MI","carrierGroupDescription":"Origin","calendarConfirm":false,"shippingTooltipText":"","showPickupMulti":false,"cityRequired":false,"sortBasedPrice":true,"dropshipShowWeight":false,"preferredLocale":"en-US","transaction":"SHQ_REQUEST_20170223_2133_XXX.95881385"},"custom_method_code":"shqFDX_FDX_2DA"}"} 2017-02-23T21:33:17+00:00 DEBUG (7): Error on place order {"error":"SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'braintree-923835-mf5krd2' for key 'UNQ_54DCE14AEAEA03B587F9EF723EB10A10', query was: INSERT INTO Given that the user get's many Magento order ids, it would appear that Magento is trying to charge the users many times. |
Steps to reproduce
Expected result
Actual result
"#0 /var/www/vhosts/domain.com/dev.domain.com/vendor/magento/framework/Interception/Interceptor.php(146): Magento\Checkout\Model\PaymentInformationManagement->savePaymentInformationAndPlaceOrder(53, Object(Magento\Quote\Model\Quote\Payment), Object(Magento\Quote\Model\Quote\Address))
Can you commit to repository a folder dev/tests/static ? #1 /var/www/vhosts/domain.com/dev.domain.com/var/generation/Magento/Checkout/Model/PaymentInformationManagement/Interceptor.php(26): Magento\Checkout\Model\PaymentInformationManagement\Interceptor->___callPlugins('savePaymentInfo...', Array, Array)
BUG FIX - Uncaught exception when accessing admin with none existent use... #2 [internal function]: Magento\Checkout\Model\PaymentInformationManagement\Interceptor->savePaymentInformationAndPlaceOrder(53, Object(Magento\Quote\Model\Quote\Payment), Object(Magento\Quote\Model\Quote\Address))
__DIR__ Typo fixed #3 /var/www/vhosts/domain.com/dev.domain.com/vendor/magento/module-webapi/Controller/Rest.php(307): call_user_func_array(Array, Array)
Enable Magento_Profiler by SetEnv #4 /var/www/vhosts/domain.com/dev.domain.com/vendor/magento/module-webapi/Controller/Rest.php(216): Magento\Webapi\Controller\Rest->processApiRequest()
Enable automated CRUD setup for Adminhtml Grids #5 /var/www/vhosts/domain.com/dev.domain.com/var/generation/Magento/Webapi/Controller/Rest/Interceptor.php(37): Magento\Webapi\Controller\Rest->dispatch(Object(Magento\Framework\App\Request\Http))
Why use private for message ? #6 /var/www/vhosts/domain.com/dev.domain.com/vendor/magento/framework/App/Http.php(135): Magento\Webapi\Controller\Rest\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
Ability to provide configuration for different environments in app/etc/local.xml #7 /var/www/vhosts/domain.com/dev.domain.com/vendor/magento/framework/App/Bootstrap.php(258): Magento\Framework\App\Http->launch()
Clear separation for Controller and controllers required with Full Controller path #8 /var/www/vhosts/domain.com/dev.domain.com/index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http))
Added: dispatchEvent to deleteAction(). Only existed in massDeleteAction(). #9 {main}"
The text was updated successfully, but these errors were encountered: