Thread: epayment code..

Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2007
    Posts
    24
    Plugin Contributions
    0

    Default epayment code..

    hello there,
    i want to use thaiepay module but they have in oscommerce only...can you guys help me to turn this in zen cart module? ...i'm sure lots of ppl will use zen cart in thailand if it works with thaiepay.com
    thanks so much.

    PHP Code:
    <?php
    /*
      $Id: secpay.php,v 1.31 2003/01/29 19:57:15 hpdl Exp $
      osCommerce, Open Source E-Commerce Solutions
      http://www.oscommerce.com
      Copyright (c) 2003 osCommerce
      Released under the GNU General Public License
    */
      
    class thaiepay {
        var 
    $code$title$description$enabled;
    // class constructor
        
    function thaiepay() {
          global 
    $order;
          
    $this->code 'thaiepay';
          
    $this->title MODULE_PAYMENT_THAIEPAY_TEXT_TITLE;
          
    $this->description MODULE_PAYMENT_THAIEPAY_TEXT_DESCRIPTION;
          
    $this->sort_order MODULE_PAYMENT_THAIEPAY_SORT_ORDER;
          
    $this->enabled = ((MODULE_PAYMENT_THAIEPAY_STATUS == 'True') ? true false);
          if ((int)
    MODULE_PAYMENT_THAIEPAY_ORDER_STATUS_ID 0) {
            
    $this->order_status MODULE_PAYMENT_THAIEPAY_ORDER_STATUS_ID;
          }
          if (
    is_object($order)) $this->update_status();
          
    $this->form_action_url 'https://www.thaiepay.com/epaylink/payment.aspx';
        }
    // class methods
        
    function update_status() {
          global 
    $order;
          if ( (
    $this->enabled == true) && ((int)MODULE_PAYMENT_THAIEPAY_ZONE 0) ) {
            
    $check_flag false;
            
    $check_query tep_db_query("select zone_id from " TABLE_ZONES_TO_GEO_ZONES " where geo_zone_id = '" MODULE_PAYMENT_THAIEPAY_ZONE "' and zone_country_id = '" $order->billing['country']['id'] . "' order by zone_id");
            while (
    $check tep_db_fetch_array($check_query)) {
              if (
    $check['zone_id'] < 1) {
                
    $check_flag true;
                break;
              } elseif (
    $check['zone_id'] == $order->billing['zone_id']) {
                
    $check_flag true;
                break;
              }
            }
            if (
    $check_flag == false) {
              
    $this->enabled false;
            }
          }
        }
        function 
    javascript_validation() {
          return 
    false;
        }
        function 
    selection() {
          return array(
    'id' => $this->code,
                       
    'module' => $this->title);
        }
        function 
    pre_confirmation_check() {
          return 
    false;
        }
        function 
    confirmation() {
          return 
    false;
        }
        function 
    process_button() {
          global 
    $order$currencies$currency;
          switch (
    MODULE_PAYMENT_THAIEPAY_CURRENCY) {
            case 
    'Default Currency':
              
    $sec_currency DEFAULT_CURRENCY;
              break;
            case 
    'Any Currency':
            default:
              
    $sec_currency $currency;
              break;
          }
          switch (
    MODULE_PAYMENT_THAIEPAY_TEST_STATUS) {
            case 
    'Always Fail':
              
    $test_status 'false';
              break;
            case 
    'Production':
              
    $test_status 'live';
              break;
            case 
    'Always Successful':
            default:
              
    $test_status 'true';
              break;
          }
    // This is an example of the basic unit of currency in the other country
    // Please defind a value of currency vary by oscommerce configuration.
    //Currency US Dollar
    if ( $sec_currency == "USD" )
    {
     
    $cc "01";
     
    $tepaylang "EN";
    }
    //Currency Baht
    elseif ( $sec_currency == "Baht" )
    {
     
    $cc "00";
     
    $tepaylang "TH";

    //Currency British Pound
    elseif ( $sec_currency == "GBP" )
    {
     
    $cc "06";
     
    $tepaylang "EN";
    }
    //Currency Euro Dollar
    elseif ( $sec_currency == "EUR" )
    {
     
    $cc "05";
     
    $tepaylang "EN";
    }
        
    $process_button_string tep_draw_hidden_field('merchant'MODULE_PAYMENT_THAIEPAY_MERCHANT_ID) .
       
    tep_draw_hidden_field('merchantid'MODULE_PAYMENT_THAIEPAY_MERCHANT_ID) .
     
    tep_draw_hidden_field('total'number_format($order->info['total'] * $currencies->get_value($sec_currency), $currencies->currencies[$sec_currency]['decimal_places'], '.''')) .
     
    tep_draw_hidden_field('refno'date('Ymdhis')) .
     
    tep_draw_hidden_field('customeremail'$order->customer['email_address']) .
     
    //You can define a description for product by assign value to argument productdetail.
     
    tep_draw_hidden_field('productdetail'"Payment by : ThaiEPay.com") .
     
    tep_draw_hidden_field('cc'$cc) .
     
    tep_draw_hidden_field('lang'$tepaylang) .
     
    tep_draw_hidden_field('trans_id'STORE_NAME date('Ymdhis')) .
     
    tep_draw_hidden_field('amount'number_format($order->info['total'] * $currencies->get_value($sec_currency), $currencies->currencies[$sec_currency]['decimal_places'], '.''')) .
     
    tep_draw_hidden_field('bill_name'$order->billing['firstname'] . ' ' $order->billing['lastname']) .
     
    tep_draw_hidden_field('bill_addr_1'$order->billing['street_address']) .
     
    tep_draw_hidden_field('bill_addr_2'$order->billing['suburb']) .
     
    tep_draw_hidden_field('bill_city'$order->billing['city']) .
            
    tep_draw_hidden_field('bill_state'$order->billing['state']) .
            
    tep_draw_hidden_field('bill_post_code'$order->billing['postcode']) .
            
    tep_draw_hidden_field('bill_country'$order->billing['country']['title']) .
            
    tep_draw_hidden_field('bill_tel'$order->customer['telephone']) .
            
    tep_draw_hidden_field('bill_email'$order->customer['email_address']) .
            
    tep_draw_hidden_field('ship_name'$order->delivery['firstname'] . ' ' $order->delivery['lastname']) .
            
    tep_draw_hidden_field('ship_addr_1'$order->delivery['street_address']) .
            
    tep_draw_hidden_field('ship_addr_2'$order->delivery['suburb']) .
            
    tep_draw_hidden_field('ship_city'$order->delivery['city']) .
            
    tep_draw_hidden_field('ship_state'$order->delivery['state']) .
            
    tep_draw_hidden_field('ship_post_code'$order->delivery['postcode']) .
            
    tep_draw_hidden_field('ship_country'$order->delivery['country']['title']) .       
     
    tep_draw_hidden_field('returnurl'tep_href_link(FILENAME_CHECKOUT_PROCESS '''SSL'true)) .
            
    tep_draw_hidden_field('currency'$sec_currency) .
            
    tep_draw_hidden_field('callback'tep_href_link(FILENAME_CHECKOUT_PROCESS'''SSL'false) . ';' tep_href_link(FILENAME_CHECKOUT_PAYMENT'payment_error=' $this->code'SSL'false)) .
            
    tep_draw_hidden_field(tep_session_name(), tep_session_id()) .
            
    tep_draw_hidden_field('options''test_status=' $test_status ',dups=false,cb_post=true,cb_flds=' tep_session_name());
          return 
    $process_button_string;
        }
        function 
    before_process() {
          global 
    $HTTP_POST_VARS;
          if (
    $HTTP_POST_VARS['valid'] == 'true') {
            if (
    $remote_host getenv('REMOTE_HOST')) {
              if (
    $remote_host != 'thaiepay.com') {
                
    $remote_host gethostbyaddr($remote_host);
              }
              if (
    $remote_host != 'thaiepay.com') {
                
    tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENTtep_session_name() . '=' $HTTP_POST_VARS[tep_session_name()] . '&payment_error=' $this->code'SSL'falsefalse));
              }
            } else {
              
    tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENTtep_session_name() . '=' $HTTP_POST_VARS[tep_session_name()] . '&payment_error=' $this->code'SSL'falsefalse));
            }
          }
        }
        function 
    after_process() {
          return 
    false;
        }
        function 
    get_error() {
          global 
    $HTTP_GET_VARS;
          if (isset(
    $HTTP_GET_VARS['message']) && (strlen($HTTP_GET_VARS['message']) > 0)) {
            
    $error stripslashes(urldecode($HTTP_GET_VARS['message']));
          } else {
            
    $error MODULE_PAYMENT_THAIEPAY_TEXT_ERROR_MESSAGE;
          }
          return array(
    'title' => MODULE_PAYMENT_THAIEPAY_TEXT_ERROR,
                       
    'error' => $error);
        }
        function 
    check() {
          if (!isset(
    $this->_check)) {
            
    $check_query tep_db_query("select configuration_value from " TABLE_CONFIGURATION " where configuration_key = 'MODULE_PAYMENT_THAIEPAY_STATUS'");
            
    $this->_check tep_db_num_rows($check_query);
          }
          return 
    $this->_check;
        }
        function 
    install() {
          
    tep_db_query("insert into " TABLE_CONFIGURATION " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable THAIEPAY Module', 'MODULE_PAYMENT_THAIEPAY_STATUS', 'True', 'Do you want to accept THAIEPAY payments?', '6', '1', 'tep_cfg_select_option(array(\'True\', \'False\'), ', now())");
          
    tep_db_query("insert into " TABLE_CONFIGURATION " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Merchant ID', 'MODULE_PAYMENT_THAIEPAY_MERCHANT_ID', 'thaiepay', 'Merchant ID to use for the THAIEPAY service', '6', '2', now())");
          
    tep_db_query("insert into " TABLE_CONFIGURATION " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Transaction Currency', 'MODULE_PAYMENT_THAIEPAY_CURRENCY', 'Any Currency', 'The currency to use for credit card transactions', '6', '3', 'tep_cfg_select_option(array(\'Any Currency\', \'Default Currency\'), ', now())");
          
    tep_db_query("insert into " TABLE_CONFIGURATION " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Transaction Mode', 'MODULE_PAYMENT_THAIEPAY_TEST_STATUS', 'Always Successful', 'Transaction mode to use for the THAIEPAY service', '6', '4', 'tep_cfg_select_option(array(\'Always Successful\', \'Always Fail\', \'Production\'), ', now())");
          
    tep_db_query("insert into " TABLE_CONFIGURATION " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort order of display.', 'MODULE_PAYMENT_THAIEPAY_SORT_ORDER', '0', 'Sort order of display. Lowest is displayed first.', '6', '0', now())");
          
    tep_db_query("insert into " TABLE_CONFIGURATION " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('Payment Zone', 'MODULE_PAYMENT_THAIEPAY_ZONE', '0', 'If a zone is selected, only enable this payment method for that zone.', '6', '2', 'tep_get_zone_class_title', 'tep_cfg_pull_down_zone_classes(', now())");
          
    tep_db_query("insert into " TABLE_CONFIGURATION " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, use_function, date_added) values ('Set Order Status', 'MODULE_PAYMENT_THAIEPAY_ORDER_STATUS_ID', '0', 'Set the status of orders made with this payment module to this value', '6', '0', 'tep_cfg_pull_down_order_statuses(', 'tep_get_order_status_name', now())");
        }
        function 
    remove() {
          
    tep_db_query("delete from " TABLE_CONFIGURATION " where configuration_key in ('" implode("', '"$this->keys()) . "')");
        }
        function 
    keys() {
          return array(
    'MODULE_PAYMENT_THAIEPAY_STATUS''MODULE_PAYMENT_THAIEPAY_MERCHANT_ID''MODULE_PAYMENT_THAIEPAY_CURRENCY''MODULE_PAYMENT_THAIEPAY_TEST_STATUS''MODULE_PAYMENT_THAIEPAY_ZONE''MODULE_PAYMENT_THAIEPAY_ORDER_STATUS_ID''MODULE_PAYMENT_THAIEPAY_SORT_ORDER');
        }
      }
    ?>

  2. #2
    Join Date
    Feb 2007
    Posts
    24
    Plugin Contributions
    0

    Default Re: epayment code..

    okie...i figured it out already.....this works fine with zencart...

    PHP Code:
    <?php
    /*
      $Id: secpay.php,v 1.31 2003/01/29 19:57:15 hpdl Exp $
      osCommerce, Open Source E-Commerce Solutions
      http://www.oscommerce.com
      Copyright (c) 2003 osCommerce
      Released under the GNU General Public License
    */
      
    class thaiepay {
        var 
    $code$title$description$enabled;
    // class constructor
        
    function thaiepay() {
          global 
    $order;
          
    $this->code 'thaiepay';
          
    $this->title MODULE_PAYMENT_THAIEPAY_TEXT_TITLE;
          
    $this->description MODULE_PAYMENT_THAIEPAY_TEXT_DESCRIPTION;
          
    $this->sort_order MODULE_PAYMENT_THAIEPAY_SORT_ORDER;
          
    $this->enabled = ((MODULE_PAYMENT_THAIEPAY_STATUS == 'True') ? true false);
          if ((int)
    MODULE_PAYMENT_THAIEPAY_ORDER_STATUS_ID 0) {
            
    $this->order_status MODULE_PAYMENT_THAIEPAY_ORDER_STATUS_ID;
          }
          if (
    is_object($order)) $this->update_status();
          
    $this->form_action_url 'https://www.thaiepay.com/epaylink/payment.aspx';
        }
    // class methods
        
    function update_status() {
       global 
    $db;
          global 
    $order;
          if ( (
    $this->enabled == true) && ((int)MODULE_PAYMENT_THAIEPAY_ZONE 0) ) {
            
    $check_flag false;
            
    $check_query $db->Execute("select zone_id from " TABLE_ZONES_TO_GEO_ZONES " where geo_zone_id = '" MODULE_PAYMENT_THAIEPAY_ZONE "' and zone_country_id = '" $order->billing['country']['id'] . "' order by zone_id");
            while (!
    $check_query->EOF) {
              if (
    $check['zone_id'] < 1) {
                
    $check_flag true;
                break;
              } elseif (
    $check['zone_id'] == $order->billing['zone_id']) {
                
    $check_flag true;
                break;
              }
            }
            if (
    $check_flag == false) {
              
    $this->enabled false;
            }
          }
        }
        function 
    javascript_validation() {
          return 
    false;
        }
        function 
    selection() {
          return array(
    'id' => $this->code,
                       
    'module' => $this->title);
        }
        function 
    pre_confirmation_check() {
          return 
    false;
        }
        function 
    confirmation() {
          return 
    false;
        }
        function 
    process_button() {
          global 
    $order$currencies$currency;
          switch (
    MODULE_PAYMENT_THAIEPAY_CURRENCY) {
            case 
    'Default Currency':
              
    $sec_currency DEFAULT_CURRENCY;
              break;
            case 
    'Any Currency':
            default:
              
    $sec_currency $currency;
              break;
          }
          switch (
    MODULE_PAYMENT_THAIEPAY_TEST_STATUS) {
            case 
    'Always Fail':
              
    $test_status 'false';
              break;
            case 
    'Production':
              
    $test_status 'live';
              break;
            case 
    'Always Successful':
            default:
              
    $test_status 'true';
              break;
          }
    // This is an example of the basic unit of currency in the other country
    // Please defind a value of currency vary by oscommerce configuration.
    //Currency US Dollar
    if ( $sec_currency == "USD" )
    {
     
    $cc "01";
     
    $tepaylang "EN";
    }
    //Currency Baht
    elseif ( $sec_currency == "Baht" )
    {
     
    $cc "00";
     
    $tepaylang "TH";

    //Currency British Pound
    elseif ( $sec_currency == "GBP" )
    {
     
    $cc "06";
     
    $tepaylang "EN";
    }
    //Currency Euro Dollar
    elseif ( $sec_currency == "EUR" )
    {
     
    $cc "05";
     
    $tepaylang "EN";
    }
    function 
    random_orderno($len)
    {
    $chars "0123456789";
    $ret_str "";
    $num strlen($chars);
    for(
    $i 0$i $len$i++)
    {
    $ret_str.= $chars[rand()%$num];
    $ret_str.=""
    }
    return 
    $ret_str
    }
    $orderno random_orderno(10); 
        
    $process_button_string =  zen_draw_hidden_field('merchantid'MODULE_PAYMENT_THAIEPAY_MERCHANT_ID) .
     
    zen_draw_hidden_field('total'number_format($order->info['total'] * $currencies->get_value($sec_currency), $currencies->currencies[$sec_currency]['decimal_places'], '.''')) .
     
    zen_draw_hidden_field('refno'$orderno) .
     
    zen_draw_hidden_field('customeremail'$order->customer['email_address']) .
     
    //You can define a description for product by assign value to argument productdetail.
     
    zen_draw_hidden_field('productdetail'"Payment by : ThaiEPay.com") .
     
    zen_draw_hidden_field('cc'$cc) .
     
    zen_draw_hidden_field('lang'$tepaylang) .
     
    zen_draw_hidden_field('trans_id'STORE_NAME date('Ymdhis')) .
     
    zen_draw_hidden_field('amount'number_format($order->info['total'] * $currencies->get_value($sec_currency), $currencies->currencies[$sec_currency]['decimal_places'], '.''')) .
     
    zen_draw_hidden_field('bill_name'$order->billing['firstname'] . ' ' $order->billing['lastname']) .
     
    zen_draw_hidden_field('bill_addr_1'$order->billing['street_address']) .
     
    zen_draw_hidden_field('bill_addr_2'$order->billing['suburb']) .
     
    zen_draw_hidden_field('bill_city'$order->billing['city']) .
            
    zen_draw_hidden_field('bill_state'$order->billing['state']) .
            
    zen_draw_hidden_field('bill_post_code'$order->billing['postcode']) .
            
    zen_draw_hidden_field('bill_country'$order->billing['country']['title']) .
            
    zen_draw_hidden_field('bill_tel'$order->customer['telephone']) .
            
    zen_draw_hidden_field('bill_email'$order->customer['email_address']) .
            
    zen_draw_hidden_field('ship_name'$order->delivery['firstname'] . ' ' $order->delivery['lastname']) .
            
    zen_draw_hidden_field('ship_addr_1'$order->delivery['street_address']) .
            
    zen_draw_hidden_field('ship_addr_2'$order->delivery['suburb']) .
            
    zen_draw_hidden_field('ship_city'$order->delivery['city']) .
            
    zen_draw_hidden_field('ship_state'$order->delivery['state']) .
            
    zen_draw_hidden_field('ship_post_code'$order->delivery['postcode']) .
            
    zen_draw_hidden_field('ship_country'$order->delivery['country']['title']) .       
     
    zen_draw_hidden_field('returnurl'zen_href_link(FILENAME_CHECKOUT_PROCESS '''SSL'true)) .
            
    zen_draw_hidden_field('currency'$sec_currency) .
            
    zen_draw_hidden_field('callback'zen_href_link(FILENAME_CHECKOUT_PROCESS'''SSL'false) . ';' zen_href_link(FILENAME_CHECKOUT_PAYMENT'payment_error=' $this->code'SSL'false)) .
            
    zen_draw_hidden_field(zen_session_name(), zen_session_id()) .
            
    zen_draw_hidden_field('options''test_status=' $test_status ',dups=false,cb_post=true,cb_flds=' zen_session_name());
          return 
    $process_button_string;
        }
        function 
    before_process() {
          global 
    $HTTP_POST_VARS;
          if (
    $HTTP_POST_VARS['valid'] == 'true') {
            if (
    $remote_host getenv('REMOTE_HOST')) {
              if (
    $remote_host != 'thaiepay.com') {
                
    $remote_host gethostbyaddr($remote_host);
              }
              if (
    $remote_host != 'thaiepay.com') {
                
    zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENTzen_session_name() . '=' $HTTP_POST_VARS[zen_session_name()] . '&payment_error=' $this->code'SSL'falsefalse));
              }
            } else {
              
    zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENTzen_session_name() . '=' $HTTP_POST_VARS[zen_session_name()] . '&payment_error=' $this->code'SSL'falsefalse));
            }
          }
        }
        function 
    after_process() {
          return 
    false;
        }
        function 
    get_error() {
          global 
    $HTTP_GET_VARS;
          if (isset(
    $HTTP_GET_VARS['message']) && (strlen($HTTP_GET_VARS['message']) > 0)) {
            
    $error stripslashes(urldecode($HTTP_GET_VARS['message']));
          } else {
            
    $error MODULE_PAYMENT_THAIEPAY_TEXT_ERROR_MESSAGE;
          }
          return array(
    'title' => MODULE_PAYMENT_THAIEPAY_TEXT_ERROR,
                       
    'error' => $error);
        }
        function 
    check() {
      global 
    $db;
          if (!isset(
    $this->_check)) {
            
    $check_query $db->Execute("select configuration_value from " TABLE_CONFIGURATION " where configuration_key = 'MODULE_PAYMENT_THAIEPAY_STATUS'");
            
    $this->_check $check_query->RecordCount();        
          }
          return 
    $this->_check;
        }
        function 
    install() {
          global 
    $db;      
          
    $db->Execute("insert into " TABLE_CONFIGURATION " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Enable THAIEPAY Module', 'MODULE_PAYMENT_THAIEPAY_STATUS', 'True', 'Do you want to accept THAIEPAY payments?', '6', '1', 'zen_cfg_select_option(array(\'True\', \'False\'), ', now())");
          
    $db->Execute("insert into " TABLE_CONFIGURATION " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Merchant ID', 'MODULE_PAYMENT_THAIEPAY_MERCHANT_ID', 'thaiepay', 'Merchant ID to use for the THAIEPAY service', '6', '2', now())");
          
    $db->Execute("insert into " TABLE_CONFIGURATION " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Transaction Currency', 'MODULE_PAYMENT_THAIEPAY_CURRENCY', 'Any Currency', 'The currency to use for credit card transactions', '6', '3', 'zen_cfg_select_option(array(\'Any Currency\', \'Default Currency\'), ', now())");
          
    $db->Execute("insert into " TABLE_CONFIGURATION " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) values ('Transaction Mode', 'MODULE_PAYMENT_THAIEPAY_TEST_STATUS', 'Always Successful', 'Transaction mode to use for the THAIEPAY service', '6', '4', 'zen_cfg_select_option(array(\'Always Successful\', \'Always Fail\', \'Production\'), ', now())");
          
    $db->Execute("insert into " TABLE_CONFIGURATION " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('Sort order of display.', 'MODULE_PAYMENT_THAIEPAY_SORT_ORDER', '0', 'Sort order of display. Lowest is displayed first.', '6', '0', now())");
          
    $db->Execute("insert into " TABLE_CONFIGURATION " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, use_function, set_function, date_added) values ('Payment Zone', 'MODULE_PAYMENT_THAIEPAY_ZONE', '0', 'If a zone is selected, only enable this payment method for that zone.', '6', '2', 'zen_get_zone_class_title', 'zen_cfg_pull_down_zone_classes(', now())");
          
    $db->Execute("insert into " TABLE_CONFIGURATION " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, use_function, date_added) values ('Set Order Status', 'MODULE_PAYMENT_THAIEPAY_ORDER_STATUS_ID', '0', 'Set the status of orders made with this payment module to this value', '6', '0', 'zen_cfg_pull_down_order_statuses(', 'zen_get_order_status_name', now())");
        }
        function 
    remove() {
       global 
    $db;
          
    $db->Execute("delete from " TABLE_CONFIGURATION " where configuration_key in ('" implode("', '"$this->keys()) . "')");
        }
        function 
    keys() {
          return array(
    'MODULE_PAYMENT_THAIEPAY_STATUS''MODULE_PAYMENT_THAIEPAY_MERCHANT_ID''MODULE_PAYMENT_THAIEPAY_CURRENCY''MODULE_PAYMENT_THAIEPAY_TEST_STATUS''MODULE_PAYMENT_THAIEPAY_ZONE''MODULE_PAYMENT_THAIEPAY_ORDER_STATUS_ID''MODULE_PAYMENT_THAIEPAY_SORT_ORDER');
        }
      }
    ?>

  3. #3
    Join Date
    Sep 2003
    Location
    Ohio
    Posts
    69,402
    Plugin Contributions
    6

    Default Re: epayment code..

    Thanks very much for posting the update to this Payment module ...
    Linda McGrath
    If you have to think ... you haven't been zenned ...

    Did YOU buy the Zen Cart Team a cup of coffee and a donut today? Just click here to support the Zen Cart Team!!

    Are you using the latest? Perhaps you've a problem that's fixed in the latest version: [Upgrade today: v1.5.5]
    Officially PayPal-Certified! Just click here

    Try our Zen Cart Recommended Services - Hosting, Payment and more ...
    Signup for our Announcements Forums to stay up to date on important changes and updates!

 

 

Similar Threads

  1. v139h How to change from-code ISO-8859-1 to-code=UTF-8?
    By lina0962 in forum Installing on a Linux/Unix Server
    Replies: 5
    Last Post: 28 Oct 2014, 08:00 PM
  2. Discount Code - Invalid Code Message Not Appearing - FEC
    By pennylane in forum All Other Contributions/Addons
    Replies: 1
    Last Post: 11 Jan 2010, 11:21 PM
  3. product description os utputting code -stylesheet and comment code
    By edt123 in forum Setting Up Categories, Products, Attributes
    Replies: 1
    Last Post: 15 Dec 2009, 07:06 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg
Zen-Cart, Internet Selling Services, Klamath Falls, OR