- This topic has 1 reply, 2 voices, and was last updated 13 years, 10 months ago by .
Viewing 2 posts - 1 through 2 (of 2 total)
Viewing 2 posts - 1 through 2 (of 2 total)
- You must be logged in to reply to this topic.
Support site for Tips and Tricks HQ premium products
by
Tips and Tricks HQ Support Portal › Forums › WP eStore Forum › Sale recorded twice
A customer bought my ebook yesterday at http://www.ultimatesdlc.com/. The transaction was recorded twice in the customer and sales tables. The pdf file was also stamped 3 times. The transaction IDs for both recorded sales were identical. The cutomer ids were different consecutive numbers. Paypal recorded a single transaction and payment.
My guess is the customer became impatient waiting for the book to be stamped and hit the browser refresh button to speed things along. If that’s what he did, it should not trigger another transaction from being added to the database.
I was able to back the second incorrect transaction from the customer table and adjust the number of items sold count in the inventory table. I cannot remove the errant second sale from the sales table. MySQL won’t allow it because there is no primary key on the sales table. I suggest adding a primary key to the sales table so we can delete incorrectly recorded sales or give us a button that allows us to completely back out of an incorrectly recorded sale. Otherwise fixing the sales table to correct the data requires some technical expertise that is very likely beyond the reach of your standard customer.
The post payment transaction stuff that updates the database cannot be affected by what the suer does on his/her browser. It is linked to PayPal’s IPN and the IPN gets triggered when the “Pay” button is clicked on PayPal’s checkout page. The pay button gets disabled once you click it once so there is nothing the customer can do. The two main causes of this can be the following:
1) PayPal didn’t get the proper handshake from your server when it sent the IPN so it sent it again
2) Your server had a small hiccup when the script was processing the particular sale.
I will look into adding a Primary Key to the sales table.