Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

viaKlix - Help


Dr. DK

Recommended Posts

Hello all,

 

For some reason when I update the viaKlix payment module, I loose the install option in the admin/modules/payment, and it still doesn't show on the list of the modules. :angry:

 

Here's the code I have for catalog/includes/languages/english/modules/payment/viaklix.php file:

 

<?php
/*
 $Id: viaklix.php,v 0.1 2003/10/26 apodigm

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Released under the GNU General Public License
*/

 define('MODULE_PAYMENT_VIAKLIX_TEXT_TITLE', 'viaKLIX Payment Gateway');
 define('MODULE_PAYMENT_VIAKLIX_TEXT_DESCRIPTION', 'viaKLIX Payment Gateway<br><br>Credit Card Test Info:<br><br>CC#: 4111111111111111<br>Expiry: Any');
 define('VIAKLIX_ERROR_HEADING', 'There has been an error processing your credit card');
 define('VIAKLIX_ERROR_MESSAGE', 'Please check your credit card details!');
 define('MODULE_PAYMENT_VIAKLIX_TEXT_CREDIT_CARD_OWNER', 'Credit Card Owner:');
 define('MODULE_PAYMENT_VIAKLIX_TEXT_CREDIT_CARD_NUMBER', 'Credit Card Number:');
 define('MODULE_PAYMENT_VIAKLIX_TEXT_CREDIT_CARD_EXPIRES', 'Credit Card Expiry Date:');

define('MODULE_PAYMENT_VIAKLIX_TEXT_CVV_NUMBER','CVV Number:');

define('MODULE_PAYMENT_VIAKLIX_TEXT_CVV_INDICATOR','CVV Status:');


 define('MODULE_PAYMENT_VIAKLIX_TEXT_JS_CC_OWNER', '* The owner\'s name of the credit card must be at least ' . CC_OWNER_MIN_LENGTH . ' characters.\n');
 define('MODULE_PAYMENT_VIAKLIX_TEXT_JS_CC_NUMBER', '* The credit card number must be at least ' . CC_NUMBER_MIN_LENGTH . ' characters.\n');
 define('MODULE_PAYMENT_CC_TEXT_JS_CVV_NUMBER', '* The cvv number must be at least ' . CVV_NUMBER_MIN_LENGTH . ' characters.\n');
 define('MODULE_PAYMENT_CC_TEXT_JS_MAX_CVV_NUMBER', '* The cvv number must be less than ' . CVV_NUMBER_MAX_LENGTH . ' characters.\n');
 define('TEXT_CVV_LINK', '<u>[help?]</u>');
 define('HEADING_CVV', 'Security Code Help Screen');
 define('TEXT_CVV', '<table align="center" cellspacing="2" cellpadding="5"><tr><td><span class="fancyText"><b>Visa, Mastercard, Discover 3 Digit Card Verification Number</b></span></td></tr><tr><td><span class="fancyText">For your safety and security, we require that you enter your card\'s verification number. The verification number is a 3-digit number printed on the back of your card. It appears after and to the right of your card number\'s last four digits.</span></td></tr><tr><td align="center"><IMG src="images/cv_card.gif"></td></tr></table><hr><table align="center" cellspacing="2" cellpadding="5" width="400"><tr><td><span class="fancyText"><b>American Express 4 Digit Card Verification Number</b> </span></td></tr><tr><td><span class="fancyText">For your safety and security, we require that you enter your card\'s verification number. The American Express verification number is a 4-digit number printed on the front of your card. It appears after and to the right of your card number.</span></td></tr><tr><td align="center"><IMG src="images/cv_amex_card.gif"></td></tr></table>');
 define('TEXT_CLOSE_WINDOW', '<u>Close Window</u> [x]');


?>

 

 

 

And here's the code I have for catalog/includes/modules/payment/viaklix.php:

 

 

 

