Installation of X-Payments Connector on X-Cart 4.1.12
This is provided to you without any guarantee that it will work for you. As always backup ALL files and data base before beginning.
This is not for the faint at heart. If you have any doubts what-so-ever about how to do it, pay for QTS to do it for you. *********************************************** From your admin area go to Patch/Upgrade and in the Apply SQL patch, SQL query(ies): Copy and paste the following then apply it. Code:
DELETE FROM xcart_modules WHERE module_name='XPayments_Connector'; From your admin area go to Patch/Upgrade and in the Apply SQL patch, SQL query(ies): Copy and paste the following then apply it. Code:
INSERT INTO xcart_modules (module_name, module_descr, active) VALUES ('XPayments_Connector','This module enables an ability to process payments via X-Payments software','Y'); |
Installation of X-Payments Connector on X-Cart 4.1.12 (Part 2)
From your admin area go to Patch/Upgrade and in the Apply SQL patch, SQL query(ies):
Copy and paste the following then apply it. WARNING! The below is for the X-Cart 4.1.12 US English language variables Code:
replace into xcart_languages values ('US','module_descr_XPayments_Connector','This module enables an ability to process payments via X-Payments software','Modules'); |
Installation of X-Payments Connector on X-Cart 4.1.12 (Part 3)
From your admin area go to Patch/Upgrade and in the Apply SQL patch, SQL query(ies):
Copy and paste the following then apply it. WARNING! The below is for the X-Cart 4.1.12 US English language variables Code:
replace into xcart_languages values ('US','lbl_xpc_auth','Auth','Labels'); |
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), 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) 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. |
Installation of X-Payments Connector on X-Cart 4.1.12 (Part 5)
Edit or Download and edit the following existing files on your X-Cart 4.1.12 install:
In cart_directory/top.inc.php 1) ADD Code:
define('XC_TIME', time()); After Code:
$xcart_fs_default_permissions = array( In cart_directory/admin/cc_processing.php 1) ADD Code:
if (!empty($active_modules['XPayments_Connector'])) { After Code:
x_load('backoffice','crypt','tests'); 2) REPLACE Code:
$tmp = func_query_first("SELECT * FROM $sql_tbl[ccprocessors] WHERE processor='".$processor."'"); With Code:
$where_query = ''; 3 ) ADD Code:
if ($processor == 'cc_xpc.php') { After Code:
$insert_params = array ( 4) REPLACE Code:
db_query("UPDATE $sql_tbl[ccprocessors] SET paymentid='".$paymentid."' WHERE processor='".$processor."'"); With Code:
db_query("UPDATE $sql_tbl[ccprocessors] SET paymentid='".$paymentid."' WHERE processor='".$processor."'" . $where_query); 5) ADD Code:
} elseif ($cc_processor == 'cc_xpc.php') { After Code:
$conf_data[$pkey] = $cc_processing_module; In cart_directory/admin/configuration.php 1) REPLACE Code:
$trusted_post_variables = array("gpg_key", "pgp_key"); With Code:
$trusted_post_variables = array("gpg_key", "pgp_key", "xpc_private_key_password", "xpc_private_key", "xpc_public_key"); 2) ADD Code:
if ($option == 'XPayments_Connector') { After Code:
if ($REQUEST_METHOD=="POST") { 3) ADD Code:
} After Code:
if ($option == "User_Profiles") { In cart_directory/admin/payment_methods.php 1) ADD Code:
if (!empty($active_modules['XPayments_Connector'])) { After Code:
define("IS_MULTILANGUAGE", 1); 2) REPLACE Code:
$payment_methods = func_query("SELECT pm.*,cc.module_name,cc.processor,cc.type FROM $sql_tbl[payment_methods] AS pm LEFT JOIN $sql_tbl[ccprocessors] AS cc ON (pm.paymentid=cc.paymentid OR pm.paymentid<>cc.paymentid AND pm.processor_file=cc.processor) ORDER BY pm.orderby, pm.paymentid"); With Code:
$payment_methods = func_query("SELECT pm.*, cc.module_name, cc.processor, cc.type, cc.param01 FROM $sql_tbl[payment_methods] AS pm LEFT JOIN $sql_tbl[ccprocessors] AS cc ON (pm.paymentid=cc.paymentid OR pm.paymentid<>cc.paymentid AND pm.processor_file=cc.processor AND cc.processor != 'cc_xpc.php') ORDER BY pm.active DESC, pm.orderby, pm.paymentid"); 3) ADD Code:
if (!empty($active_modules['XPayments_Connector'])) { After Code:
$cc_module_files = func_query("select * from $sql_tbl[ccprocessors] where paymentid='0' and processor<>'ps_paypal_pro.php' order by type,module_name"); One .tpl file to edit. In cart_directory/skin1/admin/configuration.tpl 1) ADD Code:
{elseif $option eq "XML_Site_Map"} After Code:
{elseif $option eq "Search_products"} 2) ADD Code:
{if $option eq "XPayments_Connector"} After Code:
{if $option eq "Google_Analytics"} 3) ADD Code:
{elseif $option eq "XPayments_Connector"} After Code:
<h3>{$lng.lbl_test_data_encryption}</h3> YOU ARE DONE!!!! In your X-Cart under modules click configure for X-Payments Connector Store ID: < This is the store ID that was assigned when you set up the store in X-Payments > X-Payments URL: https://domain where X-Payments is/X-Payments Directory (NO Trailing /)(must be https) Public key: < This is the public key that was assigned when you set up the store in X-Payments > Private key: < This is the private key that was assigned when you set up the store in X-Payments > Private key password: < This is the private key password that was assigned when you set up the store in X-Payments > IP addresses for X-Payments callbacks: IP of server hosting X-Payments |
Re: Installation of X-Payments Connector on X-Cart 4.1.12
I have posted some tips on how to install X-Payments here
|
Re: Installation of X-Payments Connector on X-Cart 4.1.12
Thanks for posting this, sure there will be users to benefit. In post #4 in the beginning is missing in which file changes go (it is modules/XPayments_Connector/xpc_func.php). Also I think you should mention which payment gateway you are using. I won't be suprised if some changes are specific to the payment gateway (they shouldn't be but who knows...). I am trying to work out one for 4.2.x
|
Re: Installation of X-Payments Connector on X-Cart 4.1.12
Quote:
Fixed the missing filename. No payment gateways are needed in X-Cart any longer if using X-Payment Connector. The payment gateway is contained in X-Payments and imported into X-Cart, via X-Payment Connector, as a payment method. |
Re: Installation of X-Payments Connector on X-Cart 4.1.12
Quote:
Look in the the xpayments/var/log folder for clues. In my installation, using FirstData, there is a problem. ERROR [2010-03-07 00:01:34] User: unknown; IP: xx.xxx.xx.xxx Zone: Transport Code: GATEWAY_RESPONSE_CODE_WRONG_FORMAT (139) Response code returned by payment module contains unallowed characters - "1603518937562682:YYYM:" Clearly the "1603518937562682:YYYM:" is valid, X-Payments handler for FirstData has a problem. I have submitted a ticket. Funny, a declined transaction works correctly. Only the successful ones have the problem. |
Re: Installation of X-Payments Connector on X-Cart 4.1.12
Excellent post Dog...thanks for sharing! Oh this is going to be such a fun week...
|
All times are GMT -8. The time now is 07:15 AM. |
Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.