Re: Transaction processing advice



Shelly wrote:

I am looking for some advice on the design of a transaction processing sequence. As I xcurrently have it, the sequence is as follows:

1 - Gather all the information from the user other than the actual charging information.
2 - Present the user with a summary of what he is about to purchase
3 - Give him the choice of card (via PayPal) or by check.
4 - If by check, go to a screen that he has to click the "Pay" button.
5 - After the button is clicked, the data are entered into the database and emails are sent to the customer and the seller.
6 - If by Paypal, he is taken to the PayPal screen where charge information is collected and processed. A successful return comes back to a thank you screen on my server where the data are entered into the database. PayPal handles sending the emails to the customer and the seller.

I set up something similar with the CC server and my server sending emails on confirmation, at least send yourself an email so you can see them come in pairs & know it all worked.

I suppose the other thing would be to log something in your system, that would also catch a situation where someone's credit card wasn't approved or they had too much hassle with paypal & gave up.


My problem is this: What happens if there is a failure in connecting to the database after paying via PayPal? I use the same code (an included file) for the connection and the same code ( a different included file) for the insertion.

Last night the seller tested a transaction and got:

*Warning*: mysql_pconnect(): Can't connect to MySQL server on
'dbet.valueweb.net' (115) in
*/nfs/cust/0/43/11/711340/web/dbConnect.php* on line *6*
Can't connect to MySQL server on 'dbet.valueweb.net' (115)

Ack, yes, as mentioned, turn off all error reporting. I once got an error similar to that where it spit out the admin password in the error message!


He sent me an email and then when I tried I succeeded. Not connecting when paying by check is bad enough, tbut what about AFTER the customer has already paid? That would be terrible.
.