Paypal Description and Amount Empty No mater what I Do

jm1968a 08 Feb, 2015
I cannot get the PayPal fields to fill in.

Here is me custom action located before the PayPal redirect action.
<?php
$form->data['amount'] = 5.99;
$form->data['item'] = 1 x Send Glitter;
 ?>


Any Ideas - Ive spent a good 14 hours on this.
jm1968a 08 Feb, 2015
From debug:

https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=info%40sendglitter.ca&no_shipping=1&no_note=1&return=www.sendglitter.ca¤cy_code=CAD&item_name=&amount=0&first_name=&last_name=&address1=&address2=&city=&state=&zip=&country=&custom=&night_phone_a=&
jm1968a 08 Feb, 2015
I got it!!!😀

I added 2 hidden fields to my form:


<input name="amount" id="amount" value="5.99" type="hidden" class="form-control A" /><input name="item" id="item" value="1 x Send Glitter" type="hidden" class="form-control A" />
GreyHead 09 Feb, 2015
Answer
Hi jm1968a,

In PHP strings need to have quotes around them - if they aren't there your PHP is ignored or shows an error message. Please try
<?php
$form->data['amount'] = 5.99;
$form->data['item'] = '1 x Send Glitter';
 ?>

Bob
This topic is locked and no more replies can be posted.