if (isset($_COOKIE['ap_id'])) { unset($_POST['affiliate']); } $_POST['custom'] = $token; $p = new eshop_paypal_class(); if ($eshopoptions['status'] == 'live') { $p->paypal_url = 'https://www.paypal.com/cgi-bin/webscr'; // paypal url } else { $p->paypal_url = 'https://www.sandbox.paypal.com/cgi-bin/webscr'; // testing paypal url } if ('no' == $eshopoptions['paypal_noemail']) { unset($_POST['email']); } $echoit .= $p->eshop_submit_paypal_post($_POST); //$p->dump_fields(); // for debugging, output a table of all the fields break; case 'process': // Process and order... // There should be no output at this point. To process the POST data, // the submit_paypal_post() function will output all the HTML tags which // contains a FORM which is submited instantaneously using the BODY onload // attribute. In other words, don't echo or printf anything when you're // going to be calling the submit_paypal_post() function. // This is where you would have your form validation and all that jazz. // You would take your POST vars and load them into the class like below, // only using the POST values instead of constant string expressions. // For example, after ensureing all the POST variables from your custom // order form are valid, you might have: //
} else { break; } $p = new eshop_paypal_class(); if ($eshopoptions['status'] == 'live') { $p->paypal_url = 'https://www.paypal.com/cgi-bin/webscr'; // paypal url } else { $p->paypal_url = 'https://www.sandbox.paypal.com/cgi-bin/webscr'; // testing paypal url } if ('no' == $eshopoptions['paypal_noemail']) { unset($espost['email']); } if (isset($echoit)) { $echoit .= $p->eshop_submit_paypal_post($espost); } //$p->dump_fields(); // for debugging, output a table of all the fields break; case 'process': // Process and order... // There should be no output at this point. To process the POST data, // the submit_paypal_post() function will output all the HTML tags which // contains a FORM which is submited instantaneously using the BODY onload // attribute. In other words, don't echo or printf anything when you're // going to be calling the submit_paypal_post() function. // This is where you would have your form validation and all that jazz. // You would take your POST vars and load them into the class like below, // only using the POST values instead of constant string expressions. // For example, after ensureing all the POST variables from your custom // order form are valid, you might have: