Version Notes
Added REFUND function in Magento Admin Panel.
Download this release
Release Info
| Developer | KRPartners Co.,Ltd |
| Extension | Eximbay |
| Version | 2.0.6 |
| Comparing to | |
| See all releases | |
Code changes from version 2.0.5 to 2.0.6
- app/code/community/Krp/Eximbay/Block/Checkout/Onepage/Payment/Methods.php +4 -0
- app/code/community/Krp/Eximbay/Model/Abstract.php +172 -2
- app/code/community/Krp/Eximbay/Model/All.php +29 -0
- app/code/community/Krp/Eximbay/Model/Event.php +17 -6
- app/code/community/Krp/Eximbay/Model/Version.php +2 -2
- app/code/community/Krp/Eximbay/etc/config.xml +8 -0
- app/code/community/Krp/Eximbay/etc/system.xml +115 -0
- app/design/frontend/base/default/template/eximbay/payment.phtml +1 -1
- app/design/frontend/base/default/template/eximbay/placeform.phtml +0 -8
- package.xml +5 -5
- skin/frontend/base/default/images/eximbay/eximbay_all.png +0 -0
app/code/community/Krp/Eximbay/Block/Checkout/Onepage/Payment/Methods.php
CHANGED
|
@@ -34,6 +34,10 @@ class Krp_Eximbay_Block_Checkout_Onepage_Payment_Methods extends Mage_Checkout_B
|
|
| 34 |
if (file_exists($imageFilename . '.jpg')) {
|
| 35 |
$imageLogo = '<img src="' . $this->getSkinUrl('images/eximbay/' . $method->getCode() . '.jpg') . '" > ';
|
| 36 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 37 |
return $imageLogo.str_repeat(' ', 3).$this->escapeHtml($method->getTitle());
|
| 38 |
}
|
| 39 |
} else {
|
| 34 |
if (file_exists($imageFilename . '.jpg')) {
|
| 35 |
$imageLogo = '<img src="' . $this->getSkinUrl('images/eximbay/' . $method->getCode() . '.jpg') . '" > ';
|
| 36 |
|
| 37 |
+
return $imageLogo.str_repeat(' ', 3).$this->escapeHtml($method->getTitle());
|
| 38 |
+
}else if (file_exists($imageFilename . '.png')) {
|
| 39 |
+
$imageLogo = '<img src="' . $this->getSkinUrl('images/eximbay/' . $method->getCode() . '.png') . '" > ';
|
| 40 |
+
|
| 41 |
return $imageLogo.str_repeat(' ', 3).$this->escapeHtml($method->getTitle());
|
| 42 |
}
|
| 43 |
} else {
|
app/code/community/Krp/Eximbay/Model/Abstract.php
CHANGED
|
@@ -36,7 +36,8 @@ abstract class Krp_Eximbay_Model_Abstract extends Mage_Payment_Model_Method_Abst
|
|
| 36 |
protected $_canAuthorize = true;
|
| 37 |
protected $_canCapture = true;
|
| 38 |
protected $_canCapturePartial = false;
|
| 39 |
-
protected $_canRefund =
|
|
|
|
| 40 |
protected $_canVoid = false;
|
| 41 |
protected $_canUseInternal = false;
|
| 42 |
protected $_canUseCheckout = true;
|
|
@@ -82,7 +83,7 @@ abstract class Krp_Eximbay_Model_Abstract extends Mage_Payment_Model_Method_Abst
|
|
| 82 |
public function capture(Varien_Object $payment, $amount)
|
| 83 |
{
|
| 84 |
$payment->setStatus(self::STATUS_APPROVED)
|
| 85 |
-
->setTransactionId($
|
| 86 |
->setIsTransactionClosed(0);
|
| 87 |
|
| 88 |
return $this;
|
|
@@ -103,6 +104,161 @@ abstract class Krp_Eximbay_Model_Abstract extends Mage_Payment_Model_Method_Abst
|
|
| 103 |
return $this;
|
| 104 |
}
|
| 105 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 106 |
/**
|
| 107 |
* Detect Mobile Device
|
| 108 |
*
|
|
@@ -176,6 +332,20 @@ abstract class Krp_Eximbay_Model_Abstract extends Mage_Payment_Model_Method_Abst
|
|
| 176 |
}
|
| 177 |
}
|
| 178 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 179 |
|
| 180 |
/**
|
| 181 |
* Return locale of the payment method
|
| 36 |
protected $_canAuthorize = true;
|
| 37 |
protected $_canCapture = true;
|
| 38 |
protected $_canCapturePartial = false;
|
| 39 |
+
protected $_canRefund = true;
|
| 40 |
+
protected $_canRefundInvoicePartial = true;
|
| 41 |
protected $_canVoid = false;
|
| 42 |
protected $_canUseInternal = false;
|
| 43 |
protected $_canUseCheckout = true;
|
| 83 |
public function capture(Varien_Object $payment, $amount)
|
| 84 |
{
|
| 85 |
$payment->setStatus(self::STATUS_APPROVED)
|
| 86 |
+
->setTransactionId($payment->getLastTransId())
|
| 87 |
->setIsTransactionClosed(0);
|
| 88 |
|
| 89 |
return $this;
|
| 104 |
return $this;
|
| 105 |
}
|
| 106 |
|
| 107 |
+
|
| 108 |
+
/**
|
| 109 |
+
* Refund a capture transaction
|
| 110 |
+
*
|
| 111 |
+
* @param Varien_Object $payment
|
| 112 |
+
* @param float $amount
|
| 113 |
+
*/
|
| 114 |
+
public function refund(Varien_Object $payment, $amount)
|
| 115 |
+
{
|
| 116 |
+
Mage::log("Amount : ".$amount, null, 'eximbay'.Mage::getModel('core/date')->date('Y-m-d').'.log');
|
| 117 |
+
if ($amount <= 0) {
|
| 118 |
+
Mage::throwException(Mage::helper('eximbay')->__('Invalid amount for refund.'));
|
| 119 |
+
}
|
| 120 |
+
|
| 121 |
+
Mage::log("TransID : ".$this->_getParentTransactionId($payment), null, 'eximbay'.Mage::getModel('core/date')->date('Y-m-d').'.log');
|
| 122 |
+
if (!$this->_getParentTransactionId($payment)) {
|
| 123 |
+
Mage::throwException(Mage::helper('eximbay')->__('Invalid transaction ID.'));
|
| 124 |
+
}
|
| 125 |
+
|
| 126 |
+
$order = $payment->getOrder();
|
| 127 |
+
|
| 128 |
+
$canRefundMore = $payment->getCreditmemo()->getInvoice()->canRefund();
|
| 129 |
+
$isFullRefund = !$canRefundMore && (0 == ((float)$order->getBaseTotalOnlineRefunded() + (float)$order->getBaseTotalOfflineRefunded()));
|
| 130 |
+
$payment->setRefundType($isFullRefund ? 'F' : 'P');
|
| 131 |
+
$payment->setRefundAmt($amount,2);
|
| 132 |
+
$payment->setEximbayTransId($this->_getParentTransactionId($payment));
|
| 133 |
+
|
| 134 |
+
$request = $this->_buildRequest($payment);
|
| 135 |
+
$result = $this->_postRequest($request);
|
| 136 |
+
|
| 137 |
+
if ($result['rescode'] == '0000') {
|
| 138 |
+
$shouldCloseCaptureTransaction = $payment->getOrder()->canCreditmemo() ? 0 : 1;
|
| 139 |
+
$payment
|
| 140 |
+
->setParentTransactionId($this->_getParentTransactionId($payment))
|
| 141 |
+
->setTransactionId($result['refundtransid'])
|
| 142 |
+
->setIsTransactionClosed(1)
|
| 143 |
+
->setShouldCloseParentTransaction($shouldCloseCaptureTransaction);
|
| 144 |
+
//->setTransactionAdditionalInfo("eximbayRefundTransId", $result['refundtransid']);
|
| 145 |
+
|
| 146 |
+
return $this;
|
| 147 |
+
}else{
|
| 148 |
+
Mage::throwException(Mage::helper('eximbay')->__($result['resmsg']));
|
| 149 |
+
}
|
| 150 |
+
}
|
| 151 |
+
|
| 152 |
+
/**
|
| 153 |
+
* Parent transaction id getter
|
| 154 |
+
*
|
| 155 |
+
* @param Varien_Object $payment
|
| 156 |
+
* @return string
|
| 157 |
+
*/
|
| 158 |
+
protected function _getParentTransactionId(Varien_Object $payment)
|
| 159 |
+
{
|
| 160 |
+
return $payment->getParentTransactionId() ? $payment->getParentTransactionId() : $payment->getLastTransId();
|
| 161 |
+
}
|
| 162 |
+
|
| 163 |
+
/**
|
| 164 |
+
* Prepare request to gateway
|
| 165 |
+
*
|
| 166 |
+
* @param Mage_Payment_Model_Info $payment
|
| 167 |
+
* @return Krp_Eximbay_Model_Request
|
| 168 |
+
*/
|
| 169 |
+
protected function _buildRequest(Varien_Object $payment)
|
| 170 |
+
{
|
| 171 |
+
$order = $payment->getOrder();
|
| 172 |
+
|
| 173 |
+
$order_id = $order->getRealOrderId();
|
| 174 |
+
$secretKey = Mage::getStoreConfig('payment/'.$this->getPaymentMethodCode().'/secret_key');
|
| 175 |
+
$mid = Mage::getStoreConfig('payment/'.$this->getPaymentMethodCode().'/mid');
|
| 176 |
+
$ref = $order_id;
|
| 177 |
+
$cur = $order->getBaseCurrencyCode();
|
| 178 |
+
$amt = round($this->getOrder()->getGrandTotal(), 2);
|
| 179 |
+
if($cur == 'KRW' || $cur == 'JPY' || $cur == 'VND')
|
| 180 |
+
{
|
| 181 |
+
$amt = round($this->getOrder()->getGrandTotal(), 0, PHP_ROUND_HALF_UP);
|
| 182 |
+
}
|
| 183 |
+
|
| 184 |
+
$linkBuf = $secretKey. "?mid=" . $mid ."&ref=" . $ref ."&cur=" .$cur ."&amt=" .$amt;
|
| 185 |
+
|
| 186 |
+
//$fgkey = md5($linkBuf);
|
| 187 |
+
$fgkey = hash("sha256", $linkBuf);
|
| 188 |
+
|
| 189 |
+
$txntype = 'REFUND';
|
| 190 |
+
|
| 191 |
+
$params = array(
|
| 192 |
+
'ver' => $this->getAPIVersion(),
|
| 193 |
+
'mid' => $mid,
|
| 194 |
+
'txntype' => $txntype,
|
| 195 |
+
'refundtype' => $payment->getRefundType(),
|
| 196 |
+
'charset' => 'UTF-8',
|
| 197 |
+
'ref' => $ref,
|
| 198 |
+
'fgkey' => $fgkey,
|
| 199 |
+
'lang' => $this->getLocale(),
|
| 200 |
+
'amt' => $amt,
|
| 201 |
+
'cur' => $cur,
|
| 202 |
+
'refundamt' => $payment->getRefundAmt(),
|
| 203 |
+
'transid' => $payment->getEximbayTransId(),
|
| 204 |
+
'reason' => 'Merchant Request'
|
| 205 |
+
);
|
| 206 |
+
|
| 207 |
+
Mage::log($params, null, 'eximbay'.Mage::getModel('core/date')->date('Y-m-d').'.log');
|
| 208 |
+
|
| 209 |
+
return $params;
|
| 210 |
+
}
|
| 211 |
+
|
| 212 |
+
/**
|
| 213 |
+
* Post request to gateway and return responce
|
| 214 |
+
*
|
| 215 |
+
* @param Krp_Eximbay_Model_Request $request)
|
| 216 |
+
* @return Krp_Eximbay_Model_Result
|
| 217 |
+
*/
|
| 218 |
+
protected function _postRequest(array $request)
|
| 219 |
+
{
|
| 220 |
+
$client = new Varien_Http_Client();
|
| 221 |
+
$client->setUri($this->getRefundUrl());
|
| 222 |
+
|
| 223 |
+
Mage::log("RequestURL : ".$this->getRefundUrl(), null, 'eximbay'.Mage::getModel('core/date')->date('Y-m-d').'.log');
|
| 224 |
+
|
| 225 |
+
$client->setConfig(array(
|
| 226 |
+
'maxredirects'=>0,
|
| 227 |
+
'timeout'=>30,
|
| 228 |
+
//'ssltransport' => 'tcp',
|
| 229 |
+
));
|
| 230 |
+
|
| 231 |
+
$client->setParameterPost($request);
|
| 232 |
+
$client->setMethod(Zend_Http_Client::POST);
|
| 233 |
+
|
| 234 |
+
$result = array();
|
| 235 |
+
try {
|
| 236 |
+
$response = $client->request();
|
| 237 |
+
} catch (Exception $e) {
|
| 238 |
+
$result['rescode'] = $e->getCode();
|
| 239 |
+
$result['resmsg'] = $e->getMessage();
|
| 240 |
+
|
| 241 |
+
Mage::throwException(Mage::helper('eximbay')->__('Gateway error: %s', ($e->getMessage())));
|
| 242 |
+
}
|
| 243 |
+
|
| 244 |
+
$responseBody = trim($response->getBody());
|
| 245 |
+
Mage::log("Raw Response Data : ".$responseBody, null, 'eximbay'.Mage::getModel('core/date')->date('Y-m-d').'.log');
|
| 246 |
+
|
| 247 |
+
Mage::log("------------- Mapped Response -------------", null, 'eximbay'.Mage::getModel('core/date')->date('Y-m-d').'.log');
|
| 248 |
+
parse_str($responseBody, $data);
|
| 249 |
+
foreach ($data as $key => $value) {
|
| 250 |
+
$result[$key] = $value;
|
| 251 |
+
Mage::log($key." : ".$result[$key], null, 'eximbay'.Mage::getModel('core/date')->date('Y-m-d').'.log');
|
| 252 |
+
}
|
| 253 |
+
|
| 254 |
+
if (empty($result['rescode'])) {
|
| 255 |
+
Mage::throwException(Mage::helper('eximbay')->__('Error in payment gateway.'));
|
| 256 |
+
}
|
| 257 |
+
|
| 258 |
+
return $result;
|
| 259 |
+
}
|
| 260 |
+
|
| 261 |
+
|
| 262 |
/**
|
| 263 |
* Detect Mobile Device
|
| 264 |
*
|
| 332 |
}
|
| 333 |
}
|
| 334 |
}
|
| 335 |
+
|
| 336 |
+
/**
|
| 337 |
+
* Return url of refund method
|
| 338 |
+
*
|
| 339 |
+
* @return string
|
| 340 |
+
*/
|
| 341 |
+
public function getRefundUrl()
|
| 342 |
+
{
|
| 343 |
+
if($this->isTestMode()){
|
| 344 |
+
return 'https://secureapi.test.eximbay.com/Gateway/DirectProcessor.krp';
|
| 345 |
+
}else{
|
| 346 |
+
return 'https://secureapi.eximbay.com/Gateway/DirectProcessor.krp';
|
| 347 |
+
}
|
| 348 |
+
}
|
| 349 |
|
| 350 |
/**
|
| 351 |
* Return locale of the payment method
|
app/code/community/Krp/Eximbay/Model/All.php
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<?php
|
| 2 |
+
/**
|
| 3 |
+
* Eximbay, Online Payment Module
|
| 4 |
+
*
|
| 5 |
+
* NOTICE OF LICENSE
|
| 6 |
+
*
|
| 7 |
+
* This source file is subject to the GNU General Public License (GPL 3.0)
|
| 8 |
+
* that is available through the world-wide-web at this URL:
|
| 9 |
+
* http://opensource.org/licenses/GPL-3.0 or http://www.gnu.org/copyleft/gpl.html
|
| 10 |
+
*
|
| 11 |
+
* DISCLAIMER
|
| 12 |
+
*
|
| 13 |
+
* Do not edit or add to this file if you wish to upgrade Eximbay module to newer
|
| 14 |
+
* versions in the future. If you wish to customize Eximbay module for your
|
| 15 |
+
* needs please refer to https://www.eximbay.com for more information.
|
| 16 |
+
*
|
| 17 |
+
* @category Krp
|
| 18 |
+
* @package Krp_Eximbay
|
| 19 |
+
* @copyright Copyright (c) 2014 KRPartners Co.,Ltd (https://www.eximbay.com)
|
| 20 |
+
* @license http://opensource.org/licenses/GPL-3.0 GNU General Public License (GPL 3.0)
|
| 21 |
+
*/
|
| 22 |
+
class Krp_Eximbay_Model_All extends Krp_Eximbay_Model_Abstract
|
| 23 |
+
{
|
| 24 |
+
/**
|
| 25 |
+
* unique internal payment method identifier
|
| 26 |
+
*/
|
| 27 |
+
protected $_code = 'eximbay_all';
|
| 28 |
+
protected $_paymentMethod = '';
|
| 29 |
+
}
|
app/code/community/Krp/Eximbay/Model/Event.php
CHANGED
|
@@ -146,14 +146,16 @@ class Krp_Eximbay_Model_Event
|
|
| 146 |
*/
|
| 147 |
protected function _processSale($msg)
|
| 148 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 149 |
$this->_createInvoice();
|
| 150 |
$this->_order->setState(Mage_Sales_Model_Order::STATE_PROCESSING, true, $msg);
|
| 151 |
-
|
| 152 |
-
$transid = $this->getEventData('transid');
|
| 153 |
-
if (empty($transid)){
|
| 154 |
-
$transid = $this->getEventData('requestid');
|
| 155 |
-
}
|
| 156 |
-
$this->_order->getPayment()->setLastTransId($transid);
|
| 157 |
// send new order email
|
| 158 |
$this->_order->sendNewOrderEmail();
|
| 159 |
$this->_order->setEmailSent(true);
|
|
@@ -189,6 +191,15 @@ class Krp_Eximbay_Model_Event
|
|
| 189 |
$invoice->register();
|
| 190 |
$transactionSave = Mage::getModel('core/resource_transaction')->addObject($invoice)->addObject($invoice->getOrder());
|
| 191 |
$transactionSave->save();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 192 |
} catch (Mage_Core_Exception $e) {
|
| 193 |
return $e->getMessage();
|
| 194 |
} catch(Exception $e) {
|
| 146 |
*/
|
| 147 |
protected function _processSale($msg)
|
| 148 |
{
|
| 149 |
+
// save transaction ID
|
| 150 |
+
$transid = $this->getEventData('transid');
|
| 151 |
+
if (empty($transid)){
|
| 152 |
+
$transid = $this->getEventData('requestid');
|
| 153 |
+
}
|
| 154 |
+
$this->_order->getPayment()->setLastTransId($transid);
|
| 155 |
+
|
| 156 |
$this->_createInvoice();
|
| 157 |
$this->_order->setState(Mage_Sales_Model_Order::STATE_PROCESSING, true, $msg);
|
| 158 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 159 |
// send new order email
|
| 160 |
$this->_order->sendNewOrderEmail();
|
| 161 |
$this->_order->setEmailSent(true);
|
| 191 |
$invoice->register();
|
| 192 |
$transactionSave = Mage::getModel('core/resource_transaction')->addObject($invoice)->addObject($invoice->getOrder());
|
| 193 |
$transactionSave->save();
|
| 194 |
+
|
| 195 |
+
|
| 196 |
+
/*if (!$this->_order->canInvoice()) {
|
| 197 |
+
return;
|
| 198 |
+
}
|
| 199 |
+
$invoice = $this->_order->prepareInvoice();
|
| 200 |
+
$invoice->register()->capture();
|
| 201 |
+
$this->_order->addRelatedObject($invoice);*/
|
| 202 |
+
|
| 203 |
} catch (Mage_Core_Exception $e) {
|
| 204 |
return $e->getMessage();
|
| 205 |
} catch(Exception $e) {
|
app/code/community/Krp/Eximbay/Model/Version.php
CHANGED
|
@@ -31,8 +31,8 @@ class Krp_Eximbay_Model_Version
|
|
| 31 |
public function toOptionArray()
|
| 32 |
{
|
| 33 |
return array(
|
| 34 |
-
array('value' => 170, 'label'=>Mage::helper('eximbay')->__('170')),
|
| 35 |
-
array('value' => 180, 'label'=>Mage::helper('eximbay')->__('180')),
|
| 36 |
array('value' => 200, 'label'=>Mage::helper('eximbay')->__('200')),
|
| 37 |
);
|
| 38 |
}
|
| 31 |
public function toOptionArray()
|
| 32 |
{
|
| 33 |
return array(
|
| 34 |
+
//array('value' => 170, 'label'=>Mage::helper('eximbay')->__('170')),
|
| 35 |
+
//array('value' => 180, 'label'=>Mage::helper('eximbay')->__('180')),
|
| 36 |
array('value' => 200, 'label'=>Mage::helper('eximbay')->__('200')),
|
| 37 |
);
|
| 38 |
}
|
app/code/community/Krp/Eximbay/etc/config.xml
CHANGED
|
@@ -197,6 +197,14 @@
|
|
| 197 |
<order_status>processing</order_status>
|
| 198 |
<sort_order>7</sort_order>
|
| 199 |
</eximbay_ecn>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 200 |
</payment>
|
| 201 |
<eximbay>
|
| 202 |
<settings>
|
| 197 |
<order_status>processing</order_status>
|
| 198 |
<sort_order>7</sort_order>
|
| 199 |
</eximbay_ecn>
|
| 200 |
+
<eximbay_all>
|
| 201 |
+
<group>xbay</group>
|
| 202 |
+
<active>0</active>
|
| 203 |
+
<model>eximbay/all</model>
|
| 204 |
+
<title>All-in Payment</title>
|
| 205 |
+
<order_status>processing</order_status>
|
| 206 |
+
<sort_order>8</sort_order>
|
| 207 |
+
</eximbay_all>
|
| 208 |
</payment>
|
| 209 |
<eximbay>
|
| 210 |
<settings>
|
app/code/community/Krp/Eximbay/etc/system.xml
CHANGED
|
@@ -859,6 +859,121 @@
|
|
| 859 |
</specificcountry>
|
| 860 |
</fields>
|
| 861 |
</eximbay_ecn>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 862 |
</groups>
|
| 863 |
</payment>
|
| 864 |
</sections>
|
| 859 |
</specificcountry>
|
| 860 |
</fields>
|
| 861 |
</eximbay_ecn>
|
| 862 |
+
<eximbay_all translate="label" module="eximbay">
|
| 863 |
+
<label>All-in Payment (Powered by Eximbay)</label>
|
| 864 |
+
<frontend_type>text</frontend_type>
|
| 865 |
+
<sort_order>57</sort_order>
|
| 866 |
+
<show_in_default>1</show_in_default>
|
| 867 |
+
<show_in_website>1</show_in_website>
|
| 868 |
+
<show_in_store>0</show_in_store>
|
| 869 |
+
<fields>
|
| 870 |
+
<active translate="label">
|
| 871 |
+
<label>Enabled</label>
|
| 872 |
+
<comment>Enable or disable this payment method</comment>
|
| 873 |
+
<frontend_type>select</frontend_type>
|
| 874 |
+
<config_path>payment/eximbay_all/active</config_path>
|
| 875 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
| 876 |
+
<sort_order>1</sort_order>
|
| 877 |
+
<show_in_default>1</show_in_default>
|
| 878 |
+
<show_in_website>1</show_in_website>
|
| 879 |
+
<show_in_store>0</show_in_store>
|
| 880 |
+
</active>
|
| 881 |
+
<title translate="label">
|
| 882 |
+
<label>Title</label>
|
| 883 |
+
<comment>Insert a custom title for this payment method</comment>
|
| 884 |
+
<frontend_type>text</frontend_type>
|
| 885 |
+
<config_path>payment/eximbay_all/title</config_path>
|
| 886 |
+
<sort_order>2</sort_order>
|
| 887 |
+
<show_in_default>1</show_in_default>
|
| 888 |
+
<show_in_website>1</show_in_website>
|
| 889 |
+
<show_in_store>0</show_in_store>
|
| 890 |
+
</title>
|
| 891 |
+
<mid translate="label">
|
| 892 |
+
<label>Merchant ID</label>
|
| 893 |
+
<comment>Insert a merchant id provided by Eximbay</comment>
|
| 894 |
+
<frontend_type>text</frontend_type>
|
| 895 |
+
<config_path>payment/eximbay_all/mid</config_path>
|
| 896 |
+
<sort_order>3</sort_order>
|
| 897 |
+
<show_in_default>1</show_in_default>
|
| 898 |
+
<show_in_website>1</show_in_website>
|
| 899 |
+
<show_in_store>0</show_in_store>
|
| 900 |
+
</mid>
|
| 901 |
+
<secret_key translate="label">
|
| 902 |
+
<label>Secret Key</label>
|
| 903 |
+
<comment>Insert a secret key provided by Eximbay</comment>
|
| 904 |
+
<frontend_type>text</frontend_type>
|
| 905 |
+
<config_path>payment/eximbay_all/secret_key</config_path>
|
| 906 |
+
<sort_order>4</sort_order>
|
| 907 |
+
<show_in_default>1</show_in_default>
|
| 908 |
+
<show_in_website>1</show_in_website>
|
| 909 |
+
<show_in_store>0</show_in_store>
|
| 910 |
+
</secret_key>
|
| 911 |
+
<order_status translate="label">
|
| 912 |
+
<label>New order status</label>
|
| 913 |
+
<comment>Choose your preferred order status</comment>
|
| 914 |
+
<frontend_type>select</frontend_type>
|
| 915 |
+
<config_path>payment/eximbay_all/order_status</config_path>
|
| 916 |
+
<!--<source_model>adminhtml/system_config_source_order_status</source_model>-->
|
| 917 |
+
<!--<source_model>adminhtml/system_config_source_order_status_new</source_model>-->
|
| 918 |
+
<source_model>adminhtml/system_config_source_order_status_processing</source_model>
|
| 919 |
+
<sort_order>5</sort_order>
|
| 920 |
+
<show_in_default>1</show_in_default>
|
| 921 |
+
<show_in_website>1</show_in_website>
|
| 922 |
+
<show_in_store>0</show_in_store>
|
| 923 |
+
</order_status>
|
| 924 |
+
<test translate="label">
|
| 925 |
+
<label>Test Mode</label>
|
| 926 |
+
<comment>If you want to work in test mode, choose 'Yes'. Otherwise, choose 'No'</comment>
|
| 927 |
+
<frontend_type>select</frontend_type>
|
| 928 |
+
<config_path>payment/eximbay_all/test</config_path>
|
| 929 |
+
<source_model>adminhtml/system_config_source_yesno</source_model>
|
| 930 |
+
<sort_order>6</sort_order>
|
| 931 |
+
<show_in_default>1</show_in_default>
|
| 932 |
+
<show_in_website>1</show_in_website>
|
| 933 |
+
<show_in_store>0</show_in_store>
|
| 934 |
+
</test>
|
| 935 |
+
<ver translate="label">
|
| 936 |
+
<label>API Version</label>
|
| 937 |
+
<comment>Insert an Eximbay API version</comment>
|
| 938 |
+
<frontend_type>select</frontend_type>
|
| 939 |
+
<config_path>payment/eximbay_all/ver</config_path>
|
| 940 |
+
<source_model>eximbay/version</source_model>
|
| 941 |
+
<sort_order>7</sort_order>
|
| 942 |
+
<show_in_default>1</show_in_default>
|
| 943 |
+
<show_in_website>1</show_in_website>
|
| 944 |
+
<show_in_store>0</show_in_store>
|
| 945 |
+
</ver>
|
| 946 |
+
<dtype translate="label">
|
| 947 |
+
<label>Payment Page Type</label>
|
| 948 |
+
<comment>Choose your payment page type, IFrame or Popup.</comment>
|
| 949 |
+
<frontend_type>select</frontend_type>
|
| 950 |
+
<config_path>payment/eximbay_all/dtype</config_path>
|
| 951 |
+
<source_model>eximbay/popupiframe</source_model>
|
| 952 |
+
<sort_order>8</sort_order>
|
| 953 |
+
<show_in_default>1</show_in_default>
|
| 954 |
+
<show_in_website>1</show_in_website>
|
| 955 |
+
<show_in_store>0</show_in_store>
|
| 956 |
+
</dtype>
|
| 957 |
+
<allowspecific translate="label">
|
| 958 |
+
<label>Payment from applicable countries</label>
|
| 959 |
+
<frontend_type>allowspecific</frontend_type>
|
| 960 |
+
<sort_order>10</sort_order>
|
| 961 |
+
<source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model>
|
| 962 |
+
<show_in_default>1</show_in_default>
|
| 963 |
+
<show_in_website>1</show_in_website>
|
| 964 |
+
<show_in_store>0</show_in_store>
|
| 965 |
+
</allowspecific>
|
| 966 |
+
<specificcountry translate="label">
|
| 967 |
+
<label>Payment from Specific countries</label>
|
| 968 |
+
<frontend_type>multiselect</frontend_type>
|
| 969 |
+
<sort_order>11</sort_order>
|
| 970 |
+
<source_model>adminhtml/system_config_source_country</source_model>
|
| 971 |
+
<show_in_default>1</show_in_default>
|
| 972 |
+
<show_in_website>1</show_in_website>
|
| 973 |
+
<show_in_store>0</show_in_store>
|
| 974 |
+
</specificcountry>
|
| 975 |
+
</fields>
|
| 976 |
+
</eximbay_all>
|
| 977 |
</groups>
|
| 978 |
</payment>
|
| 979 |
</sections>
|
app/design/frontend/base/default/template/eximbay/payment.phtml
CHANGED
|
@@ -45,7 +45,7 @@
|
|
| 45 |
//<