osCmax v2.5 User Manual
Results 1 to 4 of 4

How to prevent order numbers from being skipped?

This is a discussion on How to prevent order numbers from being skipped? within the osCMax v2 Features Discussion forums, part of the osCmax v2.0 Forums category; I'm a long time osC user migrating my store to osCMax. I'm currently testing the order-payment process and have found ...

      
  1. #1
    Member Shortbus's Avatar
    Join Date
    Jul 2010
    Posts
    56
    Rep Power
    2


    Default How to prevent order numbers from being skipped?

    I'm a long time osC user migrating my store to osCMax. I'm currently testing the order-payment process and have found that if the payment for an order fails, then that Order ID is lost.

    For example, say the next order in the sequence is 100 and if the payment is successful, then I will be able to view Order # 100 in the admin, but if the order fails, then # 100 is gone and the next order to be successfully placed will have # 101.

    This is not the case with my current osC 2.2ms2 store. In nearly 7 years, I've never had an order number disappear (except for the occasional problem caused by google checkout). If one customer's payment fails or they decide not to buy, then the next customer to place an order gets the next order number in sequence no matter what.

    Is there a setting in osCMax that will prevent these lost order IDs? Someone asked about this in 2006. Hopefully in that time someone figured out why osC can get away with this and made it possible on osCMax too.

    THREAD -> Order numbers being skipped?

  2. #2
    osCMax Developer

    michael_s's Avatar
    Join Date
    Jul 2002
    Location
    Phoenix, AZ
    Posts
    19,907
    Rep Power
    568


    Default Re: How to prevent order numbers from being skipped?

    With something like this, you need to be more specific about your checkout process:

    What payment module is used and how can I reproduce it. How can I get an order to "fail" as I am not sure what this means. When I do a checkout and the say the credit card is declined, I just get put back on the payment method page. If I abandon at that point, there is no order in the system. Likewise, if I abandon the cart with any other method, I get no order in the database.

    Confirm the details/method to reproduce and I will look into it.
    Michael Sasek
    osCMax Developer


    osCmax Installation Service
    - Have our professionals install osCmax on your server - same day service!
    osCmax 2.5 User Manual - the must have beginners guide to osCmax v2.5

    Stay Up To Date with everything osCMax:
    Free osCmax Newsletters - Security notices, New Releases, osCMax News
    osCmax on Twitter - Up to the minute info as it happens. Know it first.

    osCmax Documentation

  3. #3
    Member Shortbus's Avatar
    Join Date
    Jul 2010
    Posts
    56
    Rep Power
    2


    Default Re: How to prevent order numbers from being skipped?

    It looks to be a problem with PayPal Website Payments Standard. I'm using the sandbox.

    At checkout_payment.php I will choose the PayPal Website Payments Standard option. This is the only paypal module installed.

    Click the "continue" button and it will load checkout_confirmation.php.

    Click the "confirm order" button and it will load a page at sandbox.paypal.com asking me to log in. I log in with my sandbox credentials.

    Once logged in, I click the yellow "pay now" button and it returns an error, "This invoice has already been paid. For more information, please contact the merchant."

    Then I click the grey "return to merchant" and it returns me to checkout_payment.php.

    That is what I meant by failed order, and the order ID that would have been assigned to that order is now gone.

    Now, I can do one of two things after it has returned me back to my store...

    I can choose another payment option such as Check/Money Order. This will indubitably submit successfully and the order will be created, however it will have an order ID that is one higher than what the failed paypal sandbox transaction would have had despite the fact it's still the same shopping session.

    Or I can try to pay with paypal again. It will fail and return me back to my site as described above, except now there will be two order IDs that will be forever unavailable; one for each failed paypal payment.

    I've tested this for up to five failed paypal payments in a row, then choosing Check/MO for the sixth attempt. This sixth attempt will go through and I can see the order in the admin, but the order ID will be six digits higher than the previous order in the admin. Therefore, if the most recent order ID is 100 and I make 5 payment attempts with paypal and they all fail, at minimum the next lowest order ID to be assigned will have ID 106. 101 thru 105 have all been "lost".

    I followed the steps from here -- Sandbox? This invoice has already been paid. - osCommerce Support Forum -- and no matter what, paypal keeps saying the invoice has been paid and when I finally do get a successful payment (ie: choosing the Check/MO) it shows up in the admin and all the interim order IDs have been skipped.

    I know this isn't a huge deal, but about 25-50% of my payments come from paypal so it is a bit frustrating to be skipping so many order IDs.

  4. #4
    osCMax Developer

    michael_s's Avatar
    Join Date
    Jul 2002
    Location
    Phoenix, AZ
    Posts
    19,907
    Rep Power
    568


    Default Re: How to prevent order numbers from being skipped?

    It is not a problem, it is how paypal modules must work. What happens is that when you leave your site to paypal, in order for IPN to work on the callback from paypal, there must be an order in the database for it to update.

    There is no way around it.

    "This invoice has already been paid. For more information, please contact the merchant."
    This may help:
    PayPal "This invoice has already been paid." - osCommerce Support Forum
    Michael Sasek
    osCMax Developer


    osCmax Installation Service
    - Have our professionals install osCmax on your server - same day service!
    osCmax 2.5 User Manual - the must have beginners guide to osCmax v2.5

    Stay Up To Date with everything osCMax:
    Free osCmax Newsletters - Security notices, New Releases, osCMax News
    osCmax on Twitter - Up to the minute info as it happens. Know it first.

    osCmax Documentation

Similar Threads

  1. Change the order numbers
    By altenter in forum osCmax v2 Customization/Mods
    Replies: 1
    Last Post: 03-17-2010, 12:09 PM
  2. UPS tracking numbers in order update
    By smartwork in forum osCmax v2 Customization/Mods
    Replies: 2
    Last Post: 12-09-2009, 07:11 AM
  3. How to start your order numbers at 9 Digits
    By jamesanderson2 in forum osCmax v2 Customization/Mods
    Replies: 2
    Last Post: 03-19-2009, 12:47 AM
  4. Creating order numbers
    By nana in forum osCMax v2 Features Discussion
    Replies: 1
    Last Post: 02-17-2009, 08:17 AM
  5. Order numbers being skipped?
    By countingsheep in forum osCmax v2 Installation issues
    Replies: 2
    Last Post: 10-04-2006, 05:29 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •