PayPal Redirect amount=0

cyberrock 24 Nov, 2016
Hi ya Bob,
I have setup a paypal redirect. though my "amount" is always coming up as zero (0) though everything else is fine.

This is private content



In my amount field, I have "costInput".
Any idea what i have done wrong?

Kind Regards

Ben
GreyHead 24 Nov, 2016
Hi Ben,

costInput looks correct - the $sign might cause a problem, though I would still expect the amount to show up in the PayPal URL

Please take a Form Backup using the icon in the Forms Manager and post it here and I'll take a closer look.

Bob
cyberrock 24 Nov, 2016
HI Bob, thanks very much

Regards

Ben
Max_admin 24 Nov, 2016
Hi,

Did you try the amount without the dollar sign ?

Best regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
cyberrock 24 Nov, 2016
HI ya Max,
Originally i did, the just put it in after Bob suggested that may be it... still no go. I even tried putting it in under a custom code. Doing that, made the whole "amount=0" disappear altogether.
GreyHead 24 Nov, 2016
Hi Ben,

In the Amount field of the PayPal ReDirect action you have $costInput - that should be just the input name i.e. costInput without the $

Bob

PS I also notice that you have an ipn URL in the Return URL box - that probably isn't what you need, the Return URL is the place that the User is returned to after the purchase (the IPN URL is for the private transaction confirmations between your site and PayPal).
cyberrock 24 Nov, 2016
Hi Bob, As mentioned previously, The $ has only just gone in when you suggested it. At the time of posting this topic, it wasn't in there. not that it made any difference

Thanks for letting me know about the return url. i will fix that up🙂
GreyHead 24 Nov, 2016
Hi Ben,

The $ in the amount field is definitely a problem - but not the one that I was talking about, that was the $ in the amount returned from the form input.

I'll take another look.

Bob
cyberrock 24 Nov, 2016
Ohh you were right AGAIN.. haha.. i removed the "$" and it works well. Thanks Bob and Max🙂
GreyHead 24 Nov, 2016
Hi Ben,

I can't work out where you are setting the value of costInput. I have checked that if I over-ride it with a value in the Event Switcher code then that amount is passed to PayPal
<?PHP
If ($form->data['PaymentType'] == "0") {
  $form->data['costInput'] = 2;
  return "success";
}?>

So I suggest that you go back and debug your custom code before that to see exactly what is happening.

Bob
cyberrock 24 Nov, 2016
Through an ajax script sending it to the costInput.value
GreyHead 24 Nov, 2016
Hi Ben.

Then I guess that isn't working as the value isn't being passed on. Have you tried removing the $ sign from the value?

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