WilliamMute
Programmer
- Jan 4, 2006
- 117
Dear All,
I am not sure if I can ask this but, am trying to design a small web shop for my sister selling little bits and bobs. well I have put something together, with a shopping cart! My problem now is, that Paypal are not being of much help as I have been in communication with them for over 2 months now, beleive me. I simply just want a checkout button which I can echo the total value of the shopping cart to and post it to paypal. Problem, Paypal dont accept echoing a PHP variable into their form. As I havent done this before, is there any other way I can echo the cart total into paypals default html code they provide for the button? See paypal's recommended way below and my version of coding as well.
The code above was provided by paypal with the exception of the php echo part which I replaced with the defualt $0.00. etc. Any Help will be much appreciated please.
Thank you
I am not sure if I can ask this but, am trying to design a small web shop for my sister selling little bits and bobs. well I have put something together, with a shopping cart! My problem now is, that Paypal are not being of much help as I have been in communication with them for over 2 months now, beleive me. I simply just want a checkout button which I can echo the total value of the shopping cart to and post it to paypal. Problem, Paypal dont accept echoing a PHP variable into their form. As I havent done this before, is there any other way I can echo the cart total into paypals default html code they provide for the button? See paypal's recommended way below and my version of coding as well.
Code:
<form action="[URL unfurl="true"]https://www.paypal.com/cgi-bin/webscr"[/URL] method="post">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="myemail@yahoo.com">
<input type="hidden" name="item_name" value="item name">
<input type="hidden" name="item_number" value="001">
<input type="hidden" name="amount" value="<?php echo $amount ; ?>">
<input type="hidden" name="no_note" value="1">
<input type="hidden" name="currency_code" value="GBP">
<input type="hidden" name="lc" value="GB">
<input type="hidden" name="bn" value="PP-BuyNowBF">
<input type="image" src="[URL unfurl="true"]https://www.paypal.com/en_US/i/btn/x-click-but23.gif"[/URL] border="0" name="submit" alt="Make payments with PayPal - it's fast, free and secure!">
<img alt="" border="0" src="[URL unfurl="true"]https://www.paypal.com/en_GB/i/scr/pixel.gif"[/URL] width="1" height="1">
</form>
The code above was provided by paypal with the exception of the php echo part which I replaced with the defualt $0.00. etc. Any Help will be much appreciated please.
Thank you