|
Posted by Shelly on 03/02/07 11:41
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.
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)
Line 6 in dbConnect is:
$dbLogin = mysql_pconnect($hostname, $username_db, $password_db) or
die(mysql_error());
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.
So, my questions are:
1 - Other than an intermittentcy on the server, are there any ideas why this
would happen?
and much, much, more importantly:
2 - What would you reccommend to bulletproof this so that the customer is
protected and the transaction gets processed. One idea I have is rather
than "die", that I send an email to the seller with the insertion query so
that it can be manually inserted later.
Thanks for any help.
Shelly
Navigation:
[Reply to this message]
|