Asynchronous cgi that returns nothing. Possible? O:-)
Jeff Shannon
jeff at ccvcorp.com
Tue Apr 23 14:38:37 EDT 2002
In article <olvacuoe4oo1aa5gjj6sa4vsimdom3pabv at 4ax.com>,
frr at easyjob.net says...
>
> Whenever a customer clicks on the order button, I'd like to:
>
> a) Save some info into a database
> b) Send the order to the payment processing company
>
> I was planning to use a Python CGI for a. This cgi shouldn't return anything
> and shouldn't change the contents of the browser. Is this possible? O:-)
So that the person making the order has no idea whether it
actually went through or not? I think that this is bad UI
design. When I am submitting information to a website,
*especially* if there's a monetary transaction involved, I want
to have some sort of confirmation that it succeeded. Even if you
define "success" as your script receiving the information and
saving it for later deposit into the database. HTTP connections
get lost or delayed often enough to make any submission
uncertain.
(If I got no confirmation that my order was received, I'd be
likely to assume that the connection was bad, and might submit
the order again... and again... and then, when I got charged for
a dozen orders when I only wanted one, I might consider a lawsuit
against your company.)
> Besides, I'd like this script to return immediatelly, either if it can save or
> not the info, so if the db server is down I don't lose the sale. How can I do
> this? O:-) I was thinking of using 2 scripts:
>
> scripta: Forks scriptb and returns immediatelly
> scriptb: saves the info to the db
This plan should work, but again, I *really* think that you
should be providing some sort of confirmation to the user. Doing
otherwise is just *begging* for all sorts of complaints.
--
Jeff Shannon
Technician/Programmer
Credit International
More information about the Python-list
mailing list