Closed
Description
When an order
Steps to reproduce
- Install Magento from
develop
branch. - Add Product to the cart.
- Install (for instance) SaferPay plugin from CustomWeb
- Go to Checkout
- Fill in shipment details
- Select payment method and click "Place order"
- Press back in button (not cancel in payment provider)
- Press "Place order" again
Expected result
- You would go to the payment provider and continue on the already made order in the system
Actual result
- You get an error due to that the database table sales_order already contains the increment number
- The order is now in "pending payment" state until the timeout occurs, and the user cannot proceed with checkout without clearing cookies or switching web browser.
Stack trace
[2016-05-12 02:37:15] main.CRITICAL: Zend_Db_Statement_Exception: Report ID: webapi-5733ec5b3500f; Message: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '3000000496-3' for key 'SALES_ORDER_INCREMENT_ID_STORE_ID', query was: INSERT INTO `sales_order` (`state`, `status`, `coupon_code`, `protect_code`, `is_virtual`, `store_id`, `customer_id`, `base_discount_amount`, `base_grand_total`, `base_shipping_amount`, `base_shipping_tax_amount`, `base_subtotal`, `base_tax_amount`, `base_to_global_rate`, `base_to_order_rate`, `discount_amount`, `grand_total`, `shipping_amount`, `shipping_tax_amount`, `store_to_base_rate`, `store_to_order_rate`, `subtotal`, `tax_amount`, `total_qty_ordered`, `customer_is_guest`, `customer_note_notify`, `customer_group_id`, `quote_id`, `base_shipping_discount_amount`, `base_subtotal_incl_tax`, `base_total_due`, `shipping_discount_amount`, `subtotal_incl_tax`, `total_due`, `weight`, `increment_id`, `applied_rule_ids`, `base_currency_code`, `customer_email`, `customer_firstname`, `customer_lastname`, `customer_middlename`, `discount_description`, `global_currency_code`, `order_currency_code`, `remote_ip`, `store_currency_code`, `store_name`, `x_forwarded_for`, `total_item_count`, `discount_tax_compensation_amount`, `base_discount_tax_compensation_amount`, `shipping_discount_tax_compensation_amount`, `base_shipping_discount_tax_compensation_amnt`, `discount_tax_compensation_invoiced`, `base_discount_tax_compensation_invoiced`, `discount_tax_compensation_refunded`, `base_discount_tax_compensation_refunded`, `shipping_incl_tax`, `base_shipping_incl_tax`, `coupon_rule_name`, `gift_message_id`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) in /opt/store.traxfamily.com/vendor/magento/framework/Webapi/ErrorProcessor.php:194
Stack trace:
#0 /opt/store.traxfamily.com/vendor/magento/framework/Webapi/ErrorProcessor.php(139): Magento\Framework\Webapi\ErrorProcessor->_critical(Object(Zend_Db_Statement_Exception))
#1 /opt/store.traxfamily.com/vendor/magento/module-webapi/Controller/Rest.php(163): Magento\Framework\Webapi\ErrorProcessor->maskException(Object(Zend_Db_Statement_Exception))
#2 /opt/store.traxfamily.com/var/generation/Magento/Webapi/Controller/Rest/Interceptor.php(24): Magento\Webapi\Controller\Rest->dispatch(Object(Magento\Framework\App\Request\Http))
#3 /opt/store.traxfamily.com/vendor/magento/framework/App/Http.php(115): Magento\Webapi\Controller\Rest\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
#4 [internal function]: Magento\Framework\App\Http->launch()
#5 /opt/store.traxfamily.com/vendor/magento/framework/Interception/Interceptor.php(144): call_user_func_array(Array, Array)
#6 /opt/store.traxfamily.com/var/generation/Magento/Framework/App/Http/Interceptor.php(26): Magento\Framework\App\Http\Interceptor->___callPlugins('launch', Array, Array)
#7 /opt/store.traxfamily.com/vendor/magento/framework/App/Bootstrap.php(258): Magento\Framework\App\Http\Interceptor->launch()
#8 /opt/store.traxfamily.com/pub/index.php(73): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http\Interceptor))
#9 {main} [] []
Metadata
Metadata
Assignees
Labels
No labels