RE: Worldpay support III
ambience <[email protected]>
| Newsgroups | gmane.comp.web.oscommerce.contributions |
|---|---|
| Message-ID | <43f2ae77f0edde7166e8a6d5f6e7d154@osCommerce-Forums> |
This message was sent from: Contributions http://forums.oscommerce.com/viewtopic.php?p=227281#227281 ---------------------------------------------------------------- Glad it worked! Don't thank me dude; just help someone else out via forums if you can.. I've been helped countless times, just trying to give some back. Just had a thought for the cartid field by the way! I think the order number in oscomerce is auto-incremented when new orders are placed. So if your last order number was 45, you could safely assume your next order number would be 46.. With that thinking, you could retrieve the last known order number in the database, add 1 to it, and send that as your cartid field to worldpay with the assumption that if the order is successful the order number should match up.. The only case where this would not theoretically work, was if two orders are placed at the same time and one customer is faster than another one during payment. A places order, redirects to WP. B places order, redirects to WP. B completes order, success A completes order, success. In this case the order numbers would be swopped around.. Not sure how to go about doing this yet; will investigate much later today. If you're bored, try it out :)