Forums

PayPal amount not populating correctly

momentis 29 Oct, 2012
I have a form that calculates a travel deposit based on the number of individuals being registered. It uses this code on the "On Submit" action to make the calculation and store it to a hidden field on the form named 'dep_amt':

<?php
$form->data['dep_amt'] = 0;
$first = $form->data['first_fname'];
$second = $form->data['second_fname'];
$third = $form->data['third_fname'];
$fourth = $form->data['fourth_fname'];
if ($first) {$number = 1;};
if ($second) {$number = $number + 1;};
if ($third) {$number = $number + 1;};
if ($fourth) {$number = $number + 1;};
$deps_amt = 100;
$deposit = $deps_amt * $number;
$form->data['dep_amt'] = $deposit;
?>


When I add an "echo" to display the value of the deposit, it shows the correct amount. However, when I go to pass it off to PayPal, the amount shown does not match, varying between $400 - $1000. Any idea why???

It's SO weird!

Thanks!
Rick
GreyHead 29 Oct, 2012
Hi Rick,

Are you using one of the Payment Gateway Trial actions? Please see this FAQ

Bob
momentis 31 Oct, 2012
Geez, I am!! I didn't even realize it said "Trial". I would have thought they would be included with an Unlimited subscription! :wink:

Thanks for the help!!!!!
Rick
GreyHead 31 Oct, 2012
Hi Rick,

You can always ask . . .

Bob
momentis 31 Oct, 2012
Wouldn't dream of it! This stuff is too good, and I want Max to keep developing it!!!

I just paid for the plugin - just have to wait for the download to be made available.

Thanks, as always, Bob!

Rick
momentis 31 Oct, 2012
Got the plugin, and now it is passing the correct amount. Thanks! 😀
This topic is locked and no more replies can be posted.