Magento Paypal orders automatically cancelling

After tearing my hair out for weeks working on a problem where no matter what i tried every time an order was placed on a customers magento website, where paypal was the selected payment gateway the order would always automatically cancel nearly immediately after the order was placed.

The logs werent helpful, and the magento order status notes would basically just say that the order was cancelled, and the customer notified. We noticed this was only occuring for paypal customers, other payment gateways would allow the order to go through as normal.

Initially we thought it must have been a database conflict after we had reset a bunch of test orders. We even went as far as a full magento re-install to try and fix the issue. All with no fix. 🙁

Finally one afternoon, i found the answer! And boy was it frustratingly simple (as it often is)

In the end the issue was with Paypal – not magento at all!

Paypal has a feature that is enabled by default. “Block accidental payments”

What does this do? PayPal states “You may prevent accidental payments by blocking duplicate invoice IDs”

So hows this affect us you ask?

In my customers case this wasn’t the first time they had used their paypal account for accepting orders through an online store, so the security feature above was jumping in and not allowing the payment to complete, this would then send the failed hit back to magento.

All because invoices with that reference number had been previously run through Paypal (even if it was for a totally different site). To fix it we simply disabled this option as it was the best for us. You do however have a few options depending on your situation.

Your options for a fix:

  1. Ensure each magento store is setting a unique invoice ref number, perhaps appending it with text storeid[invoiceid]
  2. Use an individual Paypal account for each magento store you intend on operating.
  3. Disable the feature in Paypal (easiest – this is the option we opted for)

Disabling the option in Paypal

If you head into your Paypal

  1. Select the profile option under the My account Menu
  2. Select My selling tools (in the left menu)
  3. Select the update option on the block payments section
  4. Select the “No, allow multiple payments per invoice ID”
  5. Save the options and exit paypal.
You should now find that you no longer find magento paypal orders are being automatically cancelled.
If this article has been of help to you, please let me know with a comment below.
No votes yet.
Please wait...

3 thoughts on “Magento Paypal orders automatically cancelling”

  1. Do you happen to know if this could be the same problem if you are using Payflow Link to submit your payment? We’ve been having some phantom Magento Cancelled orders that seem to have no explanation.

    No votes yet.
    Please wait...
  2. Hey, had the same problem so your article came in useful. Thanks vm. David

    No votes yet.
    Please wait...
  3. Bless you!! 🙂

    No votes yet.
    Please wait...

Leave a Comment

Your email address will not be published. Required fields are marked *