[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date
][Minivend by thread
]
Re: [mv] Multiple Payment Methods
On Tue, 14 Sep 1999, Patrick Schoonveld wrote:
>****** message to minivend-users from Patrick Schoonveld <pschoonveld@venux.net> ******
>
>Does anyone have any idea how to make it such that a user can click on a
>button and choose between credit card (cybercash) and just printing an
>mailing/faxing a receipt??
Here's how we've done it ... code for multiple pages, choosing between
credit card and printing a receipt for mail or fax orders on the
first page of checkout. As always, improvements are welcome :-), but
it's in production and functioning as-is.
- checkout.html -
{ the usual Ship To name/address fields here }
<H2>Payment Method:</H2>
<SELECT NAME="payment_method">
<OPTION VALUE="credit_card" CHECKED>Online with Credit Card
<OPTION VALUE="mail_or_fax">By Mail or Fax
</SELECT>
[set Place Order]
mv_todo=submit
[/set]
<DIV ALIGN="right">
<INPUT TYPE=submit NAME=mv_todo VALUE="Place Order">
</DIV>
<INPUT TYPE="hidden" NAME="mv_doit" VALUE="refresh">
<INPUT TYPE="hidden" NAME="mv_orderpage" VALUE="ord/checkout">
<INPUT TYPE="hidden" NAME="mv_failpage" VALUE="special/needfield">
<INPUT TYPE="hidden" NAME="mv_order_report" VALUE="ord/report">
<INPUT TYPE="hidden" NAME="mv_order_profile" VALUE="shipping_profile">
[comment]Setting mv_successpage in the profile below[/comment]
[set shipping_profile]
name=required
address=required
city=required
state=state
zip=zip
payment_method=required
&fatal=yes
&set = mv_successpage ord/payment
&set = mv_order_receipt ord/receipt
[if value payment_method =~ /mail_or_fax/]
&set = mv_successpage ord/mailfax
&set = mv_order_receipt ord/mailfax
&final=yes
[/if]
[/set]
- payment.html -
{ the usual Bill To name/address fields here, prefaced with b_ }
<H2>Credit Card Info:</H2>
<input type="text" name="mv_credit_card_number"
value="[value mv_credit_card_number]" size=19 maxlength=20>
<SELECT name="mv_credit_card_exp_month">
<OPTION VALUE=1 [selected mv_credit_card_exp_month 1]> 01 - January
<OPTION VALUE=2 [selected mv_credit_card_exp_month 2]> 02 - February
<OPTION VALUE=3 [selected mv_credit_card_exp_month 3]> 03 - March
<OPTION VALUE=4 [selected mv_credit_card_exp_month 4]> 04 - April
<OPTION VALUE=5 [selected mv_credit_card_exp_month 5]> 05 - May
<OPTION VALUE=6 [selected mv_credit_card_exp_month 6]> 06 - June
<OPTION VALUE=7 [selected mv_credit_card_exp_month 7]> 07 - July
<OPTION VALUE=8 [selected mv_credit_card_exp_month 8]> 08 - August
<OPTION VALUE=9 [selected mv_credit_card_exp_month 9]> 09 - September
<OPTION VALUE=10 [selected mv_credit_card_exp_month 10]> 10 - October
<OPTION VALUE=11 [selected mv_credit_card_exp_month 11]> 11 - November
<OPTION VALUE=12 [selected mv_credit_card_exp_month 12]> 12 - December
</SELECT>
<SELECT name="mv_credit_card_exp_year">
<OPTION VALUE=99 [selected mv_credit_card_exp_year 99]> 1999
<OPTION VALUE=00 [selected mv_credit_card_exp_year 00]> 2000
<OPTION VALUE=01 [selected mv_credit_card_exp_year 01]> 2001
<OPTION VALUE=02 [selected mv_credit_card_exp_year 02]> 2002
<OPTION VALUE=03 [selected mv_credit_card_exp_year 03]> 2003
</SELECT>
[comment]This should turn Cybercash on within the page[/comment]
<INPUT TYPE="hidden" NAME="mv_click" VALUE="CyberCashOn">
[set CyberCashOn]
mv_cyber_mode=mauthcapture
[perl config]
$Safe{config}->{CreditCardAuto} = 0;
$Safe{config}->{CyberCash} = 1;
return '';
[/perl]
[/set]
[set Complete Order]
mv_todo=submit
[/set]
<DIV ALIGN="right">
<INPUT TYPE=submit NAME=mv_todo VALUE="Complete Order">
</DIV>
<INPUT TYPE="hidden" NAME="mv_cyber_mode" VALUE="mauthcapture">
<INPUT TYPE="hidden" NAME="mv_doit" VALUE="refresh">
<INPUT TYPE="hidden" NAME="mv_orderpage" VALUE="ord/checkout">
<INPUT TYPE="hidden" NAME="mv_failpage" VALUE="special/needfield">
<INPUT TYPE="hidden" NAME="mv_order_report" VALUE="ord/report">
<INPUT TYPE="hidden" NAME="mv_order_profile" VALUE="payment_profile">
[set payment_profile]
b_name=required
b_address=required
b_city=required
evephone=required
b_state=state
b_zip=zip
&set = mv_payment Credit Card ([default mv_credit_card_type])
&fatal=yes
&final=yes
[/set]
- mailfax.html -
<TABLE WIDTH="95%" BORDER="0" CELLSPACING="0" CELLPADDING="0">
<TR>
<TD ALIGN="CENTER" VALIGN="TOP">
[include file="pages/companytitlesecure.html"]
<TABLE WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="6">
<TR>
<TD>
<P ALIGN="center">Your order is completed when you print
this order form. You may send it via regular mail to the
address above or fax it to the number above. Please be sure
to include a payment method - enclose your check, money
order, or correct credit card information when sending your
order. Thank you!</P>
<TABLE WIDTH="100%" BORDER="0" CELLSPACING="0"
CELLPADDING="3" BGCOLOR="#000066"><TR><TD><TABLE
WIDTH="100%" BORDER="0" CELLSPACING="0" CELLPADDING="3"
BGCOLOR="#FFFFCC"><TR><TD ALIGN="center" VALIGN="MIDDLE">
<FONT FACE="Verdana,Arial,Helvetica" SIZE="+2"
COLOR="#CC0000"><B>Mail / Fax Order Form</B></FONT>
</TD></TR></TABLE></TD></TR></TABLE>
<TABLE WIDTH="100%" BORDER=1 CELLSPACING=0 CELLPADDING=3>
<TR VALIGN="top" ALIGN="left" BGCOLOR="#FFFFCC">
<TD WIDTH="50%"><H2>[value name]<BR>
[value companyname]</H2></TD>
<TD ALIGN="right" WIDTH="50%"><H2>[calc]localtime[/calc]<BR>
Order [value mv_order_number]</H2></TD>
</TR>
<TR VALIGN="top" ALIGN="left">
<TD WIDTH="50%" NOWRAP>Bill To:<BR>
Name:
___________________________<BR>
Company: ___________________________<BR>
Address:
___________________________<BR>
City:
___________________________<BR>
State & Zip: ___________________________<BR>
Country:
___________________________<BR></TD>
<TD WIDTH="50%">Ship To:<BR>
[value name]<BR>
[value companyname]<BR>
[value address]<BR>
[value city], [value state] [value zip]<BR>
<BR>Ship Via: [shipping_desc]<BR></TD>
</TR>
<TR>
<TD COLSPAN=2>Payment (check one):
Check [_] Money Order [_] Charge [_]<BR>
Card Number: ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___
___ ___ ___ ___ ___<BR>
Exp Date: ___/___<BR></TD>
</TR>
<TR ALIGN="left" VALIGN="top" BGCOLOR="#FFFFCC">
<TD WIDTH="50%">Capture No: _________________________<BR>
Reference No: _________________________<BR>
Date of Change: ___/___/___<BR></TD>
<TD WIDTH="50%">Our TIN Number Here<BR>
Name of Our Company Here<BR>
Our Bank Account Number Here<BR>
Processing Numbers Here<BR></TD>
</TR>
</TABLE>
<TABLE WIDTH="100%" BORDER=1 CELLSPACING=0 CELLPADDING=3>
<TR ALIGN="LEFT" VALIGN="TOP" BGCOLOR="#FFFFCC">
<TD>
Qty</TD>
<TD>
Item No.</TD>
<TD>
Description</TD>
<TD ALIGN="center">
Size</TD>
<TD ALIGN="right">
Total</TD>
</TR>
[item-list]
<TR ALIGN="LEFT" VALIGN="TOP">
<TD>
[item-quantity]</TD>
<TD>
[item-code]</TD>
<TD>
[item-field title] <SMALL>([item-price])</SMALL>
[if-field imprintable]
<BR>Imprint: [item-modifier imprinttext]
[/if-field]
</FONT></TD>
<TD ALIGN="center">
[item-modifier sizes]</TD>
<TD ALIGN="RIGHT">
[item-subtotal]</TD>
</TR>
[/item-list]
<TR>
<TD COLSPAN=3 ROWSPAN=4 ALIGN="left" VALIGN="top">
<H4 ALIGN="center">Imprinted items (including engraving
and embroidery) are NOT returnable!</H4>
Notes:
</TD>
<TD ALIGN="right">Subtotal:</TD>
<TD ALIGN="right" VALIGN="middle">
[subtotal]<BR></TD>
</TR>
<TR>
<TD ALIGN="right">Sales Tax:</TD>
<TD ALIGN="right" VALIGN="middle">
[salestax]<BR></TD>
</TR>
<TR>
<TD ALIGN="right">Shipping:</TD>
<TD ALIGN="right" VALIGN="middle">
[shipping]<BR></TD>
</TR>
<TR>
<TD ALIGN="right">Order Total:</TD>
<TD ALIGN="right" VALIGN="middle">
[total-cost]<BR></TD>
</TR>
</TABLE>
[include file="pages/returnpolicy.html"]
<H3 ALIGN="center">Thank you for choosing Our Store!<BR>Visit us again: Web Address Here</H3>
</TD>
</TR>
</TABLE>
receipt.html is your standard receipt as comes with the simple demo. We
made a custom receipt page for printed orders to give the customer space
to write in his/her information and to match the client's existing work
order forms. Hope that helps.
-- Loy
--
Loy Ellen Gross * Web Designer & Programmer * Xcalibur Internet
Voice: 716-344-1114 * design@iinc.com * http://www.iinc.com