[ic] paypal button on checkout page

Paul Jordan interchange-users@interchange.redhat.com
Tue Apr 9 11:30:00 2002


> Has any one put a paypal button on the checkout form and still
> retained the
> other pay options? ie online check,COD,postal,PO
> I am replacing this code:
>
> <FORM ACTION="[process secure=1]" METHOD="POST" name=checkout>
>  <INPUT TYPE=hidden NAME=mv_session_id VALUE="[data session id]">
>
> with this code:
> [if value payment_method ne credit]
>   <FORM ACTION="[process secure=1]" METHOD="POST" name=checkout>
>   <INPUT TYPE=hidden NAME=mv_session_id VALUE="[data session id]">
> [/if]
>
> and under the credit card options routine I deleted the credit
> card checking
> routines and entered this code:
>
> <table>
> <form action="https://www.paypal.com/cgi-bin/webscr" method="post"
> name=checkout>
> <INPUT TYPE=hidden NAME=mv_session_id VALUE="[data session id]">
> <input type="hidden" name="cmd" value="_xclick">
> <input type="hidden" name="business" value="wilsonv@sbcglobal.net">
> <input type="hidden" name="item_name" value="[item-list][item-field
> title],[/item-list]">
> <input type="hidden" name="item_number"
> value="[item-list][item-code],[/item-list]">
> <input type="hidden" name="amount" value="[total-cost noformat=1]">
> <input type="image" src="/how-2-do-computers/x-click-but5.gif"
> border="0" name="submit" alt="Make payments with PayPal - it's fast, free
> and secure!">
> </form>
> </table>
>
> once I change the FORM ACTION to the paypal http address nothing works
> except the paypal button.  I am not a html or java programmer does any one
> have any suggestions?
>
> Wilsonv
>


Hi,

I implemented this on my cart page, to avoid those problems, but I am
guessing that you still want to collect consumer info on you checkout page,
name, address, and pass them to the IC backend, right?

First off, I am not too clear as to why you have

[if value payment_method ne credit]
  <FORM ACTION="[process secure=1]" METHOD="POST" name=checkout>
  <INPUT TYPE=hidden NAME=mv_session_id VALUE="[data session id]">
[/if]

Unless you have the person select their payment preference on cart, these
[if] statements won't parse correct, or unless you have the person
explicitly choose their method on checkout (dropdown box), paypal or credit
being one of them.

Said that, what I would guess is that somewhere you are nesting forms. What
would be ideal is to get to the checkout page, then have the person "select"
their payment method, then set your [if] statements up, and I would [if]-out
the entire paypal form, if they don't choose paypal.

As for passing the regular form values to IC when using paypal, your
probably going to have to move your opening paypal formtag up, if else it
into action, but I am thinking that you need to post this to IC, and Paypal,
which I wouldn't know how to do.


I hoped this helped a little. I am new at this so some of this might be off,

waaaaaaayyyyyyy offffff...

Paul