The attached script read the Amazon order notification emails (via POP3) and plug these orders into the osCommerce. It use the Amazon order No (parsed from the order email) as the customer company name to ensure orders was not duplicated, and use customer email address (also parsed from the order email) to make sure one customer get only one oscommerce account with our company.
It works very nice but occasionally some orders (in table orders) was not fully inserted into the database, around 3% of the orders insert via this code ended with no customer name/address, but the customer company name (Amazon order no parsed from email) is showing in the orders. This will also prevent the same amazon order to be entered again because the script will check first the company name (in this case the amazon order No) is unique.
So we need a revision to make sure if an order wwas inserted without customer details, then it should be immediately removed from the database, and the order email in the pop3 mailbox was not deleted.
You will need to provide 24 months maintenance for the revision.