Jump to content

Paypal prob: I can't pass my amount variable - its driving me nuts......


otterbield

Recommended Posts

Please can anyone look at this code and the Paypal error message and put me right??

 

I am trying to integrate a 3rd party shopping cart - don't know much php or sql but used to programme (years ago) so am not completely daft (I hope) I have read loads of stuff on the topic in this forum but still I get the following from Paypal

 

 

The link you have used to enter the PayPal system contains an incorrectly formatted item amount.

 

 

ok so the code I am trying to pass is in a file called PayPal.php and this is it

 

 

 

<!-- Gateway URL below -->

 

<form method="post" action="https://www.paypal.com/cgi-bin/webscr">

<tr>

<td>

<input type="hidden" name="cmd" value="_ext-enter">

<input type="hidden" name="redirect_cmd" value="_xclick">

<input type="hidden" name="page_style" value="My Business_Payment">

<input type="hidden" name="business" value="[email protected]">

<input type="hidden" name="item_name" value="My Business Order ">

<input type="hidden" name="currency_code" value="GBP">

 

 

 

<input type="hidden" name="amount" value='<?php echo number_format($oRS["GrandTotal"],2) ?>'>

 

<input type="hidden" name="shipping" value="">

<input type="hidden" name="shipping2" value="0.00">

<input type="hidden" name="handling" value="0.00">

<input type="hidden" name="no_shipping" value="1">

<input type="hidden" name="cn" value="Please add your comments on this order">

<input type="hidden" name="no_note" value="0">

<input type="hidden" name="invoice" value="">

<input type="hidden" name="email" value="">

<input type="hidden" name="first_name" value="">

<input type="hidden" name="last_name" value="">

<input type="hidden" name="address1" value="">

<input type="hidden" name="address2" value="">

<input type="hidden" name="city" value="">

<input type="hidden" name="state" value="">

<input type="hidden" name="zip" value="">

<input type="hidden" name="cancel_return" value="http://mybusiness.com/Cart/cart.php">

<!--<input type="hidden" name="return" value="full_URL_to_receipt.php">--><input type ="hidden" name="defined_quantity" value="1">

 

<!--The below tax field is not valid at PayPal. Although, PayPal allows you

to set your State sales tax rate within your PayPal Account --><input type="hidden" name="tax" value="">

</td>

</tr>

 

<tr>

<td>

<div align="right">

<p class="margin" align="left">

Thankyou for your order.  </p>

<p class="margin" align="left"><br>

</p>

<p class="margin" align="left"><a href="cart.php">Click here</a> if you need to go back to make corrections.</p>

<p class="margin" align="left"><br>

</p>

<p class="margin" align="left">Pay with PayPal, you do not need a PayPal account and can use any major credit card.</p>

<p class="margin" align="left"></p>

<p class="margin" align="left"><br>

</p><input type="hidden" name="PayMethod" value="PayPal">

<p class="margin"><input type="submit" name="button" value=" Send Order to PayPal "></p>

</div>

</td>

</tr>

</form>

<tr>

<td>

<form method="post" action="receipt.php">

 

 

 

that is the end of the code basically I cannot understand the complex variables which I am getting from my sql database and have been trying for 2 days now every variation of the variable I can think of. I also even added to the above code the code which calls the database but that only made PayPal get its knickers in a twist. so please help  -

Lyn (a damsel in distress)

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.