Version Notes
MerchantPlus NaviGate payment gateway for credit card processing
Download this release
Release Info
| Developer | Merchantplus |
| Extension | Merchantplus_Merchantplus |
| Version | 1.0.0 |
| Comparing to | |
| See all releases | |
Version 1.0.0
- app/code/community/Merchantplus/Merchantplus/Model/Adminhtml/System/Config/Source/Transmethod.php +11 -0
- app/code/community/Merchantplus/Merchantplus/Model/Merchantplus.php +229 -0
- app/code/community/Merchantplus/Merchantplus/Model/Observer.php +23 -0
- app/code/community/Merchantplus/Merchantplus/etc/config.xml +53 -0
- app/code/community/Merchantplus/Merchantplus/etc/system.xml +158 -0
- app/etc/modules/Merchantplus_Merchantplus.xml +22 -0
- package.xml +18 -0
app/code/community/Merchantplus/Merchantplus/Model/Adminhtml/System/Config/Source/Transmethod.php
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
class Merchantplus_Merchantplus_Model_Adminhtml_System_Config_Source_Transmethod{
|
| 3 |
+
public function toOptionArray(){
|
| 4 |
+
$options = array(
|
| 5 |
+
array('value' => 'AUTH_CAPTURE', 'label'=>'Capture'),
|
| 6 |
+
array('value' => 'AUTH_ONLY', 'label'=>'Authorization'),
|
| 7 |
+
);
|
| 8 |
+
return $options;
|
| 9 |
+
}
|
| 10 |
+
}
|
| 11 |
+
?>
|
app/code/community/Merchantplus/Merchantplus/Model/Merchantplus.php
ADDED
|
@@ -0,0 +1,229 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
/**
|
| 3 |
+
* NOTICE OF LICENSE
|
| 4 |
+
*
|
| 5 |
+
* @category Merchantplus
|
| 6 |
+
* @package Merchantplus_Merchantplus
|
| 7 |
+
* @author Merchantplus.
|
| 8 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
| 9 |
+
*/
|
| 10 |
+
class Merchantplus_Merchantplus_Model_Merchantplus extends Mage_Payment_Model_Method_Cc {
|
| 11 |
+
|
| 12 |
+
protected $_code = 'merchantplus'; //unique internal payment method identifier
|
| 13 |
+
|
| 14 |
+
protected $_isGateway = true;
|
| 15 |
+
protected $_canAuthorize = true;
|
| 16 |
+
protected $_canCapture = true;
|
| 17 |
+
protected $_canCapturePartial = false;
|
| 18 |
+
protected $_canRefund = false;
|
| 19 |
+
protected $_canRefundInvoicePartial = false;
|
| 20 |
+
protected $_canVoid = false;
|
| 21 |
+
protected $_canUseInternal = true;
|
| 22 |
+
protected $_canUseCheckout = true;
|
| 23 |
+
protected $_canUseForMultishipping = false;
|
| 24 |
+
protected $_isInitializeNeeded = false;
|
| 25 |
+
protected $_canFetchTransactionInfo = false;
|
| 26 |
+
protected $_canReviewPayment = false;
|
| 27 |
+
protected $_canCreateBillingAgreement = false;
|
| 28 |
+
protected $_canManageRecurringProfiles = false;
|
| 29 |
+
protected $_canSaveCc = false;
|
| 30 |
+
|
| 31 |
+
/**
|
| 32 |
+
* Fields that should be replaced in debug with '***'
|
| 33 |
+
*
|
| 34 |
+
* @var array
|
| 35 |
+
*/
|
| 36 |
+
protected $_debugReplacePrivateDataKeys = array('x_login', 'x_tran_key', 'x_card_num', 'x_exp_date', 'x_card_code');
|
| 37 |
+
|
| 38 |
+
/**
|
| 39 |
+
* Validate payment method information object
|
| 40 |
+
*/
|
| 41 |
+
public function validate() {
|
| 42 |
+
$info = $this->getInfoInstance();
|
| 43 |
+
$order_amount=0;
|
| 44 |
+
if ($info instanceof Mage_Sales_Model_Quote_Payment) {
|
| 45 |
+
$order_amount=(double)$info->getQuote()->getBaseGrandTotal();
|
| 46 |
+
} elseif ($info instanceof Mage_Sales_Model_Order_Payment) {
|
| 47 |
+
$order_amount=(double)$info->getOrder()->getQuoteBaseGrandTotal();
|
| 48 |
+
}
|
| 49 |
+
|
| 50 |
+
$order_min=$this->getConfigData('min_order_total');
|
| 51 |
+
$order_max=$this->getConfigData('max_order_total');
|
| 52 |
+
if(!empty($order_max) && (double)$order_max<$order_amount) {
|
| 53 |
+
Mage::throwException("Order amount greater than permissible Maximum order amount.");
|
| 54 |
+
}
|
| 55 |
+
if(!empty($order_min) && (double)$order_min>$order_amount) {
|
| 56 |
+
Mage::throwException("Order amount less than required Minimum order amount.");
|
| 57 |
+
}
|
| 58 |
+
/*
|
| 59 |
+
* calling parent validate function
|
| 60 |
+
*/
|
| 61 |
+
parent::validate();
|
| 62 |
+
}
|
| 63 |
+
|
| 64 |
+
/**
|
| 65 |
+
* Send capture request to gateway
|
| 66 |
+
*/
|
| 67 |
+
public function capture(Varien_Object $payment, $amount) {
|
| 68 |
+
if ($amount <= 0) {
|
| 69 |
+
Mage::throwException("Invalid amount for transaction.");
|
| 70 |
+
}
|
| 71 |
+
|
| 72 |
+
$shipping=array();
|
| 73 |
+
$billing=array();
|
| 74 |
+
|
| 75 |
+
$payment->setAmount($amount);
|
| 76 |
+
$data = $this->_prepareData();
|
| 77 |
+
$order = $payment->getOrder();
|
| 78 |
+
|
| 79 |
+
// AIM Head
|
| 80 |
+
$data['x_version'] = '3.1';
|
| 81 |
+
|
| 82 |
+
// TRUE Means that the Response is going to be delimited
|
| 83 |
+
$data['x_delim_data'] = 'TRUE';
|
| 84 |
+
$data['x_delim_char'] = '|';
|
| 85 |
+
$data['x_relay_response'] = 'FALSE';
|
| 86 |
+
|
| 87 |
+
// Transaction Info
|
| 88 |
+
$data['x_method'] = 'CC';
|
| 89 |
+
$data['x_amount'] = $payment->getAmount();
|
| 90 |
+
|
| 91 |
+
// Test Card
|
| 92 |
+
$month = ($payment->getCcExpMonth()<9?'0'.$payment->getCcExpMonth():$payment->getCcExpMonth());
|
| 93 |
+
$data['x_card_num'] = $payment->getCcNumber();
|
| 94 |
+
$data['x_exp_date'] = $month.substr($payment->getCcExpYear(),-2);
|
| 95 |
+
$data['x_card_code'] = $payment->getCcCid();
|
| 96 |
+
$data['x_trans_id'] = '';
|
| 97 |
+
|
| 98 |
+
// Order Info
|
| 99 |
+
$data['x_invoice_num'] = '';
|
| 100 |
+
$data['x_description'] = '';
|
| 101 |
+
|
| 102 |
+
if (!empty($order)) {
|
| 103 |
+
$BillingAddress = $order->getBillingAddress();
|
| 104 |
+
|
| 105 |
+
// Customer Info
|
| 106 |
+
$data['x_first_name'] = $BillingAddress->getFirstname();
|
| 107 |
+
$data['x_last_name'] = $BillingAddress->getLastname();
|
| 108 |
+
$data['x_company'] = $BillingAddress->getCompany();
|
| 109 |
+
$data['x_address'] = $BillingAddress->getStreet(1);
|
| 110 |
+
$data['x_city'] = $BillingAddress->getCity();
|
| 111 |
+
$data['x_state'] = $BillingAddress->getRegion();
|
| 112 |
+
$data['x_zip'] = $BillingAddress->getPostcode();
|
| 113 |
+
$data['x_country'] = $BillingAddress->getCountry();
|
| 114 |
+
$data['x_phone'] = $BillingAddress->getTelephone();
|
| 115 |
+
$data['x_fax'] = $BillingAddress->getFax();
|
| 116 |
+
$data['x_email'] = $order->getCustomerEmail();
|
| 117 |
+
$data['x_cust_id'] = '';
|
| 118 |
+
$data['x_customer_ip'] = '';
|
| 119 |
+
|
| 120 |
+
$ShippingAddress = $order->getShippingAddress();
|
| 121 |
+
if (empty($shipping)) {
|
| 122 |
+
$ShippingAddress = $BillingAddress;
|
| 123 |
+
}
|
| 124 |
+
|
| 125 |
+
// shipping info
|
| 126 |
+
$data['x_ship_to_first_name']= $ShippingAddress->getFirstname();
|
| 127 |
+
$data['x_ship_to_last_name'] = $ShippingAddress->getLastname();
|
| 128 |
+
$data['x_ship_to_company'] = $ShippingAddress->getCompany();
|
| 129 |
+
$data['x_ship_to_address'] = $ShippingAddress->getStreet(1);
|
| 130 |
+
$data['x_ship_to_city'] = $ShippingAddress->getCity();
|
| 131 |
+
$data['x_ship_to_state'] = $ShippingAddress->getRegion();
|
| 132 |
+
$data['x_ship_to_zip'] = $ShippingAddress->getPostcode();
|
| 133 |
+
$data['x_ship_to_country'] = $ShippingAddress->getCountry();
|
| 134 |
+
}
|
| 135 |
+
|
| 136 |
+
$result = $this->_postRequest($data);
|
| 137 |
+
if ($result['http_code']>=200 && $result['http_code']<300){
|
| 138 |
+
$data = $result['body'];
|
| 139 |
+
$delim = $data{1};
|
| 140 |
+
$data = explode($delim, $data);
|
| 141 |
+
|
| 142 |
+
if($data[0] == 1){
|
| 143 |
+
$payment->setStatus(self::STATUS_APPROVED);
|
| 144 |
+
$payment->setLastTransId((string)$data[6]);
|
| 145 |
+
if (!$payment->getParentTransactionId() || (string)$data[6] != $payment->getParentTransactionId()) {
|
| 146 |
+
$payment->setTransactionId((string)$data[6]);
|
| 147 |
+
}
|
| 148 |
+
return $this;
|
| 149 |
+
}else{
|
| 150 |
+
$error = $this->error_status();
|
| 151 |
+
$payment->setStatus(self::STATUS_ERROR);
|
| 152 |
+
Mage::throwException("Gateway error : {".(string)$error[$data[0]][$data[2]]."}");
|
| 153 |
+
}
|
| 154 |
+
}else{
|
| 155 |
+
Mage::throwException("No response found");
|
| 156 |
+
}
|
| 157 |
+
}
|
| 158 |
+
|
| 159 |
+
/**
|
| 160 |
+
* process using cURL
|
| 161 |
+
*/
|
| 162 |
+
protected function _postRequest($data) {
|
| 163 |
+
$debugData = array('request' => $data);
|
| 164 |
+
|
| 165 |
+
$url = 'https://gateway.merchantplus.com/cgi-bin/PAWebClient.cgi';
|
| 166 |
+
|
| 167 |
+
$request = curl_init($url);
|
| 168 |
+
curl_setopt($request, CURLOPT_HEADER, 0);
|
| 169 |
+
curl_setopt($request, CURLOPT_RETURNTRANSFER, 1);
|
| 170 |
+
curl_setopt($request, CURLOPT_POSTFIELDS, http_build_query($data, '', '&'));
|
| 171 |
+
curl_setopt($request, CURLOPT_SSL_VERIFYPEER, false);
|
| 172 |
+
curl_setopt($request, CURLOPT_SSL_VERIFYHOST, false);
|
| 173 |
+
$response = curl_exec($request);
|
| 174 |
+
$info = curl_getinfo($request);
|
| 175 |
+
curl_close($request);
|
| 176 |
+
|
| 177 |
+
$debugData['response'] = $response;
|
| 178 |
+
$this->_debug($debugData);
|
| 179 |
+
|
| 180 |
+
return array('http_code'=>$info['http_code'], 'body'=>$response);
|
| 181 |
+
}
|
| 182 |
+
|
| 183 |
+
protected function _prepareData() {
|
| 184 |
+
$data=array(
|
| 185 |
+
'x_login' => $this->getConfigData('login_id'),
|
| 186 |
+
'x_tran_key' => $this->getConfigData('trans_key'),
|
| 187 |
+
'x_type' => $this->getConfigData('method'),
|
| 188 |
+
'x_test_request' => ($this->getConfigData('test') == 1?'TRUE':'FALSE')
|
| 189 |
+
);
|
| 190 |
+
if(empty($data['x_login']) || empty($data['x_tran_key'])){
|
| 191 |
+
Mage::throwException("Gateway Parameters Missing. Contact administrator!");
|
| 192 |
+
}
|
| 193 |
+
return $data;
|
| 194 |
+
}
|
| 195 |
+
|
| 196 |
+
function _error_status() {
|
| 197 |
+
$error[2][2] = 'This transaction has been declined.';
|
| 198 |
+
$error[3][6] = 'The credit card number is invalid.';
|
| 199 |
+
$error[3][7] = 'The credit card expiration date is invalid.';
|
| 200 |
+
$error[3][8] = 'The credit card expiration date is invalid.';
|
| 201 |
+
$error[3][13] = 'The merchant Login ID or Password or TransactionKey is invalid or the account is inactive.';
|
| 202 |
+
$error[3][15] = 'The transaction ID is invalid.';
|
| 203 |
+
$error[3][16] = 'The transaction was not found';
|
| 204 |
+
$error[3][17] = 'The merchant does not accept this type of credit card.';
|
| 205 |
+
$error[3][19] = 'An error occurred during processing. Please try again in 5 minutes.';
|
| 206 |
+
$error[3][33] = 'A required field is missing.';
|
| 207 |
+
$error[3][42] = 'There is missing or invalid information in a parameter field.';
|
| 208 |
+
$error[3][47] = 'The amount requested for settlement may not be greater than the original amount authorized.';
|
| 209 |
+
$error[3][49] = 'A transaction amount equal or greater than $100000 will not be accepted.';
|
| 210 |
+
$error[3][50] = 'This transaction is awaiting settlement and cannot be refunded.';
|
| 211 |
+
$error[3][51] = 'The sum of all credits against this transaction is greater than the original transaction amount.';
|
| 212 |
+
$error[3][57] = 'A transaction amount less than $1 will not be accepted.';
|
| 213 |
+
$error[3][64] = 'The referenced transaction was not approved.';
|
| 214 |
+
$error[3][69] = 'The transaction type is invalid.';
|
| 215 |
+
$error[3][70] = 'The transaction method is invalid.';
|
| 216 |
+
$error[3][72] = 'The authorization code is invalid.';
|
| 217 |
+
$error[3][73] = 'The driver\'s license date of birth is invalid.';
|
| 218 |
+
$error[3][84] = 'The referenced transaction was already voided.';
|
| 219 |
+
$error[3][85] = 'The referenced transaction has already been settled and cannot be voided.';
|
| 220 |
+
$error[3][86] = 'Your settlements will occur in less than 5 minutes. It is too late to void any existing transactions.';
|
| 221 |
+
$error[3][87] = 'The transaction submitted for settlement was not originally an AUTH_ONLY.';
|
| 222 |
+
$error[3][88] = 'Your account does not have access to perform that action.';
|
| 223 |
+
$error[3][89] = 'The referenced transaction was already refunded.';
|
| 224 |
+
$error[3][90] = 'Data Base Error.';
|
| 225 |
+
|
| 226 |
+
return $error;
|
| 227 |
+
}
|
| 228 |
+
}
|
| 229 |
+
?>
|
app/code/community/Merchantplus/Merchantplus/Model/Observer.php
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
/**
|
| 3 |
+
* NOTICE OF LICENSE
|
| 4 |
+
*
|
| 5 |
+
* @category Merchantplus
|
| 6 |
+
* @package Merchantplus_Merchantplus
|
| 7 |
+
* @author Merchantplus.
|
| 8 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
| 9 |
+
*/
|
| 10 |
+
class Merchantplus_Merchantplus_Model_Observer {
|
| 11 |
+
public function disableMethod(Varien_Event_Observer $observer){
|
| 12 |
+
$moduleName="Merchantplus_Merchantplus";
|
| 13 |
+
if('merchantplus'==$observer->getMethodInstance()->getCode()){
|
| 14 |
+
if(!Mage::getStoreConfigFlag('advanced/modules_disable_output/'.$moduleName)) {
|
| 15 |
+
//nothing here, as module is ENABLE
|
| 16 |
+
} else {
|
| 17 |
+
$observer->getResult()->isAvailable=false;
|
| 18 |
+
}
|
| 19 |
+
|
| 20 |
+
}
|
| 21 |
+
}
|
| 22 |
+
}
|
| 23 |
+
?>
|
app/code/community/Merchantplus/Merchantplus/etc/config.xml
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?xml version="1.0"?>
|
| 2 |
+
<!--
|
| 3 |
+
/**
|
| 4 |
+
* NOTICE OF LICENSE
|
| 5 |
+
*
|
| 6 |
+
* @category Merchantplus
|
| 7 |
+
* @package Merchantplus_Merchantplus
|
| 8 |
+
* @author Merchantplus.
|
| 9 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
| 10 |
+
*/
|
| 11 |
+
-->
|
| 12 |
+
<config>
|
| 13 |
+
<modules>
|
| 14 |
+
<Merchantplus_Merchantplus>
|
| 15 |
+
<version>1.0.0</version>
|
| 16 |
+
</Merchantplus_Merchantplus>
|
| 17 |
+
</modules>
|
| 18 |
+
<frontend>
|
| 19 |
+
<events>
|
| 20 |
+
<payment_method_is_active>
|
| 21 |
+
<observers>
|
| 22 |
+
<merchantplus>
|
| 23 |
+
<type>singleton</type>
|
| 24 |
+
<class>Merchantplus_Merchantplus_Model_Observer</class>
|
| 25 |
+
<method>disableMethod</method>
|
| 26 |
+
</merchantplus>
|
| 27 |
+
</observers>
|
| 28 |
+
</payment_method_is_active>
|
| 29 |
+
</events>
|
| 30 |
+
</frontend>
|
| 31 |
+
<global>
|
| 32 |
+
<models>
|
| 33 |
+
<merchantplus>
|
| 34 |
+
<class>Merchantplus_Merchantplus_Model</class>
|
| 35 |
+
</merchantplus>
|
| 36 |
+
</models>
|
| 37 |
+
</global>
|
| 38 |
+
<default>
|
| 39 |
+
<payment>
|
| 40 |
+
<merchantplus>
|
| 41 |
+
<active>0</active>
|
| 42 |
+
<title>Credit Card (Merchant Plus)</title>
|
| 43 |
+
<order_status>pending</order_status>
|
| 44 |
+
<cctypes>AE,VI,MC</cctypes>
|
| 45 |
+
<useccv>1</useccv>
|
| 46 |
+
<allowspecific>0</allowspecific>
|
| 47 |
+
<test>1</test>
|
| 48 |
+
<payment_action>authorize_capture</payment_action>
|
| 49 |
+
<model>merchantplus/merchantplus</model>
|
| 50 |
+
</merchantplus>
|
| 51 |
+
</payment>
|
| 52 |
+
</default>
|
| 53 |
+
</config>
|
app/code/community/Merchantplus/Merchantplus/etc/system.xml
ADDED
|
@@ -0,0 +1,158 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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plus_Merchantplus
|
| 8 |
+
* @author Merchantplus.
|
| 9 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
| 10 |
+
*/
|
| 11 |
+
-->
|
| 12 |
+
<config>
|
| 13 |
+
<sections>
|
| 14 |
+
<payment>
|
| 15 |
+
<groups>
|
| 16 |
+
<merchantplus translate="label">
|
| 17 |
+
<label>Merchant Plus Gateway</label>
|
| 18 |
+
<frontend_type>text</frontend_type>
|
| 19 |
+
<show_in_default>1</show_in_default>
|
| 20 |
+
<show_in_website>1</show_in_website>
|
| 21 |
+
<show_in_store>1</show_in_store>
|
| 22 |
+
<fields>
|
| 23 |
+
|
| 24 |
+
<heading_account translate="label">
|
| 25 |
+
<label>Merchant Plus Settings</label>
|
| 26 |
+
<frontend_model>adminhtml/system_config_form_field_heading</frontend_model>
|
| 27 |
+
<sort_order>1</sort_order>
|
| 28 |
+
<show_in_default>1</show_in_default>
|
| 29 |
+
<show_in_website>1</show_in_website>
|
| 30 |
+
</heading_account>
|
| 31 |
+
<login_id translate="label">
|
| 32 |
+
<label>Login ID</label>
|
| 33 |
+
<frontend_type>text</frontend_type>
|
| 34 |
+
<sort_order>2</sort_order>
|
| 35 |
+
<show_in_default>1</show_in_default>
|
| 36 |
+
<show_in_website>1</show_in_website>
|
| 37 |
+
<show_in_store>0</show_in_store>
|
| 38 |
+
</login_id>
|
| 39 |
+
<trans_key translate="label">
|
| 40 |
+
<label>Transaction Key</label>
|
| 41 |
+
<frontend_type>text</frontend_type>
|
| 42 |
+
<sort_order>3</sort_order>
|
| 43 |
+
<show_in_default>1</show_in_default>
|
| 44 |
+
<show_in_website>1</show_in_website>
|
| 45 |
+
<show_in_store>0</show_in_store>
|
| 46 |
+
</trans_key>
|
| 47 |
+
<method translate="label">
|
| 48 |
+
<label>Transaction Method</label>
|
| 49 |
+
<frontend_type>select</frontend_type>
|
| 50 |
+
<source_model>merchantplus/adminhtml_system_config_source_transmethod</source_model>
|
| 51 |
+
<sort_order>4</sort_order>
|
| 52 |
+
<show_in_default>1</show_in_default>
|
| 53 |
+
<show_in_website>1</show_in_website>
|
| 54 |
+
<show_in_store>0</show_in_store>
|
| 55 |
+
</method>
|
| 56 |
+
<test translate="label">
|
| 57 |
+
<label>Test Mode</label>
|
| 58 |
+
<frontend_type>select</frontend_type>
|
| 59 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
| 60 |
+
<sort_order>5</sort_order>
|
| 61 |
+
<show_in_default>1</show_in_default>
|
| 62 |
+
<show_in_website>1</show_in_website>
|
| 63 |
+
<show_in_store>0</show_in_store>
|
| 64 |
+
</test>
|
| 65 |
+
|
| 66 |
+
|
| 67 |
+
<heading_setting translate="label">
|
| 68 |
+
<label>Other Settings</label>
|
| 69 |
+
<frontend_model>adminhtml/system_config_form_field_heading</frontend_model>
|
| 70 |
+
<sort_order>10</sort_order>
|
| 71 |
+
<show_in_default>1</show_in_default>
|
| 72 |
+
<show_in_website>1</show_in_website>
|
| 73 |
+
</heading_setting>
|
| 74 |
+
<active translate="label">
|
| 75 |
+
<label>Enabled</label>
|
| 76 |
+
<frontend_type>select</frontend_type>
|
| 77 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
| 78 |
+
<sort_order>11</sort_order>
|
| 79 |
+
<show_in_default>1</show_in_default>
|
| 80 |
+
<show_in_website>1</show_in_website>
|
| 81 |
+
<show_in_store>0</show_in_store>
|
| 82 |
+
</active>
|
| 83 |
+
<title translate="label">
|
| 84 |
+
<label>Title</label>
|
| 85 |
+
<frontend_type>text</frontend_type>
|
| 86 |
+
<sort_order>12</sort_order>
|
| 87 |
+
<show_in_default>1</show_in_default>
|
| 88 |
+
<show_in_website>1</show_in_website>
|
| 89 |
+
<show_in_store>1</show_in_store>
|
| 90 |
+
</title>
|
| 91 |
+
<order_status translate="label">
|
| 92 |
+
<label>New Order Status</label>
|
| 93 |
+
<frontend_type>select</frontend_type>
|
| 94 |
+
<source_model>adminhtml/system_config_source_order_status_newprocessing</source_model>
|
| 95 |
+
<sort_order>13</sort_order>
|
| 96 |
+
<show_in_default>1</show_in_default>
|
| 97 |
+
<show_in_website>1</show_in_website>
|
| 98 |
+
<show_in_store>0</show_in_store>
|
| 99 |
+
</order_status>
|
| 100 |
+
<cctypes translate="label">
|
| 101 |
+
<label>Credit Card Types</label>
|
| 102 |
+
<frontend_type>multiselect</frontend_type>
|
| 103 |
+
<source_model>adminhtml/system_config_source_payment_cctype</source_model>
|
| 104 |
+
<sort_order>14</sort_order>
|
| 105 |
+
<show_in_default>1</show_in_default>
|
| 106 |
+
<show_in_website>1</show_in_website>
|
| 107 |
+
<show_in_store>0</show_in_store>
|
| 108 |
+
<can_be_empty>1</can_be_empty>
|
| 109 |
+
</cctypes>
|
| 110 |
+
<allowspecific translate="label">
|
| 111 |
+
<label>Payment from Applicable Countries</label>
|
| 112 |
+
<frontend_type>allowspecific</frontend_type>
|
| 113 |
+
<sort_order>16</sort_order>
|
| 114 |
+
<source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model>
|
| 115 |
+
<show_in_default>1</show_in_default>
|
| 116 |
+
<show_in_website>1</show_in_website>
|
| 117 |
+
<show_in_store>0</show_in_store>
|
| 118 |
+
</allowspecific>
|
| 119 |
+
<specificcountry translate="label">
|
| 120 |
+
<label>Payment from Specific Countries</label>
|
| 121 |
+
<frontend_type>multiselect</frontend_type>
|
| 122 |
+
<sort_order>17</sort_order>
|
| 123 |
+
<source_model>adminhtml/system_config_source_country</source_model>
|
| 124 |
+
<show_in_default>1</show_in_default>
|
| 125 |
+
<show_in_website>1</show_in_website>
|
| 126 |
+
<show_in_store>0</show_in_store>
|
| 127 |
+
<can_be_empty>1</can_be_empty>
|
| 128 |
+
</specificcountry>
|
| 129 |
+
<min_order_total translate="label">
|
| 130 |
+
<label>Minimum Order Total</label>
|
| 131 |
+
<frontend_type>text</frontend_type>
|
| 132 |
+
<sort_order>18</sort_order>
|
| 133 |
+
<show_in_default>1</show_in_default>
|
| 134 |
+
<show_in_website>1</show_in_website>
|
| 135 |
+
<show_in_store>0</show_in_store>
|
| 136 |
+
</min_order_total>
|
| 137 |
+
<max_order_total translate="label">
|
| 138 |
+
<label>Maximum Order Total</label>
|
| 139 |
+
<frontend_type>text</frontend_type>
|
| 140 |
+
<sort_order>19</sort_order>
|
| 141 |
+
<show_in_default>1</show_in_default>
|
| 142 |
+
<show_in_website>1</show_in_website>
|
| 143 |
+
<show_in_store>0</show_in_store>
|
| 144 |
+
</max_order_total>
|
| 145 |
+
<sort_order translate="label">
|
| 146 |
+
<label>Sort Order</label>
|
| 147 |
+
<frontend_type>text</frontend_type>
|
| 148 |
+
<sort_order>20</sort_order>
|
| 149 |
+
<show_in_default>1</show_in_default>
|
| 150 |
+
<show_in_website>1</show_in_website>
|
| 151 |
+
<show_in_store>0</show_in_store>
|
| 152 |
+
</sort_order>
|
| 153 |
+
</fields>
|
| 154 |
+
</merchantplus>
|
| 155 |
+
</groups>
|
| 156 |
+
</payment>
|
| 157 |
+
</sections>
|
| 158 |
+
</config>
|
app/etc/modules/Merchantplus_Merchantplus.xml
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?xml version="1.0"?>
|
| 2 |
+
<!--
|
| 3 |
+
/**
|
| 4 |
+
* NOTICE OF LICENSE
|
| 5 |
+
*
|
| 6 |
+
* @category Merchantplus
|
| 7 |
+
* @package Merchantplus_Merchantplus
|
| 8 |
+
* @author Merchantplus.
|
| 9 |
+
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
|
| 10 |
+
*/
|
| 11 |
+
-->
|
| 12 |
+
<config>
|
| 13 |
+
<modules>
|
| 14 |
+
<Merchantplus_Merchantplus>
|
| 15 |
+
<active>true</active>
|
| 16 |
+
<codePool>community</codePool>
|
| 17 |
+
<depends>
|
| 18 |
+
<Mage_Payment />
|
| 19 |
+
</depends>
|
| 20 |
+
</Merchantplus_Merchantplus>
|
| 21 |
+
</modules>
|
| 22 |
+
</config>
|
package.xml
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?xml version="1.0"?>
|
| 2 |
+
<package>
|
| 3 |
+
<name>Merchantplus_Merchantplus</name>
|
| 4 |
+
<version>1.0.0</version>
|
| 5 |
+
<stability>stable</stability>
|
| 6 |
+
<license>GNU General Public License (GPL)</license>
|
| 7 |
+
<channel>community</channel>
|
| 8 |
+
<extends/>
|
| 9 |
+
<summary>MerchantPlus NaviGate payment gateway for credit card processing.</summary>
|
| 10 |
+
<description>MerchantPlus NaviGate payment gateway for credit card processing.</description>
|
| 11 |
+
<notes>MerchantPlus NaviGate payment gateway for credit card processing</notes>
|
| 12 |
+
<authors><author><name>Merchantplus</name><user>Merchantplus</user><email>support@merchantplus.com</email></author></authors>
|
| 13 |
+
<date>2014-06-30</date>
|
| 14 |
+
<time>03:17:16</time>
|
| 15 |
+
<contents></contents>
|
| 16 |
+
<compatible/>
|
| 17 |
+
<dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
|
| 18 |
+
</package>
|
