Skip to content
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

order not being canceled #4580

Closed
SidneyBilliet opened this issue May 19, 2016 · 10 comments
Closed

order not being canceled #4580

SidneyBilliet opened this issue May 19, 2016 · 10 comments
Assignees
Labels
bug report Component: Payment Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development

Comments

@SidneyBilliet
Copy link

Steps to reproduce

  1. go to https://www.bariatricadvantage.eu
  2. log-in to the account by using email: [email protected] and pwd: testtest
  3. Add a Product to the cart.
    3.Try checking out using Paypal

Expected result

  1. You should be able to checkout

Actual result

  1. Error message appears: "PayPal gateway has rejected request. Payment has already been made for this invoiceID (Customer Tax Group not applied on order creation #10412: Duplicate invoice)".

2016-05-19_16h30_54

  1. Error log:
    {{2016-05-02 13:07:21 main.CRITICAL: exception 'Zend_Db_Statement_Exception' with message 'Report ID: webapi-572751096f303; Message: SQLSTATE23000: Integrity constraint violation: 1062 Duplicate entry 'BAWS-000000039-6' for key 'SALES_ORDER_INCREMENT_ID_STORE_ID', query was: INSERT INTO sales_order (state, status, protect_code, shipping_description, 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, shipping_method, store_currency_code, store_name, 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, gift_message_id) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)' in /var/www/www.bariatricadvantage.eu/2.0.2-355-g24e5c4a/lib/internal/Magento/Framework/Webapi/ErrorProcessor.ph...
    Stack trace:
    #0 /var/www/www.bariatricadvantage.eu/2.0.2-355-g24e5c4a/lib/internal/Magento/Framework/Webapi/ErrorProcessor.ph...: Magento\Framework\Webapi\ErrorProcessor->_critical(Object(Zend_Db_Statement_Exception))
    Can you commit to repository a folder dev/tests/static ? #1 /var/www/www.bariatricadvantage.eu/2.0.2-355-g24e5c4a/app/code/Magento/Webapi/Controller/Rest.php(163): Magento\Framework\Webapi\ErrorProcessor->maskException(Object(Zend_Db_Statement_Exception))
    BUG FIX - Uncaught exception when accessing admin with none existent use... #2 /var/www/www.bariatricadvantage.eu/2.0.2-355-g24e5c4a/var/generation/Magento/Webapi/Controller/Rest/Intercept...: Magento\Webapi\Controller\Rest->dispatch(Object(Magento\Framework\App\Request\Http))
    __DIR__ Typo fixed #3 /var/www/www.bariatricadvantage.eu/2.0.2-355-g24e5c4a/lib/internal/Magento/Framework/App/Http.php(115): Magento\Webapi\Controller\Rest\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http))
    Enable Magento_Profiler by SetEnv #4 internal function: Magento\Framework\App\Http->launch()
    Enable automated CRUD setup for Adminhtml Grids #5 /var/www/www.bariatricadvantage.eu/2.0.2-355-g24e5c4a/lib/internal/Magento/Framework/Interception/Interceptor...: call_user_func_array(Array, Array)
    Why use private for message ? #6 /var/www/www.bariatricadvantage.eu/2.0.2-355-g24e5c4a/var/generation/Magento/Framework/App/Http/Interceptor.p...: Magento\Framework\App\Http\Interceptor->___callPlugins('launch', Array, Array)
    Ability to provide configuration for different environments in app/etc/local.xml #7 /var/www/www.bariatricadvantage.eu/2.0.2-355-g24e5c4a/lib/internal/Magento/Framework/App/Bootstrap.php(258): Magento\Framework\App\Http\Interceptor->launch()
    Clear separation for Controller and controllers required with Full Controller path #8 /var/www/www.bariatricadvantage.eu/2.0.2-355-g24e5c4a/pub/index.php(37): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http\Interceptor))
    Added: dispatchEvent to deleteAction(). Only existed in massDeleteAction(). #9
    {main}

[] []}}
screen shot 2016-05-02 at 15 24 28

@alena-marchenko
Copy link

Hi @SidneyBilliet

This can be resolved by setting "No, allow multiple payments per invoice ID" option in your PayPal account.

@alena-marchenko
Copy link

Hi @SidneyBilliet

Is this issue still reproducible after adjusting PayPal account settings?

@SidneyBilliet
Copy link
Author

@alena-marchenko , Hi Alena, the problem was fixed after adjsuting the paypal setting. However we would like to understand why Magento sent the same invoice number several times. Do you have an answer to that question, please?

@Nerogee
Copy link

Nerogee commented Jun 15, 2016

Hi, @alena-marchenko
I faced the same issue when set the payment action to order. IPN (type = Order Created) from paypal which i assume it's the instruction for order creation but failed. This cause the order ID or invoice ID is captured in Paypal but not created in Magento due to unknown reason. So that invoice ID will continue be used to send request to paypal but rejected.
Maybe changing the setting in paypal can get pass this issue, but i don't think it's desired since it will cause management trouble.

@alena-marchenko
Copy link

alena-marchenko commented Jun 30, 2016

Hi @SidneyBilliet

This issue can occur in case when you use/used your PayPal account on different Magento instances, so there has been already created transaction with such invoice id on PayPal side.

@stevenvdp
Copy link
Contributor

@alena-marchenko Hi, I'm a colleague of @SidneyBilliet and I have to tell that the issue still isn't resolved. This because the problem is not related to PayPal on it's own.

This ticket also describes the problem: #4474

So the steps to reproduce:

  • Place order and try to pay with paypal (or other method)
  • Cancel the payment
  • Try again to pay, this will throw an error.

When you're a guest user you can simply remove your cookies to try again, but when you're logged in with your account the ID is related to your account and the only solution is to remove the quote in the db.

@alena-marchenko
Copy link

Hi @SidneyBilliet , @stevenvdp, @Nerogee

We've created MAGETWO-54412 internal ticket regarding this issue

@stevenvdp
Copy link
Contributor

Hi @alena-marchenko, do you have any updates on this issue?
Thanks in advance!

mmansoor-magento pushed a commit that referenced this issue Oct 19, 2016
[Folks] Bugs
- MAGETWO-58334 [Github] Free shipping is not applied if cart price rule match #6584
- MAGETWO-57278 For Dutch locale, ZIP in checkout is already giving out a "validation failed" error at page load
- MAGETWO-57675 [GITHUB] WYSIWYG editor does not show. #6222 #4828 #6815
- MAGETWO-56836 [FT] Update wishlist button doesn't receive the click in AddProductsToCartFromCustomerWishlistOnFrontendTest
- MAGETWO-54412 [MERCHANT] Integrity Constraint Violation when creating orders #4580
- MAGETWO-58730 [Github] Incorrect province code sent on Checkout to UPS #6564
@alena-marchenko
Copy link

Hi @SidneyBilliet

The fix is delivered to develop branch. Closing the issue.

@alakhdeveloper
Copy link

SALES_ORDER_INCREMENT_ID_STORE_ID in db you need to update your order incremented id. that issue is occuring due to the incremented id already used by paypal.

internally incremented id is used in payap order unique id, if it already used in paypal then you will get such issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug report Component: Payment Issue: Ready for Work Gate 4. Acknowledged. Issue is added to backlog and ready for development
Projects
None yet
Development

No branches or pull requests

7 participants