Example #1
0
     $p = new bank_class();
     if ($eshopoptions['cart_success'] != '') {
         $ilink = add_query_arg('eshopaction', 'success', get_permalink($eshopoptions['cart_success']));
     } else {
         die('<p>' . $derror . '</p>');
     }
     $p->bank_url = $ilink;
     // bank url
     $echoit .= $p->eshop_submit_bank_post($_POST);
     //$p->dump_fields();      // for debugging, output a table of all the fields
     break;
 case 'process':
     // Process and order...
     /****** The order has already gone into the database at this point ******/
     //goes direct to this script as nothing needs showing on screen.
     $p->add_field('shipping_1', eshopShipTaxAmt());
     $sttable = $wpdb->prefix . 'eshop_states';
     $getstate = $eshopoptions['shipping_state'];
     if ($eshopoptions['show_allstates'] != '1') {
         $stateList = $wpdb->get_results("SELECT id,code,stateName FROM {$sttable} WHERE list='{$getstate}' ORDER BY stateName", ARRAY_A);
     } else {
         $stateList = $wpdb->get_results("SELECT id,code,stateName,list FROM {$sttable} ORDER BY list,stateName", ARRAY_A);
     }
     foreach ($stateList as $code => $value) {
         $eshopstatelist[$value['id']] = $value['code'];
     }
     foreach ($_POST as $name => $value) {
         //have to do a discount code check here - otherwise things just don't work - but fine for free shipping codes
         if (strstr($name, 'amount_')) {
             if (isset($_SESSION['eshop_discount' . $blog_id]) && eshop_discount_codes_check()) {
                 $chkcode = valid_eshop_discount_code($_SESSION['eshop_discount' . $blog_id]);
Example #2
0
     $p = new bank_class();
     if ($eshopoptions['cart_success'] != '') {
         $ilink = add_query_arg('eshopaction', 'success', get_permalink($eshopoptions['cart_success']));
     } else {
         die('<p>' . $derror . '</p>');
     }
     $p->bank_url = $ilink;
     // bank url
     $echoit .= $p->eshop_submit_bank_post($espost);
     //$p->dump_fields();      // for debugging, output a table of all the fields
     break;
 case 'process':
     // Process and order...
     /****** The order has already gone into the database at this point ******/
     //goes direct to this script as nothing needs showing on screen.
     $p->add_field('shipping_1', eshopShipTaxAmt());
     $sttable = $wpdb->prefix . 'eshop_states';
     $getstate = $eshopoptions['shipping_state'];
     if ($eshopoptions['show_allstates'] != '1') {
         $stateList = $wpdb->get_results("SELECT id,code,stateName FROM {$sttable} WHERE list='{$getstate}' ORDER BY stateName", ARRAY_A);
     } else {
         $stateList = $wpdb->get_results("SELECT id,code,stateName,list FROM {$sttable} ORDER BY list,stateName", ARRAY_A);
     }
     foreach ($stateList as $code => $value) {
         $eshopstatelist[$value['id']] = $value['code'];
     }
     foreach ($espost as $name => $value) {
         //have to do a discount code check here - otherwise things just don't work - but fine for free shipping codes
         if (strstr($name, 'amount_')) {
             if (isset($_SESSION['eshop_discount' . $blog_id]) && eshop_discount_codes_check()) {
                 $chkcode = valid_eshop_discount_code($_SESSION['eshop_discount' . $blog_id]);