While doing some testing on my development machine I added 4 items to my shopping cart and checked out. After entering my payment info and clicking the "Place this order" button, the sfMessage div on the checkout page displayed the following:
Insert of '1800978614-e74f77a3-0731-4138-a8cc-5ea40b8458d2' failed: Telerik.OpenAccess.RT.sql.SQLException: Cannot insert duplicate key row in object 'dbo.sf_user_link' with unique index 'idx_sf_user_link'. The statement has been terminated. at Telerik.OpenAccess.RT.Adonet2Generic.Impl.PreparedStatementImp.execute() at OpenAccessRuntime.Relational.conn.PooledPreparedStatement.execute() at OpenAccessRuntime.Relational.RelationalStorageManager.generateInserts(NewObjectOID oid, Int32 index, ClassMetaData cmd, PersistGraph graph, Int32 fieldNos, CharBuf s, Object oidData, IntArray toUpdateIndexes) INSERT INTO [sf_user_link] ([app_name], [id], [last_modified], [membership_info], [role_id], [user_id], [voa_version]) VALUES (?, ?, ?, ?, ?, ?, ?) (set event logging to all to see parameter values)
The items remain in the cart and after 30 seconds or do the div auto hides itself. If I try to click the "Place this order" button again, the div displays the following message:
A duplicate transaction has been submitted.
Again, the div auto hides 30 seconds or so later and if I try clicking the button again, the process repeats with the first message. Oddly, I get the "Customer Receipt/Purchase Confirmation" email but not the "Confirming Order nn" email. At this point the cart is in limbo and the only way to submit the order is to empty the cart and start from scratch. I've had a look at the sf_user_link table (see attached image) and there is only one record and none of the columns contain the 1800978614-e74f77a3-0731-4138-a8cc-5ea40b8458d2 value that the message is complaining about. The sf_ec_order contains a row that matches the date, time, and dollar amount of the order and has an order_attempts value of 5 which matches the number of times I tried to submit the order that resulted in the messages listed above. So it does look like the order was received. On the ecommerce backend, the order shows as "Authorized". I'm a little puzzled by the multiple emails. When an order goes through successfully, I get 2 emails. One is titled: "Nashoba Learning Group Customer Receipt/Purchase Confirmation" (see receipt1.png). The other is titled; "Confirming Order NN" (where NN is the actual order number). Is the first email being generated by the payment processor? --Steve
I have tested the scenario you mentioned and didn`t reproduced the problem.
I am not sure what is causing the products to auto hide after 30 seconds, is this happening every time you purchase ?
I am not sure why this is happening I was unable to reproduce it on my project.
To better specify why this error is happening and what is causing it can you test creating two pages with out a template (start from scratch). Place product list widget and shopping cart on one of the pages and checkout on the other page (I am not sure how the ecommerce is setup at your end and so I am only refering to the tree widgets that are needed to setup a shop). Are you getting the same error when taking the same steps to checkout on those pages?
If yes then there should be a problem with the ecommerce module.