From a shopping cart script, I want the submit button to
call the cart.pl -in order to email me a copy of the order
and submit a form to paypal so that the customer
can pay for the order
if ($FORM{'add'} {
&add_item;
...
print "<FORM NAME=\"form1\" METHOD=POST ACTION=\"$script\">
print <"INPUT TYPE=SUBMIT VALUE=get_address>";
exit;
}
if ( $FORM{'get_address'} ) {
&get_billto
...
...
print "<FORM NAME=\"form2\" METHOD=POST ACTION=\"$script\">";
print "<INPUT TYPE=SUBMIT VALUE=verify_order>;
print "</FORM> </BODY></HTML>";
}
if ( $FORM{'verify_order'} ) {
...calcs the total, shows the customer a completed invoice
print "<FORM NAME=\"form1\" METHOD=POST ACTION=\"$ppal\">\n";
...builds the form to send to Paypal
print "</FORM>\n\n\n </TD></TR></TABLE></CENTER>\n";
print "</BODY></HTML>\n";
&email_ordercopy;
##I put email function here to be sure I get a copy of the order
exit;
}
If the customer doesn't proceed to Paypal, I get a copy of
an order that wasn't really placed.
I would like the submit button in the verify_order routine
to send me the email and submit the form to paypal
ANY IDEAS ??
call the cart.pl -in order to email me a copy of the order
and submit a form to paypal so that the customer
can pay for the order
if ($FORM{'add'} {
&add_item;
...
print "<FORM NAME=\"form1\" METHOD=POST ACTION=\"$script\">
print <"INPUT TYPE=SUBMIT VALUE=get_address>";
exit;
}
if ( $FORM{'get_address'} ) {
&get_billto
...
...
print "<FORM NAME=\"form2\" METHOD=POST ACTION=\"$script\">";
print "<INPUT TYPE=SUBMIT VALUE=verify_order>;
print "</FORM> </BODY></HTML>";
}
if ( $FORM{'verify_order'} ) {
...calcs the total, shows the customer a completed invoice
print "<FORM NAME=\"form1\" METHOD=POST ACTION=\"$ppal\">\n";
...builds the form to send to Paypal
print "</FORM>\n\n\n </TD></TR></TABLE></CENTER>\n";
print "</BODY></HTML>\n";
&email_ordercopy;
##I put email function here to be sure I get a copy of the order
exit;
}
If the customer doesn't proceed to Paypal, I get a copy of
an order that wasn't really placed.
I would like the submit button in the verify_order routine
to send me the email and submit the form to paypal
ANY IDEAS ??