MiniVend Akopia Services

[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date ][Minivend by thread ]

Re: [mv] executing a cgi script in a minivend session



On 29 Sep, Shao Zhang wrote:
> ******    message to minivend-users from Shao Zhang <shao@shaoz.dhs.org>     ******
> 
> Hi,
> 	In my pages/ord directory, I have the following files:
> 
> 	checkout.html,
> 	payment.html,
> 	payment.cgi
> 
> 	In checkout.html, if the user choose to use online credit card
> 	processing method, then minivend will call payment.html.
> 
> 	In payment.html, it just presents a form to the user to fill in
> 	their credit card number and other details, then I need to call
> 	the payment.cgi script to contact the bank to do the real
> 	transaction. If succsess, then I would like to present users
> 	with the receipt([include etc/receipt.html])
> 
> 	How do I do this? Could someone give me some examples? In
> 	addition, I would like to preserve the .cgi extension.
> 
> 	Thanks in advance.
> 
> Shao.
> 


Hi Shao Zhang,

i don't know about your "payment.cgi". But maybe an example to call
another cgi script with "formmail.cgi" can helps you?

I have a page like "formmail.html" with a form tag. The codes is e.g.
this:

<FORM ACTION="/cgi-bin/formmail.cgi" METHOD="POST">
              ^^^^^^^^^
make sure, you are able to use a cgi file from another directory. Some
web server doesn't allow any cgi files outside from the cgi-bin
directory.

<INPUT TYPE=hidden NAME="recipient" VALUE="__ORDERS_TO__">
                         ^^^^^^^^^
                         This is a variable name (email-address) e.g.

any stuff....


<input type=hidden name="env_report" value="REMOTE_HOST,REMOTE_ADDR,REMOTE_USER,HTTP_USER_AGENT">
<input type=hidden name="print_config" value="realname">
<input type=hidden name="required" value="realname, country, city, zipcode, phoned, comments">
<input type=hidden name="sort" value="comments">
<input type=hidden name="title" value="Thank You for Your Suggestion">
<input type=hidden name="redirect" value="/cgi-bin/yourshopname/yournextpage.html">
<input type=hidden name="return_link_url" value="/cgi-bin/yourshopname/yourreturnpage.html">
<input type=hidden name="return_link_title" value="Back to yourshop">

</FORM>

You can get this from

# FormMail                        Version 1.6                                #
# Copyright 1995-1997 Matt Wright mattw@worldwidemart.com                    #
# Matt's Script Archive, Inc.:    http://www.worldwidemart.com/scripts/      #

In this script, you must change something like

$mailprog = '/usr/sbin/sendmail'; # For example
@referers = ('youdomainname');

I hope this give you any suggestions!

Joachim

-- 
Hans-Joachim Leidinger
buch online                 jojo@buchonline.net
Munscheidstr. 14            FAX: +49 209 1971449
45886 Gelsenkirchen



Search for: Match: Format: Sort by: