i am trying to pass an array to paypal direct.
the following is the custom code to define the array.
THIS IS THE FIRST MODULE
THIS IS THE SECOND
I pass the following to paypal
$menu
$amtm
$num
i set the upload to 1 and command os _cart
when i get to paypal, there is no data loaded.
what am i missing?
the following is the custom code to define the array.
THIS IS THE FIRST MODULE
<?php
$favcolor = $form->data['MealM'];
switch ($favcolor) {
case "penne":
echo "Your meal choice is penne";
$form->data['amt'] = 20;
break;
case "chicken":
echo "Your meal choice is chicken!";
$form->data['amt'] = 25;
break;
case "pork":
echo "Your meal choice is pork!";
$form->data['amt'] = 27;
break;
default:
echo "No Match";
}
?>
THIS IS THE SECOND
<?php
$menu = Array();
$amtm = Array();
$num = Array();
$amtm[0] = $form->data['amt'];
$menu[0] = $form->data['MealM'];
$num[0] = 1;
If ($form->data['FNAMEG'] > ' ') {
$form->data['NUMBER'] = 2;
$favcolor = $form->data['MealG'];
switch ($favcolor) {
case "penne":
echo "Guest Your meal choice is penne";
$form->data['amt1'] = 20;
$amtm[1]=$form->data['amt1'] ;
break;
case "chicken":
echo "Guest Your meal choice is Chicken";
$form->data['amt1'] = 25;
break;
$amtm[1]=$form->data['amt1'];
case "pork":
echo "Guest Your meal choice is pork!";
$form->data['amt1'] = 27;
$amtm[1]=$form->data['amt1'];
break;
default:
echo "Your favorite color is neither red, blue, nor green!";
}
}
?>
<?php
$num[1] = 1;
$menu[1] = $form->data['MealG'];
echo "meals are".$menu[0] ."," . $menu[1] . ".";
echo " meal costs are". $amtm[0] . ", " . $amtm[1] . ".";
echo " No of meals are". $num[0] . ", " . $num[1] . ".";
$form->data['cost'] = $form->data['amt'] + $form->data['amt1'];
?>
I pass the following to paypal
$menu
$amtm
$num
i set the upload to 1 and command os _cart
when i get to paypal, there is no data loaded.
what am i missing?