[ic] paypal button on checkout page

Curt Hauge interchange-users@interchange.redhat.com
Tue Apr 9 17:45:01 2002


Wilson F Voelker Jr said:

> Has any one put a paypal button on the checkout form and still
> retained the
> other pay options? ie online check,COD,postal,PO

It's not pretty, and it's NOT seamless, but it adds a PayPal option to
Payment options, while retaining other options. Actually, you could add ANY
kind of payment option in this way. The customer can submit the order
without actually going to PayPal, so you will have to check your PayPal
account to ensure you were paid before shipping items. This option is
suitable to those sites with 'a few' PayPal users. Maybe RedHat could put
this or something similar in the dist. Hope I didn't forget anything. 8-)

1) Add a line to variable.txt, or add it in Preferences in the Admin:

PAYPAL_ACCEPTED	1	Payment

2) Add corresponding entries to VENDROOT/lib/UI/pages/admin/payment.html.
Basically, everywhere you see reference to PO_ACCEPTED, add a similar entry
like PAYPAL_ACCEPTED in the same fashion.


3) Just beneath this line in checkout.html:

[if variable POSTAL_ACCEPTED]
	<option [selected payment_method postal] value="postal">Postal Billing
[/if]


Add this line:

[if variable PAYPAL_ACCEPTED]
	<option [selected payment_method pp] value="pp">PayPal
[/if]


4) Then further down in checkout.html, just after the P.O. Information
[/elsif]
add the following lines. Don't forget to change your PayPal email address
(i.e., if your PayPal account is tomjones@jones.com, replace
'your_email_name' with tomjones and
'your_site.com' with jones.com):

[elsif value payment_method eq pp]
					<input type=hidden name=fax_order value=4>
<table width="500">
    <tr>
        <th><a
href="https://www.paypal.com/xclick/business=your_email_name%40your_site.com
&item_name=Online+purchase" target="_blank"><strong><img
src="navigation/pp3.gif" alt="Make payments with PayPal - it's fast, free
and secure!" border="0" width="88" height="33"></strong></a><strong><img
src="navigation/logo_cards.gif" width="150" height="26"></strong></a>
       </th>
    </tr>

    <tr>
        <th>Before making payment to PayPal, <i>make sure</i> you have
selected the correct shipping method (above). You must make payment to
PayPal <i>in the correct amount, including shipping</i> before we will ship
your order.<br>When you are finished paying at paypal.com, click 'Place
Order' below to complete your order.</th>
    </tr>
</table>

[/elsif]

That's it! Now go to Admin --> Payments and make Paypal 'accepted', then
apply changes.

Good luck!

Curt Hauge


//////////////////////////////////////////////////////////////////
// Web Design - Interchange Hosting - Small Business Consulting //
// 1525 Meadowwood Drive                    www.mnwebdesign.com //
// Brooklyn Park, MN 55444             www.iwantaconsultant.com //
// Phone 612-598-5530                      info@mnwebdesign.com //
//////////////////////////////////////////////////////////////////