forked from cardgate/x-cart
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request cardgate#1 from RichardCardGate/master
Initial extension upload
- Loading branch information
Showing
48 changed files
with
3,528 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
# x-cart | ||
CardGate module for X-Cart | ||
|
59 changes: 59 additions & 0 deletions
59
cardgateplus/include/templater/plugins/modifier.cgpbanks.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
<?php | ||
/* vim: set ts=4 sw=4 sts=4 et: */ | ||
/*****************************************************************************\ | ||
+-----------------------------------------------------------------------------+ | ||
| X-Cart Software license agreement | | ||
| Copyright (c) 2001-2013 Qualiteam software Ltd <info@x-cart.com> | | ||
| All rights reserved. | | ||
+-----------------------------------------------------------------------------+ | ||
| PLEASE READ THE FULL TEXT OF SOFTWARE LICENSE AGREEMENT IN THE "COPYRIGHT" | | ||
| FILE PROVIDED WITH THIS DISTRIBUTION. THE AGREEMENT TEXT IS ALSO AVAILABLE | | ||
| AT THE FOLLOWING URL: http://www.x-cart.com/license.php | | ||
| | | ||
| THIS AGREEMENT EXPRESSES THE TERMS AND CONDITIONS ON WHICH YOU MAY USE THIS | | ||
| SOFTWARE PROGRAM AND ASSOCIATED DOCUMENTATION THAT QUALITEAM SOFTWARE LTD | | ||
| (hereinafter referred to as "THE AUTHOR") OF REPUBLIC OF CYPRUS IS | | ||
| FURNISHING OR MAKING AVAILABLE TO YOU WITH THIS AGREEMENT (COLLECTIVELY, | | ||
| THE "SOFTWARE"). PLEASE REVIEW THE FOLLOWING TERMS AND CONDITIONS OF THIS | | ||
| LICENSE AGREEMENT CAREFULLY BEFORE INSTALLING OR USING THE SOFTWARE. BY | | ||
| INSTALLING, COPYING OR OTHERWISE USING THE SOFTWARE, YOU AND YOUR COMPANY | | ||
| (COLLECTIVELY, "YOU") ARE ACCEPTING AND AGREEING TO THE TERMS OF THIS | | ||
| LICENSE AGREEMENT. IF YOU ARE NOT WILLING TO BE BOUND BY THIS AGREEMENT, DO | | ||
| NOT INSTALL OR USE THE SOFTWARE. VARIOUS COPYRIGHTS AND OTHER INTELLECTUAL | | ||
| PROPERTY RIGHTS PROTECT THE SOFTWARE. THIS AGREEMENT IS A LICENSE AGREEMENT | | ||
| THAT GIVES YOU LIMITED RIGHTS TO USE THE SOFTWARE AND NOT AN AGREEMENT FOR | | ||
| SALE OR FOR TRANSFER OF TITLE. THE AUTHOR RETAINS ALL RIGHTS NOT EXPRESSLY | | ||
| GRANTED BY THIS AGREEMENT. | | ||
+-----------------------------------------------------------------------------+ | ||
\*****************************************************************************/ | ||
|
||
/** | ||
* Templater plugin | ||
* ------------------------------------------------------------- | ||
* Type: modifier | ||
* Name: cgpbanks | ||
* Purpose: generate html iDEAL bank data; | ||
* ------------------------------------------------------------- | ||
* | ||
* @category X-Cart | ||
* @package X-Cart | ||
* @subpackage Lib | ||
* @see ____file_see____ | ||
*/ | ||
|
||
if (!defined('XCART_START')) { header("Location: ../../../"); die("Access denied"); } | ||
|
||
function smarty_modifier_cgpbanks($value) | ||
{ | ||
require_once './payment/cardgateplus/cardgateplus_lib.php'; | ||
class cgp_ideal extends cgp_generic { | ||
} | ||
|
||
$cardgateplus = new cgp_ideal('ideal'); | ||
$s = $cardgateplus->generateBankHtml(); | ||
$s .= $cardgateplus->generateBankScript(); | ||
|
||
return $s; | ||
} | ||
|
||
?> |
75 changes: 75 additions & 0 deletions
75
cardgateplus/include/templater/plugins/modifier.cgpgiftcarddetails.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
<?php | ||
|
||
/* vim: set ts=4 sw=4 sts=4 et: */ | ||
/* * ***************************************************************************\ | ||
+-----------------------------------------------------------------------------+ | ||
| X-Cart Software license agreement | | ||
| Copyright (c) 2001-2013 Qualiteam software Ltd <info@x-cart.com> | | ||
| All rights reserved. | | ||
+-----------------------------------------------------------------------------+ | ||
| PLEASE READ THE FULL TEXT OF SOFTWARE LICENSE AGREEMENT IN THE "COPYRIGHT" | | ||
| FILE PROVIDED WITH THIS DISTRIBUTION. THE AGREEMENT TEXT IS ALSO AVAILABLE | | ||
| AT THE FOLLOWING URL: http://www.x-cart.com/license.php | | ||
| | | ||
| THIS AGREEMENT EXPRESSES THE TERMS AND CONDITIONS ON WHICH YOU MAY USE THIS | | ||
| SOFTWARE PROGRAM AND ASSOCIATED DOCUMENTATION THAT QUALITEAM SOFTWARE LTD | | ||
| (hereinafter referred to as "THE AUTHOR") OF REPUBLIC OF CYPRUS IS | | ||
| FURNISHING OR MAKING AVAILABLE TO YOU WITH THIS AGREEMENT (COLLECTIVELY, | | ||
| THE "SOFTWARE"). PLEASE REVIEW THE FOLLOWING TERMS AND CONDITIONS OF THIS | | ||
| LICENSE AGREEMENT CAREFULLY BEFORE INSTALLING OR USING THE SOFTWARE. BY | | ||
| INSTALLING, COPYING OR OTHERWISE USING THE SOFTWARE, YOU AND YOUR COMPANY | | ||
| (COLLECTIVELY, "YOU") ARE ACCEPTING AND AGREEING TO THE TERMS OF THIS | | ||
| LICENSE AGREEMENT. IF YOU ARE NOT WILLING TO BE BOUND BY THIS AGREEMENT, DO | | ||
| NOT INSTALL OR USE THE SOFTWARE. VARIOUS COPYRIGHTS AND OTHER INTELLECTUAL | | ||
| PROPERTY RIGHTS PROTECT THE SOFTWARE. THIS AGREEMENT IS A LICENSE AGREEMENT | | ||
| THAT GIVES YOU LIMITED RIGHTS TO USE THE SOFTWARE AND NOT AN AGREEMENT FOR | | ||
| SALE OR FOR TRANSFER OF TITLE. THE AUTHOR RETAINS ALL RIGHTS NOT EXPRESSLY | | ||
| GRANTED BY THIS AGREEMENT. | | ||
+-----------------------------------------------------------------------------+ | ||
\**************************************************************************** */ | ||
|
||
/** | ||
* Templater plugin | ||
* ------------------------------------------------------------- | ||
* Type: modifier | ||
* Name: cgpgiftcarddetails | ||
* Purpose: generate html Gift card data; | ||
* ------------------------------------------------------------- | ||
* | ||
* @category X-Cart | ||
* @package X-Cart | ||
* @subpackage Lib | ||
* @see ____file_see____ | ||
*/ | ||
if ( !defined( 'XCART_START' ) ) { | ||
header( "Location: ../../../" ); | ||
die( "Access denied" ); | ||
} | ||
|
||
function smarty_modifier_cgpgiftcarddetails( $value ) { | ||
require_once './payment/cardgateplus/cardgateplus_lib.php'; | ||
|
||
if ( isset( $_COOKIE['cgp_cardnumber'] ) ) { | ||
unset( $_COOKIE['cgp_cardnumber'] ); | ||
unset( $_COOKIE['cgp_pin'] ); | ||
setcookie( 'cgp_cardnumber', null, -1, '/' ); | ||
setcookie( 'cgp_pin', null, -1, '/' ); | ||
} | ||
|
||
class cgp_giftcard extends cgp_generic { | ||
|
||
} | ||
|
||
$s = ' Cardnumber<br>'; | ||
|
||
$s.= ' <input type="text" id="cgpcardnumber" name="cgp_cardnumber" value="" onchange="store_giftcarddetails()"><br>'; | ||
$s.= ' Pin<br>'; | ||
$s.= ' <input type="text" id="cgppin" name="cgp_pin" value="" onchange="store_giftcarddetails()">'; | ||
|
||
$cardgateplus = new cgp_giftcard( 'giftcard' ); | ||
$s .= $cardgateplus->generateGiftcardScript(); | ||
|
||
return $s; | ||
} | ||
|
||
?> |
54 changes: 54 additions & 0 deletions
54
cardgateplus/install_cardgateplus/database/ccprocessors.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
REPLACE INTO `%s` | ||
( | ||
`module_name`, | ||
`type`, | ||
`processor`, | ||
`template`, | ||
`param01`, | ||
`param02`, | ||
`param03`, | ||
`param04`, | ||
`param05`, | ||
`param06`, | ||
`param07`, | ||
`param08`, | ||
`param09`, | ||
`disable_ccinfo`, | ||
`background`, | ||
`testmode`, | ||
`is_check`, | ||
`is_refund`, | ||
`c_template`, | ||
`paymentid`, | ||
`cmpi`, | ||
`use_preauth`, | ||
`preauth_expire`, | ||
`has_preauth` | ||
) | ||
VALUES | ||
( | ||
'CardGatePlus %s', | ||
'C', | ||
'cc_cgp_%3$s.php', | ||
'cc_cgp_%3$s.tpl', | ||
'%4$s', | ||
'0', | ||
'0', | ||
'xxxx', | ||
'EUR', | ||
'DETECT', | ||
'N', | ||
'cgp', | ||
'DETECT', | ||
'Y', | ||
'N', | ||
'N', | ||
'Y', | ||
'', | ||
'', | ||
%5$s, | ||
'', | ||
'', | ||
0, | ||
'' | ||
); |
48 changes: 48 additions & 0 deletions
48
cardgateplus/install_cardgateplus/database/ccprocessors_4_1.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
REPLACE INTO `%s` | ||
( | ||
`module_name`, | ||
`type`, | ||
`processor`, | ||
`template`, | ||
`param01`, | ||
`param02`, | ||
`param03`, | ||
`param04`, | ||
`param05`, | ||
`param06`, | ||
`param07`, | ||
`param08`, | ||
`param09`, | ||
`disable_ccinfo`, | ||
`background`, | ||
`testmode`, | ||
`is_check`, | ||
`is_refund`, | ||
`c_template`, | ||
`paymentid`, | ||
`cmpi` | ||
) | ||
VALUES | ||
( | ||
'CardGatePlus %s', | ||
'C', | ||
'cc_cgp_%3$s.php', | ||
'cc_cgp_%3$s.tpl', | ||
'%4$s', | ||
'%5s', | ||
'0', | ||
'xxxx', | ||
'EUR', | ||
'DETECT', | ||
'N', | ||
'cgp', | ||
'DETECT', | ||
'Y', | ||
'N', | ||
'N', | ||
'Y', | ||
'', | ||
'', | ||
%6$s, | ||
'' | ||
); |
32 changes: 32 additions & 0 deletions
32
cardgateplus/install_cardgateplus/database/payment_methods.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
INSERT INTO `%s` | ||
( | ||
`paymentid`, | ||
`payment_method`, | ||
`payment_details`, | ||
`payment_template`, | ||
`payment_script`, | ||
`protocol`, | ||
`orderby`, | ||
`active`, | ||
`is_cod`, | ||
`af_check`, | ||
`processor_file`, | ||
`surcharge`, | ||
`surcharge_type` | ||
) | ||
VALUES | ||
( | ||
null, | ||
'CardGatePlus %s', | ||
'Please select the payment method you wish to use', | ||
'customer/main/payment_%s', | ||
'payment_cc.php', | ||
'http', | ||
999, | ||
'N', | ||
'N', | ||
'N', | ||
'cc_cgp_%s.php', | ||
0.00, | ||
'$' | ||
) |
9 changes: 9 additions & 0 deletions
9
cardgateplus/install_cardgateplus/files/customer/main/payment_cgp_giftcard.tpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{* | ||
$Id: payment_cgp_ideal.tpl,v 1.4 2010/07/01 07:54:35 igoryan Exp $ | ||
vim: set ts=2 sw=2 sts=2 et: | ||
*} | ||
{if $payment_cc_data.background eq 'I'} | ||
{$lng.disable_ccinfo_iframe_msg} | ||
{else} | ||
{'true'|cgpgiftcarddetails} | ||
{/if} |
9 changes: 9 additions & 0 deletions
9
cardgateplus/install_cardgateplus/files/customer/main/payment_cgp_ideal.tpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{* | ||
$Id: payment_cgp_ideal.tpl,v 1.4 2010/07/01 07:54:35 igoryan Exp $ | ||
vim: set ts=2 sw=2 sts=2 et: | ||
*} | ||
{if $payment_cc_data.background eq 'I'} | ||
{$lng.disable_ccinfo_iframe_msg} | ||
{else} | ||
{'true'|cgpbanks} | ||
{/if} |
86 changes: 86 additions & 0 deletions
86
cardgateplus/install_cardgateplus/files/payments/cc_cgp_afterpay.tpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
{* | ||
$Id: cc_cgp_afterpay.tpl,v 0.1 2008/08/21 09:53:14 max Exp $ | ||
vim: set ts=2 sw=2 sts=2 et: | ||
*} | ||
<h3>CardGatePlus Afterpay</h3> | ||
{$lng.txt_cc_configure_top_text} | ||
<p /> | ||
{capture name=dialog} | ||
<center> | ||
<form action="cc_processing.php?cc_processor={$smarty.get.cc_processor|escape:"url"}" method="post"> | ||
<br /><br /> | ||
<table border="0" cellspacing="10"> | ||
<tr> | ||
<td>Version:</td> | ||
<td>{$module_data.param01|escape}</td> | ||
</tr> | ||
<tr> | ||
<td>Control URL:</td> | ||
<td>{$http_location}/payment/cc_cgp_afterpay.php</td> | ||
</tr> | ||
<tr> | ||
<td>Mode</td> | ||
<td> | ||
<select name="param02"> | ||
<option value="Y"{if $module_data.param02 eq "Y"} selected="selected"{/if}>Test</option> | ||
<option value="N"{if $module_data.param02 eq "N"} selected="selected"{/if}>Live</option> | ||
</select> | ||
</td> | ||
</tr> | ||
<tr> | ||
<td>Site ID:</td> | ||
<td><input type="text" name="param03" size="24" value="{$module_data.param03|escape}" /></td> | ||
</tr> | ||
<tr> | ||
<td>Hash key:</td> | ||
<td><input type="text" name="param04" size="24" value="{$module_data.param04|escape}" /></td> | ||
</tr> | ||
<tr> | ||
<td>Currency:<BR>(X-Cart currently does not support multiple currencies)</td> | ||
<td><select name="param05"> | ||
<option value="USD"{if $module_data.param05 eq "USD"} selected="selected"{/if}>U.S. Dollars (USD)</option> | ||
<option value="EUR"{if $module_data.param05 eq "EUR"} selected="selected"{/if}>Euro (EUR)</option> | ||
<option value="GBP"{if $module_data.param05 eq "GBP"} selected="selected"{/if}>Pounds Sterling (GBP)</option> | ||
</select></td> | ||
</tr> | ||
<tr> | ||
<td>Country:</td> | ||
<td><select name="param06"> | ||
<option value="DETECT"{if $module_data.param06 eq "DETECT"} selected="selected"{/if}>User home address country</option> | ||
</select></td> | ||
</tr> | ||
<tr> | ||
<td>Language:</td> | ||
<td><select name="param09"> | ||
<option value="DETECT"{if $module_data.param09 eq "DETECT"} selected="selected"{/if}>User selected language</option> | ||
<option value="NL"{if $module_data.param09 eq "NL"} selected="selected"{/if}>Dutch</option> | ||
<option value="EN"{if $module_data.param09 eq "EN"} selected="selected"{/if}>English</option> | ||
<option value="DE"{if $module_data.param09 eq "DE"} selected="selected"{/if}>German</option> | ||
</select></td> | ||
</tr> | ||
<tr> | ||
|
||
<td>Log to file:<BR>logs directory requires writing privileges (CHMOD 777)</td> | ||
<td> | ||
|
||
<select name="param07"> | ||
<option value="Y"{if $module_data.param07 eq "Y"} selected="selected"{/if}>Yes</option> | ||
<option value="N"{if $module_data.param07 eq "N"} selected="selected"{/if}>No</option> | ||
</select> | ||
|
||
</td> | ||
</tr> | ||
|
||
<tr> | ||
<td>Order prefix:</td> | ||
<td>{$module_data.param08|escape}</td> | ||
</tr> | ||
|
||
</table> | ||
<p /> | ||
<input type="submit" value="{$lng.lbl_update}" /> | ||
</form> | ||
</center> | ||
{/capture} | ||
|
||
{include file="dialog.tpl" title=$lng.lbl_cc_settings content=$smarty.capture.dialog extra="width=100%"} |
Oops, something went wrong.