View Single Post
  #4  
Old 07-03-2010, 09:31 AM
  DogByteMan's Avatar 
DogByteMan DogByteMan is offline
 

X-Adept
  
Join Date: Mar 2003
Posts: 833
 

Default Installation of X-Payments Connector on X-Cart 4.1.12 (Part 4)

Download the connector from your file area at QT and unarchive it.
Make the following changes to the files you unarchived.

In \modules\XPayments_Connector\xpc_func.php

1) Remove:
Code:
'has_preauth' => getTranTypeFlag($tranTypes, XPC_TRAN_TYPE_AUTH), 'preauth_expire' => $authCaptureInfo['authExp'], 'capture_min_limit' => ($authCaptureInfo['captMinLimit'] * 100) . '%', 'capture_max_limit' => ($authCaptureInfo['captMaxLimit'] * 100 - 100) . '%',

2) Remove:
Code:
'language' => $shop_language

3) Replace:
Code:
global $config, $sql_tbl, $active_modules, $login;

With
Code:
global $config, $sql_tbl, $active_modules;

4) Replace:
Code:
'login' => $user_info['login'],

With
Code:
'login' => $user_info['login'] . ' (User ID #' . $user_info['id'] . ')',

5) Replace:
Code:
$address_fields = array('firstname', 'lastname', 'address', 'city', 'state', 'country', 'zipcode');

With
Code:
$address_fields = array('firstname', 'lastname', 'address', 'city', 'state', 'country', 'zipcode', 'phone', 'fax');

6) Replace:
Code:
foreach (array('company', 'email', 'phone', 'fax') as $field) {

With
Code:
foreach (array('company', 'email') as $field) {

7) Replace:
Code:
$admin_email = func_query_first_cell("SELECT email FROM $sql_tbl[customers] WHERE usertype IN ('" . implode("', '", $usertypes). "') AND status = 'Y' AND email != '' LIMIT 1");

With
Code:
$admin_email = func_query_first_cell("SELECT email FROM $sql_tbl[customers] WHERE usertype IN ('" . implode("', '", $usertypes). "') AND status = 'Y' AND email != ''");

8 ) Replace:
Code:
srand(time());

With
Code:
srand(XC_TIME);

In \payment\cc_xpc.php

1) Replace:
Code:
$bill_output['billmes'] = $bill_output['code'] == 1 ? $response['message'] : $response['lastMessage'];

With
Code:
$bill_output['billmes'] = ($bill_output['code'] == 1) ? $response['message'] . "\n" . '(last 4 card numbers: ' . @$_POST['last_4_cc_num'] . ');' . "\n" . '(card type: ' . @$_POST['card_type'] . ');' : $response['lastMessage'];

2) Replace:
Code:
func_is_preauth_force_enabled($secure_oid)

With
Code:
false

Now your ready to upload the files

Ignore the file in admin - do not upload it
Ignore sql folder - These have already been applied
Ignore Install files - You won't be using them

upload files in modules, payment, and skin1_original taking care to maintain structure.
Upload files from skin1_original into skin 1 also taking care to maintain structure.
__________________
Dedicated Server provided by EWD Hosting
X-Cart version 4.1.12
PHP 5.3.2
MySQL server 5.0.87-community
Operation system Linux
Perl 5.008008
dogbytecomputer.com
Reply With Quote