<?php
/*
 $Id: viaklix.php,v 0.1 2003/10/26 apodigm

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 Released under the GNU General Public License

*/

 class viaklix {
   var $code, $title, $description, $enabled;

// class constructor
   function viaklix() {
     global $order;

     $this->code = 'viaklix';
     $this->title = MODULE_PAYMENT_VIAKLIX_TEXT_TITLE;
     $this->description = MODULE_PAYMENT_VIAKLIX_TEXT_DESCRIPTION;
// BOF: WebMakers.com Added: Free Payments and Shipping
if ( tep_get_free_charger($this->code) ) {
     $this->enabled = ((MODULE_PAYMENT_VIAKLIX_STATUS == 'True') ? true : false);
}
// EOF: WebMakers.com Added: Free Payments and Shipping
     $this->sort_order = MODULE_PAYMENT_VIAKLIX_SORT_ORDER;
     $this->enabled = ((MODULE_PAYMENT_VIAKLIX_STATUS == 'True') ? true : false);

     if ((int)MODULE_PAYMENT_VIAKLIX_ORDER_STATUS_ID > 0) {
       $this->order_status = MODULE_PAYMENT_VIAKLIX_ORDER_STATUS_ID;
     }

     if (is_object($order)) $this->update_status();

     $this->form_action_url = 'https://www.viaKLIX.com/process.asp';
   }

// class methods
   function update_status() {
     global $order;

     if ( ($this->enabled == true) && ((int)MODULE_PAYMENT_VIAKLIX_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_VIAKLIX_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() {
     $js = '  if (payment_value == "' . $this->code . '") {' . "\n" .
           '    var cc_owner = document.checkout_payment.viaklix_cc_owner.value;' . "\n" .
           '    var cc_number = document.checkout_payment.viaklix_cc_number.value;' . "\n" .
           '    var cvv_number = document.checkout_payment.viaklix_cvv_number.value;' . "\n" .
           '    if (cc_owner == "" || cc_owner.length < ' . CC_OWNER_MIN_LENGTH . ') {' . "\n" .
           '      error_message = error_message + "' . MODULE_PAYMENT_VIAKLIX_TEXT_JS_CC_OWNER . '";' . "\n" .
           '      error = 1;' . "\n" .
           '    }' . "\n" .
           '    if (cc_number == "" || cc_number.length < ' . CC_NUMBER_MIN_LENGTH . ') {' . "\n" .
           '      error_message = error_message + "' . MODULE_PAYMENT_VIAKLIX_TEXT_JS_CC_NUMBER . '";' . "\n" .
           '      error = 1;' . "\n" .
           '    }' . "\n" .
           '    if (cvv_number == "" || cvv_number.length < ' . CVV_NUMBER_MIN_LENGTH . ') {' . "\n" .
           '      error_message = error_message + "' . MODULE_PAYMENT_VIAKLIX_TEXT_JS_CVV_NUMBER . '";' . "\n" .
           '      error = 1;' . "\n" .
           '    }' . "\n" .
           '    if (cvv_number.length > ' . CVV_NUMBER_MAX_LENGTH . ') {' . "\n" . 
           '      error_message = error_message + "' . MODULE_PAYMENT_VIAKLIX_TEXT_JS_MAX_CVV_NUMBER . '";' . "\n" . 
           '      error = 1;' . "\n" . 
           '    }' . "\n" .
           '  }' . "\n";

     return $js;
   }

   function selection() {
     global $order;

     for ($i=1; $i < 13; $i++) {
       $expires_month[] = array('id' => sprintf('%02d', $i), 'text' => strftime('%B',mktime(0,0,0,$i,1,2000)));
     }

     $today = getdate(); 
     for ($i=$today['year']; $i < $today['year']+10; $i++) {
       $expires_year[] = array('id' => strftime('%y',mktime(0,0,0,1,1,$i)), 'text' => strftime('%Y',mktime(0,0,0,1,1,$i)));
     }

     $indicators[] = array('id'=>'Present','text'=>'Present');
     $indicators[] = array('id'=>'Not Present','text'=>'Not Present');
     $indicators[] = array('id'=>'Bypassed','text'=>'Missing');
     $indicators[] = array('id'=>'Illegible','text'=>'Illegible');

     $selection = array('id' => $this->code,
                        'module' => $this->title,
                        'fields' => array(array('title' => MODULE_PAYMENT_VIAKLIX_TEXT_CREDIT_CARD_OWNER,
                                                'field' => tep_draw_input_field('viaklix_cc_owner', $order->billing['firstname'] . ' ' . $order->billing['lastname'])),
                                          array('title' => MODULE_PAYMENT_VIAKLIX_TEXT_CREDIT_CARD_NUMBER,
                                                'field' => tep_draw_input_field('viaklix_cc_number')),
                                          array('title' => MODULE_PAYMENT_VIAKLIX_TEXT_CVV_NUMBER. ' ' .'<a href="javascript:popupWindow(\'' . tep_href_link(FILENAME_POPUP_CVV, '', 'SSL') . '\')">' . TEXT_CVV_LINK . '</a>',
                                                'field' => tep_draw_input_field('viaklix_cvv_number')),

                                          array('title' => MODULE_PAYMENT_VIAKLIX_TEXT_CVV_INDICATOR,
                                                'field' => tep_draw_pull_down_menu('viaklix_cvv_indicator', $indicators)),

                                          array('title' => MODULE_PAYMENT_VIAKLIX_TEXT_CREDIT_CARD_EXPIRES,
                                                'field' => tep_draw_pull_down_menu('viaklix_cc_expires_month', $expires_month) . ' ' . tep_draw_pull_down_menu('viaklix_cc_expires_year', $expires_year))));

     return $selection;
   }

   function pre_confirmation_check() {
     global $HTTP_POST_VARS;

     include(DIR_WS_CLASSES . 'cc_validation.php');

     $cc_validation = new cc_validation();
     $result = $cc_validation->validate($HTTP_POST_VARS['viaklix_cc_number'], $HTTP_POST_VARS['viaklix_cc_expires_month'], $HTTP_POST_VARS['viaklix_cc_expires_year']);

     $error = '';
     switch ($result) {
       case -1:
         $error = sprintf(TEXT_CCVAL_ERROR_UNKNOWN_CARD, substr($cc_validation->cc_number, 0, 4));
         break;
       case -2:
       case -3:
       case -4:
         $error = TEXT_CCVAL_ERROR_INVALID_DATE;
         break;
       case false:
         $error = TEXT_CCVAL_ERROR_INVALID_NUMBER;
         break;
     }

     if ( ($result == false) || ($result < 1) ) {
       $payment_error_return = 'payment_error=' . $this->code . '&error=' . urlencode($error) . '&viaklix_cc_owner=' . urlencode($HTTP_POST_VARS['viaklix_cc_owner']) . '&viaklix_cc_expires_month=' . $HTTP_POST_VARS['viaklix_cc_expires_month'] . '&viaklix_cc_expires_year=' . $HTTP_POST_VARS['viaklix_cc_expires_year'] . '&viaklix_cvv_number=' . $HTTP_POST_VARS['viaklix_cvv_number']. '&viaklix_cvv_indicator=' . $HTTP_POST_VARS['viaklix_cvv_indicator'];

       tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, $payment_error_return, 'SSL', true, false));
     }

     $this->cc_card_type = $cc_validation->cc_type;
     $this->cc_card_number = $cc_validation->cc_number;
     $this->cc_expiry_month = $cc_validation->cc_expiry_month;
     $this->cc_expiry_year = $cc_validation->cc_expiry_year;
   }

   function confirmation() {
     global $HTTP_POST_VARS;

     $confirmation = array('title' => $this->title . ': ' . $this->cc_card_type,
                           'fields' => array(array('title' => MODULE_PAYMENT_VIAKLIX_TEXT_CREDIT_CARD_OWNER,
                                                   'field' => $HTTP_POST_VARS['viaklix_cc_owner']),
                                             array('title' => MODULE_PAYMENT_VIAKLIX_TEXT_CREDIT_CARD_NUMBER,
                                                   'field' => substr($this->cc_card_number, 0, 4) . str_repeat('X', (strlen($this->cc_card_number) - 8)) . substr($this->cc_card_number, -4)),
                                             array('title' => MODULE_PAYMENT_VIAKLIX_TEXT_CVV_NUMBER,
                                                   'field' => $HTTP_POST_VARS['viaklix_cvv_number']),
                                             array('title' => MODULE_PAYMENT_VIAKLIX_TEXT_CVV_INDICATOR,
                                                   'field' => $HTTP_POST_VARS['viaklix_cvv_indicator']),
                                             array('title' => MODULE_PAYMENT_VIAKLIX_TEXT_CREDIT_CARD_EXPIRES,
                                                   'field' => strftime('%B, %Y', mktime(0,0,0,$HTTP_POST_VARS['viaklix_cc_expires_month'], 1, '20' . $HTTP_POST_VARS['viaklix_cc_expires_year'])))));

     return $confirmation;
   }

   function process_button() {
     global $HTTP_POST_VARS, $order, $currencies, $currency,$customer_id;

  $process_button_string = 
   tep_draw_hidden_field('ssl_merchant_id', MODULE_PAYMENT_VIAKLIX_MERCHANT_ID) .
   tep_draw_hidden_field('ssl_user_id', MODULE_PAYMENT_VIAKLIX_USER_ID) .
   tep_draw_hidden_field('ssl_pin',MODULE_PAYMENT_VIAKLIX_PIN).
   tep_draw_hidden_field('ssl_amount', number_format($order->info['total'] * $currencies->get_value('USD'), 2, '','')) .
   tep_draw_hidden_field('ssl_salestax', number_format($order->info['tax'] * $currencies->get_value('USD'), 2, '','')) .
   tep_draw_hidden_field('ssl_show_form','FALSE').
   tep_draw_hidden_field('ssl_card_number', $HTTP_POST_VARS['viaklix_cc_number']) .
   tep_draw_hidden_field('ssl_transaction_type','SALE').
   tep_draw_hidden_field('ssl_exp_date', $HTTP_POST_VARS['viaklix_cc_expires_month']. $HTTP_POST_VARS['viaklix_cc_expires_year']) .

   tep_draw_hidden_field('ssl_cvv2', $HTTP_POST_VARS['viaklix_cvv_indicator']) .
   tep_draw_hidden_field('ssl_cvv2cvc2', $HTTP_POST_VARS['viaklix_cvv_number']) .

   tep_draw_hidden_field('ssl_customer_code', $customer_id) .
   tep_draw_hidden_field('ssl_company', $order->billing['company']) .
   tep_draw_hidden_field('ssl_first_name', $order->billing['firstname']) .
   tep_draw_hidden_field('ssl_last_name', $order->billing['lastname']) .
   tep_draw_hidden_field('ssl_avs_address', $order->billing['street_address']) .
   tep_draw_hidden_field('ssl_city', $order->billing['city']) .
   tep_draw_hidden_field('ssl_state', $order->billing['state']) .
   tep_draw_hidden_field('ssl_avs_zip', $order->billing['postcode']) .
   tep_draw_hidden_field('ssl_country', $order->billing['country']['title']) .
   tep_draw_hidden_field('ssl_phone', $order->customer['telephone']) .
   tep_draw_hidden_field('ssl_email', $order->customer['email_address']) .
   tep_draw_hidden_field('ssl_ship_to_first_name', $order->delivery['firstname']) .
   tep_draw_hidden_field('ssl_ship_to_last_name', $order->delivery['lastname']) .
   tep_draw_hidden_field('ssl_ship_to_address', $order->delivery['street_address']) .
   tep_draw_hidden_field('ssl_ship_to_city', $order->delivery['city']) .
   tep_draw_hidden_field('ssl_ship_to_state', $order->delivery['state']) .
   tep_draw_hidden_field('ssl_ship_to_zip', $order->delivery['postcode']) .
   tep_draw_hidden_field('ssl_ship_to_country', $order->delivery['country']['title']) .
   tep_draw_hidden_field('ssl_result_format', 'HTML') .
   tep_draw_hidden_field('ssl_receipt_apprvl_method', 'REDG') .
   tep_draw_hidden_field('ssl_receipt_decl_method', 'REDG') .
   tep_draw_hidden_field('ssl_receipt_apprvl_get_url', tep_href_link(FILENAME_CHECKOUT_PROCESS, '', 'SSL', true)) .
   tep_draw_hidden_field('ssl_receipt_decl_get_url', tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'payment_error=' . $this->code . '&viaklix_cc_owner=' . urlencode($HTTP_POST_VARS['viaklix_cc_owner']) . '&passedvars=coming' , 'SSL', true));
  

     if (MODULE_PAYMENT_VIAKLIX_TESTMODE == 'Test') $process_button_string .= tep_draw_hidden_field('ssl_test_mode', 'TRUE');
     $process_button_string .= tep_draw_hidden_field(tep_session_name(), tep_session_id());



     return $process_button_string;
   }

   function before_process() {
     return false;
   }

   function after_process() {
     return false;
   }

   function get_error() {
     global $HTTP_GET_VARS;

     $error = array('title' => VIAKLIX_ERROR_HEADING,
                    'error' => ((isset($HTTP_GET_VARS['ssl_result_message'])) ? stripslashes(urldecode($HTTP_GET_VARS['ssl_result_message'])) .' '.  VIAKLIX_ERROR_MESSAGE : VIAKLIX_ERROR_MESSAGE));

     return $error;
   }

   function check() {
     if (!isset($this->_check)) {
       $check_query = tep_db_query("select configuration_value from " . TABLE_CONFIGURATION . " where configuration_key = 'MODULE_PAYMENT_VIAKLIX_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 viaKLIX Module', 'MODULE_PAYMENT_VIAKLIX_STATUS', 'True', 'Do you want to accept viaKLIX 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 Number', 'MODULE_PAYMENT_VIAKLIX_MERCHANT_ID', '99999', 'The account number used for the viaKLIX service', '6', '2', now())");
     tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('User ID', 'MODULE_PAYMENT_VIAKLIX_USER_ID', '99999', 'The user ID for the viaKLIX service', '6', '3', now())");
     tep_db_query("insert into " . TABLE_CONFIGURATION . " (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added) values ('User PIN', 'MODULE_PAYMENT_VIAKLIX_PIN', '0', 'The user PIN for the viaKLIX service', '6', '4', 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_VIAKLIX_TESTMODE', 'Test', 'Transaction mode used for processing orders', '6', '0', 'tep_cfg_select_option(array(\'Test\', \'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_VIAKLIX_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_VIAKLIX_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_VIAKLIX_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_VIAKLIX_STATUS', 'MODULE_PAYMENT_VIAKLIX_MERCHANT_ID', 'MODULE_PAYMENT_VIAKLIX_USER_ID', 'MODULE_PAYMENT_VIAKLIX_PIN', 'MODULE_PAYMENT_VIAKLIX_TESTMODE','MODULE_PAYMENT_VIAKLIX_ZONE', 'MODULE_PAYMENT_VIAKLIX_ORDER_STATUS_ID', 'MODULE_PAYMENT_VIAKLIX_SORT_ORDER');
   }
 }
?>

 

Does anyone sees anything wrong with these files, the reason why it's not working?

Thanks in advance for any help or replys! :(

 

Sincerely,

Dr. DK

-----------------------------------------------------------------------

 

Sincerely,

Dr. DK

Link to comment
Share on other sites

  • 3 months later...
  • 10 months later...

I've got the module working fine with one minor exception. The CC number that ViaKlix requires for testing 50003000xxxxxxxx, is seen as an error by OSC. How did you get around this? The 4111111111111111 that is used for testing in the OSC system of course fails with ViaKlix.

 

Thanks for the module! I've added a Division category, along with PIN and User ID, since the company that I'm building the site for needs it.

 

Any thoughts would be appreciated.

 

Dave

Link to comment
Share on other sites

OK, now I've got that working (added 000 to MC edit). However, now in production mode, all credit cards are rejected. It appears as if the amount is going through without a decimal place. Therefore amounts come through as 2195, not 21.95. I looked at the viaklix.php file and this should work, since ssl_amount is what ViaKlix is looking for. I'm assuming that the 2, is number of decimal places.

 

   tep_draw_hidden_field('ssl_amount', number_format($order->info['total'] * $currencies->get_value('USD'), 2, '','')) .
   tep_draw_hidden_field('ssl_salestax', number_format($order->info['tax'] * $currencies->get_value('USD'), 2, '','')) .

 

Any help would be appreciated.

 

Does anyone read these forums? I've never had an answer to any input or questions.

Link to comment
Share on other sites

These should have a period for the seperator

 

tep_draw_hidden_field('ssl_amount', number_format($order->info['total'] * $currencies->get_value('USD'), 2, '.','')) .
  tep_draw_hidden_field('ssl_salestax', number_format($order->info['tax'] * $currencies->get_value('USD'), 2, '.','')) .

 

For the test number I changed includes/classes/cc_validation.php so that the card type will be Other and not return an error if it doesn fit in the known ranges. The payment gateways dont need this info and there seems to be new ranges and range errors in this code.

 

if (ereg('^4[0-9]{12}([0-9]{3})?$', $this->cc_number)) {
       $this->cc_type = 'Visa';
     } elseif (ereg('^5[1-5][0-9]{14}$', $this->cc_number)) {
       $this->cc_type = 'Master Card';
     } elseif (ereg('^3[47][0-9]{13}$', $this->cc_number)) {
       $this->cc_type = 'American Express';
     } elseif (ereg('^3(0[0-5]|[68][0-9])[0-9]{11}$', $this->cc_number)) {
       $this->cc_type = 'Diners Club';
     } elseif (ereg('^6011[0-9]{12}$', $this->cc_number)) {
       $this->cc_type = 'Discover';
     } elseif (ereg('^(3[0-9]{4}|2131|1800)[0-9]{11}$', $this->cc_number)) {
       $this->cc_type = 'JCB';
     } elseif (ereg('^5610[0-9]{12}$', $this->cc_number)) {
       $this->cc_type = 'Australian BankCard';
     } else {
       $this->cc_type = 'Other';
       //return -1;
     }

Link to comment
Share on other sites

  • 6 months later...

I'm trying to get a client's store to handle the viaKlix contribution and everything seems to work just dandy until I get to the viaKlix side of things for processing (https://www2.viaklix.com/process.asp). Regardless of what card I put in - testing or production - I get the following error from the viaKlix server:

 

Number : 8000

Message : The PIN was not supplied in the authorization request.

 

Has anyone else had this happen or know of a solution?

 

:(

Link to comment
Share on other sites

Well, I've found out a little more at least - the error is served up by viaKlix because OC isn't sending the merchant PIN along with the authorization request. There doesn't appear to be a spot to add it and I'm not quite good enough at php to add it myself. Certinaly this must be affecting _someone_ else.

Link to comment
Share on other sites

  • 4 weeks later...

This is happening to me too. anyone know of a fix?

anj

I'm trying to get a client's store to handle the viaKlix contribution and everything seems to work just dandy until I get to the viaKlix side of things for processing (https://www2.viaklix.com/process.asp). Regardless of what card I put in - testing or production - I get the following error from the viaKlix server:

 

Number : 8000

Message : The PIN was not supplied in the authorization request.

 

Has anyone else had this happen or know of a solution?

 

:(

Link to comment
Share on other sites

This is happening to me too. anyone know of a fix?

anj

 

 

Hi there,

 

after long and hard struggles with viaKLIX mine is working very well now. Did you download the module from the OC contributions? That one should have an administrative php that has pin and everything in it. I never did use test mode or any of that.

 

Went straight to live usage. I also had the decimal issue after weeks of operating fine.

The module administration should look like this, merchant# and user id are the same number.

 

 

viaKLIX Payment Gateway

 

Credit Card Test Info:

 

CC#: 4111111111111111

Expiry: Any

 

Enable viaKLIX Module

True

 

Merchant Number

xxxxxx

 

User ID

xxxxxx

 

User PIN

xxxxxx

 

Transaction Mode

Production

 

Payment Zone

--none--

 

Set Order Status

default

 

Sort order of display.

1

 

If needed I can go back and compare the changes I had to make for the module to function.

 

I helped another user a couple of weeks ago, but did it via regular email. I save everything and probably can dig that solution up on my home computer.

 

Contact me for help

 

Wolfgang

Link to comment
Share on other sites

  • 1 month later...

ok i am getting this back

 

An Error Occurred

 

Number : 7000

Message : The viaKLIX ID and/or User ID supplied in the authorization request is invalid.

 

They said that i need to be passing the ssl_id along with everything else, does anybody know how to add this to this ViaKlix contribution?

Link to comment
Share on other sites

  • 7 months later...
ok i am getting this back

 

An Error Occurred

 

Number : 7000

Message : The viaKLIX ID and/or User ID supplied in the authorization request is invalid.

 

They said that i need to be passing the ssl_id along with everything else, does anybody know how to add this to this ViaKlix contribution?

 

did you ever find out how to fix this?

i have just installed the contribution and have the same error message when i try to run a test payment.

earlier in this post, daver6 mentions that he changed the card number to run tests, but i'm not sure what he means when he says that he added 000 to MC edit ???

i have also tried user99999999's code change, but that hasn't helped either!

 

any help from those who have this working would be great...

 

thanks in advance

 

mike

Link to comment
Share on other sites

  • 1 month later...
The processing goes on but there comes after oscommerce page confirm order:

 

https://www2.viaklix.com/store/checkout_process.php?.....

The page cannot be found

The page you are looking for might have been removed, had its name changed, or is temporarily unavailable.

 

Any ideas why this happening?

 

You have to set the Redirect URL that viaKlix redirects back to through the viaklix.com site User Management. That will clear the problem up.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...