hi,
I implemented something similar using Cforms. However, my form did not upload files. The user had to fill in some fields, and had some package which they can buy. And they have a choice to pay via paypal or other payment types.
I modified the my_cforms_logic($cformsdata,$oldvalue,$setting) in my-functions.php. This example is for 1 item, you can extend it for multiple items.
Eg
if ( $formID == '2' ) {
if ( $setting == "redirection" ){
$userfield = $cformsdata['data']['Payment Option'];
if ( $userfield == 'paypal' ) {
$array1['upload'] = "yourvalues";
$array1['cmd'] = "yourvalues";
$array1['business'] = "yourvalues";
$array1['currency_code'] = "yourvalues";
$array1['cn'] = "Add special instructions to the seller";
$array1['rm'] = "yourvalues";
$array1['return'] = "yoururl";
$array1['no_shipping'] = "yourvalues";
$array1['no_note'] = "youvalues";
foreach ($array1 as $key => $value) {
$value = urlencode(stripslashes($value));
$req .= "&$key=$value";
}
$req2 = "";
$count=0;
$array1 = split(",", $cformsdata['data'][Oneoftheitems]);
foreach ($array1 as $key2 => $value2) {
$count++;
$newstring = split("\\+", $value2);
$req2 .= "&item_name_".$count."=".$newstring[1];
$req2 .= "&item_number_".$count."=".$newstring[0];
$req2 .= "&quantity_".$count."=1";
$req2 .= "&amount_".$count."=".$newstring[2];
}
$url = 'https://www.paypal.com/cgi-bin/webscr?'.$req.$req2;
return $url;
} else {
Redirect to a page to tell the user how to pay via other form of payment.
}
}
}