Пример #1
0
     */
     $ogonelocation = apply_filters('ogone-location', $eshopoptions['location']);
     $checkid = md5($refid);
     if (isset($_COOKIE['ap_id'])) {
         $_POST['affiliate'] = $_COOKIE['ap_id'];
     }
     orderhandle($_POST, $checkid);
     if (isset($_COOKIE['ap_id'])) {
         unset($_POST['affiliate']);
     }
     //$p = new ogone_class;
     $oarray = array('accepturl' => $slink, 'amount' => $amount, 'cancelurl' => $clink, 'CN' => $_POST['first_name'] . ' ' . $_POST['last_name'], 'COM' => $description, 'currency' => $eshopoptions['currency'], 'declineurl' => $clink, 'email' => $_POST['email'], 'exceptionurl' => $clink, 'language' => $ogonelocation, 'operation' => 'SAL', 'orderID' => $refid, 'owneraddress' => $_POST['address1'], 'ownercty' => $_POST['country'], 'ownertelno' => $_POST['phone'], 'ownertown' => $_POST['city'], 'ownerzip' => $_POST['zip'], 'PSPID' => $Pspid);
     $sha = '';
     foreach ($oarray as $k => $v) {
         if ($v != '') {
             $p->add_field($k, $v);
             $sha .= strtoupper($k) . '=' . $v . $Secret;
         }
     }
     $SHASign = strtoupper(sha1($sha));
     $p->add_field('SHASign', $SHASign);
     $echoit .= $p->eshop_submit_ogone_post($_POST);
     break;
 case 'process':
     // Process and order...
     // There should be no output at this point.  To process the POST data,
     // the submit_ogone_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_ogone_post() function.
     // This is where you would have your form validation  and all that jazz.
Пример #2
0
         $espost['affiliate'] = $_COOKIE['ap_id'];
     }
     orderhandle($espost, $checkid);
     if (isset($_COOKIE['ap_id'])) {
         unset($espost['affiliate']);
     }
     /*
     		//necessary evil fix
     		$_SESSION['orderhandle']=true;
     */
     //$p = new ogone_class;
     $oarray = array('accepturl' => $slink, 'amount' => $amount, 'cancelurl' => $clink, 'CN' => $espost['first_name'] . ' ' . $espost['last_name'], 'COM' => $description, 'currency' => $eshopoptions['currency'], 'declineurl' => $clink, 'email' => $espost['email'], 'exceptionurl' => $clink, 'language' => $ogonelocation, 'operation' => 'SAL', 'orderID' => $refid, 'owneraddress' => $espost['address1'], 'ownercty' => $espost['country'], 'ownertelno' => $espost['phone'], 'ownertown' => $espost['city'], 'ownerzip' => $espost['zip'], 'PSPID' => $Pspid);
     $sha = '';
     foreach ($oarray as $k => $v) {
         if ($v != '') {
             $p->add_field($k, $v);
             $sha .= strtoupper($k) . '=' . $v . $Secret;
         }
     }
     $SHASign = strtoupper(sha1($sha));
     $p->add_field('SHASign', $SHASign);
     $echoit .= $p->eshop_submit_ogone_post($espost);
     break;
 case 'process':
     // Process and order...
     // There should be no output at this point.  To process the POST data,
     // the submit_ogone_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_ogone_post() function.
     // This is where you would have your form validation  and all that jazz.