Version Notes
clicking Place Order button pops up new Eximbay Payment window if payment page type is popup.
Download this release
Release Info
Developer | KRPartners Co.,Ltd |
Extension | Eximbay |
Version | 2.0.2 |
Comparing to | |
See all releases |
Code changes from version 2.0.1.1 to 2.0.2
- app/code/community/Krp/Eximbay/Model/Abstract.php +11 -1
- app/code/community/Krp/Eximbay/Model/Event.php +3 -1
- app/code/community/Krp/Eximbay/controllers/ProcessingController.php +52 -8
- app/design/frontend/base/default/layout/eximbay.xml +6 -0
- app/design/frontend/base/default/template/eximbay/payment.phtml +3 -13
- package.xml +5 -5
app/code/community/Krp/Eximbay/Model/Abstract.php
CHANGED
@@ -237,8 +237,18 @@ abstract class Krp_Eximbay_Model_Abstract extends Mage_Payment_Model_Method_Abst
|
|
237 |
'param2' => '',
|
238 |
'param3' => '',
|
239 |
'visitorid' => '',
|
|
|
240 |
'directToReturn' => 'N',
|
241 |
-
'paymethod'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
242 |
'dm_shipTo_city' => $shipping->getCity(),
|
243 |
'dm_shipTo_country' => $shipping->getCountry_id(),
|
244 |
'dm_shipTo_firstName' => $shipping->getFirstname(),
|
237 |
'param2' => '',
|
238 |
'param3' => '',
|
239 |
'visitorid' => '',
|
240 |
+
'autoclose' => 'Y',
|
241 |
'directToReturn' => 'N',
|
242 |
+
'paymethod' => $this->_paymentMethod,
|
243 |
+
'dm_billTo_city' => $billing->getCity(),
|
244 |
+
'dm_billTo_country' => $billing->getCountry_id(),
|
245 |
+
'dm_billTo_firstName' => $billing->getFirstname(),
|
246 |
+
'dm_billTo_lastName' => $billing->getLastname(),
|
247 |
+
'dm_billTo_phoneNumber' => $billing->getTelephone(),
|
248 |
+
'dm_billTo_postalCode' => $billing->getPostcode(),
|
249 |
+
'dm_billTo_state' => $billing->getRegionCode(),
|
250 |
+
'dm_billTo_street1' => $billing->getStreet(1),
|
251 |
+
'dm_billTo_street2' => $billing->getStreet(2),
|
252 |
'dm_shipTo_city' => $shipping->getCity(),
|
253 |
'dm_shipTo_country' => $shipping->getCountry_id(),
|
254 |
'dm_shipTo_firstName' => $shipping->getFirstname(),
|
app/code/community/Krp/Eximbay/Model/Event.php
CHANGED
@@ -252,9 +252,11 @@ class Krp_Eximbay_Model_Event
|
|
252 |
Mage::throwException('Secretkey is empty.');
|
253 |
}
|
254 |
|
255 |
-
$suffix =
|
256 |
if (empty($params['transid'])){
|
257 |
$suffix = "&requestid=" .$params['requestid'];
|
|
|
|
|
258 |
}
|
259 |
|
260 |
$linkBuf = $secretKey. "?mid=" .$params['mid'] ."&ref=" .$params['ref'] ."&cur=" .$params['cur'] ."&amt=" .$params['amt'] ."&rescode=" .$params['rescode'] .$suffix;
|
252 |
Mage::throwException('Secretkey is empty.');
|
253 |
}
|
254 |
|
255 |
+
$suffix = '';
|
256 |
if (empty($params['transid'])){
|
257 |
$suffix = "&requestid=" .$params['requestid'];
|
258 |
+
}else{
|
259 |
+
$suffix = "&transid=" .$params['transid'];
|
260 |
}
|
261 |
|
262 |
$linkBuf = $secretKey. "?mid=" .$params['mid'] ."&ref=" .$params['ref'] ."&cur=" .$params['cur'] ."&amt=" .$params['amt'] ."&rescode=" .$params['rescode'] .$suffix;
|
app/code/community/Krp/Eximbay/controllers/ProcessingController.php
CHANGED
@@ -36,8 +36,34 @@ class Krp_Eximbay_ProcessingController extends Mage_Core_Controller_Front_Action
|
|
36 |
*/
|
37 |
public function placeformAction()
|
38 |
{
|
39 |
-
|
40 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
41 |
}
|
42 |
|
43 |
/**
|
@@ -58,10 +84,15 @@ class Krp_Eximbay_ProcessingController extends Mage_Core_Controller_Front_Action
|
|
58 |
Mage::helper('eximbay')->__('The customer was redirected to Eximbay.')
|
59 |
);
|
60 |
$order->save();
|
61 |
-
|
62 |
-
$
|
63 |
-
$
|
64 |
-
|
|
|
|
|
|
|
|
|
|
|
65 |
$session->clear();
|
66 |
|
67 |
$this->loadLayout();
|
@@ -85,6 +116,10 @@ class Krp_Eximbay_ProcessingController extends Mage_Core_Controller_Front_Action
|
|
85 |
try {
|
86 |
|
87 |
$rescode = $this->getRequest()->get('rescode');
|
|
|
|
|
|
|
|
|
88 |
|
89 |
if($rescode == '0000'){
|
90 |
$quoteId = $event->successEvent();
|
@@ -92,7 +127,7 @@ class Krp_Eximbay_ProcessingController extends Mage_Core_Controller_Front_Action
|
|
92 |
$this->_redirect('checkout/onepage/success');
|
93 |
return;
|
94 |
}else{
|
95 |
-
$this->_redirect('eximbay/processing/cancel');
|
96 |
return;
|
97 |
}
|
98 |
|
@@ -113,7 +148,16 @@ class Krp_Eximbay_ProcessingController extends Mage_Core_Controller_Front_Action
|
|
113 |
$event = Mage::getModel('eximbay/event')
|
114 |
->setEventData($data);
|
115 |
|
116 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
117 |
|
118 |
// set quote to active
|
119 |
$session = $this->_getCheckout();
|
36 |
*/
|
37 |
public function placeformAction()
|
38 |
{
|
39 |
+
try {
|
40 |
+
$session = $this->_getCheckout();
|
41 |
+
|
42 |
+
$order = Mage::getModel('sales/order');
|
43 |
+
$order->loadByIncrementId($session->getLastRealOrderId());
|
44 |
+
if (!$order->getId()) {
|
45 |
+
Mage::throwException('No order for processing found');
|
46 |
+
}
|
47 |
+
|
48 |
+
$payMethod = $order->getPayment()->getMethodInstance()->getCode();
|
49 |
+
$windowType = Mage::getStoreConfig('payment/'.$payMethod.'/dtype');
|
50 |
+
|
51 |
+
Mage::log("Window Type : ".$windowType, null, 'eximbay'.Mage::getModel('core/date')->date('Y-m-d').'.log');
|
52 |
+
|
53 |
+
if(!$windowType){
|
54 |
+
$session->setEximbayQuoteId($session->getQuoteId());
|
55 |
+
$session->setEximbayRealOrderId($session->getLastRealOrderId());
|
56 |
+
$session->getQuote()->setIsActive(false)->save();
|
57 |
+
//$session->clear();
|
58 |
+
}
|
59 |
+
|
60 |
+
$this->loadLayout();
|
61 |
+
$this->renderLayout();
|
62 |
+
|
63 |
+
} catch (Exception $e){
|
64 |
+
Mage::logException($e);
|
65 |
+
parent::_redirect('checkout/cart');
|
66 |
+
}
|
67 |
}
|
68 |
|
69 |
/**
|
84 |
Mage::helper('eximbay')->__('The customer was redirected to Eximbay.')
|
85 |
);
|
86 |
$order->save();
|
87 |
+
|
88 |
+
$payMethod = $order->getPayment()->getMethodInstance()->getCode();
|
89 |
+
$windowType = Mage::getStoreConfig('payment/'.$payMethod.'/dtype');
|
90 |
+
|
91 |
+
if($windowType){
|
92 |
+
$session->setEximbayQuoteId($session->getQuoteId());
|
93 |
+
$session->setEximbayRealOrderId($session->getLastRealOrderId());
|
94 |
+
$session->getQuote()->setIsActive(false)->save();
|
95 |
+
}
|
96 |
$session->clear();
|
97 |
|
98 |
$this->loadLayout();
|
116 |
try {
|
117 |
|
118 |
$rescode = $this->getRequest()->get('rescode');
|
119 |
+
$resmsg= $this->getRequest()->get('resmsg');
|
120 |
+
|
121 |
+
$urlargs['rescode'] = urlencode($rescode);
|
122 |
+
$urlargs['resmsg'] = urlencode($resmsg);
|
123 |
|
124 |
if($rescode == '0000'){
|
125 |
$quoteId = $event->successEvent();
|
127 |
$this->_redirect('checkout/onepage/success');
|
128 |
return;
|
129 |
}else{
|
130 |
+
$this->_redirect('eximbay/processing/cancel', $urlargs);
|
131 |
return;
|
132 |
}
|
133 |
|
148 |
$event = Mage::getModel('eximbay/event')
|
149 |
->setEventData($data);
|
150 |
|
151 |
+
$rescode = $this->getRequest()->getParam('rescode');
|
152 |
+
$resmsg = $this->getRequest()->getParam('resmsg');
|
153 |
+
|
154 |
+
Mage::log('rescode : '.$rescode.' resmsg : '.$resmsg, null, 'eximbay'.Mage::getModel('core/date')->date('Y-m-d').'.log');
|
155 |
+
|
156 |
+
if($rescode == 'XXXX'){
|
157 |
+
$message = $event->cancelEvent();
|
158 |
+
}else{
|
159 |
+
$message = $resmsg;
|
160 |
+
}
|
161 |
|
162 |
// set quote to active
|
163 |
$session = $this->_getCheckout();
|
app/design/frontend/base/default/layout/eximbay.xml
CHANGED
@@ -30,6 +30,12 @@
|
|
30 |
<action method="setMethodFormTemplate"><method>purchaseorder</method><template>payment/form/purchaseorder.phtml</template></action>
|
31 |
</block>
|
32 |
</checkout_onepage_paymentmethod>
|
|
|
|
|
|
|
|
|
|
|
|
|
33 |
|
34 |
<eximbay_processing_payment>
|
35 |
<reference name="root">
|
30 |
<action method="setMethodFormTemplate"><method>purchaseorder</method><template>payment/form/purchaseorder.phtml</template></action>
|
31 |
</block>
|
32 |
</checkout_onepage_paymentmethod>
|
33 |
+
|
34 |
+
<checkout_onepage_review>
|
35 |
+
<reference name="checkout.onepage.review.button">
|
36 |
+
<action method="setTemplate"><template helper="eximbay/ppp/getReviewButtonTemplate"><name>eximbay/checkout/onepage/review/button.phtml</name><block>checkout.onepage.review.button</block></template></action>
|
37 |
+
</reference>
|
38 |
+
</checkout_onepage_review>
|
39 |
|
40 |
<eximbay_processing_payment>
|
41 |
<reference name="root">
|
app/design/frontend/base/default/template/eximbay/payment.phtml
CHANGED
@@ -24,7 +24,7 @@
|
|
24 |
<h3><?php echo Mage::helper('eximbay')->__('Please pay your order now') ?> </h3>
|
25 |
</div>
|
26 |
|
27 |
-
<table style="width:100%;">
|
28 |
<tr>
|
29 |
<?php if ($this->getEximbayDisplayType()): ?>
|
30 |
<td style="width:800px">
|
@@ -32,21 +32,11 @@
|
|
32 |
</td>
|
33 |
<?php else: ?>
|
34 |
<td style="width:800px;height:400px;vertical-align: middle; text-align:center;">
|
35 |
-
<img src="<?php echo $this->getSkinUrl('images/opc-ajax-loader.gif') ?>"/>
|
36 |
</td>
|
37 |
<?php endif; ?>
|
38 |
<td style="vertical-align: text-top; text-align:center;">
|
39 |
<img src="<?php echo $this->getEximbayLogoSrc() ?>" title="<?php echo Mage::helper('eximbay')->__('Powered by Eximbay') ?>" alt="<?php echo Mage::helper('eximbay')->__('Powered by Eximbay') ?>" />
|
40 |
</td>
|
41 |
</tr>
|
42 |
-
</table>
|
43 |
-
<?php if (!$this->getEximbayDisplayType()): ?>
|
44 |
-
<script type="text/javascript">
|
45 |
-
//<![CDATA[
|
46 |
-
window.onload=function()
|
47 |
-
{
|
48 |
-
window.open('<?php echo Mage::getUrl('eximbay/processing/placeform') ?>','payment2','scrollbars=yes,status=no,toolbar=no,resizable=yes,location=no,menu=no,width=800,height=470,top=200,left=300');
|
49 |
-
}
|
50 |
-
//]]>
|
51 |
-
</script>
|
52 |
-
<?php endif; ?>
|
24 |
<h3><?php echo Mage::helper('eximbay')->__('Please pay your order now') ?> </h3>
|
25 |
</div>
|
26 |
|
27 |
+
<table style="width:100%; border:1;">
|
28 |
<tr>
|
29 |
<?php if ($this->getEximbayDisplayType()): ?>
|
30 |
<td style="width:800px">
|
32 |
</td>
|
33 |
<?php else: ?>
|
34 |
<td style="width:800px;height:400px;vertical-align: middle; text-align:center;">
|
35 |
+
<img style="display:block; margin:0 auto;" src="<?php echo $this->getSkinUrl('images/opc-ajax-loader.gif') ?>"/>
|
36 |
</td>
|
37 |
<?php endif; ?>
|
38 |
<td style="vertical-align: text-top; text-align:center;">
|
39 |
<img src="<?php echo $this->getEximbayLogoSrc() ?>" title="<?php echo Mage::helper('eximbay')->__('Powered by Eximbay') ?>" alt="<?php echo Mage::helper('eximbay')->__('Powered by Eximbay') ?>" />
|
40 |
</td>
|
41 |
</tr>
|
42 |
+
</table>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
package.xml
CHANGED
@@ -1,18 +1,18 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Eximbay</name>
|
4 |
-
<version>2.0.
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/gpl-license.php">GNU General Public License</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
<summary>Official Eximbay Payment Extension</summary>
|
10 |
<description>This payment module offers a variety of popular payment methods for online merchants.</description>
|
11 |
-
<notes>
|
12 |
<authors><author><name>KRPartners Co.,Ltd</name><user>prokod1</user><email>prokod@kr.net</email></author></authors>
|
13 |
-
<date>2014-
|
14 |
-
<time>
|
15 |
-
<contents><target name="magecommunity"><dir name="Krp"><dir name="Eximbay"><dir name="Block"><dir name="Checkout"><dir name="Onepage"><dir name="Payment"><file name="Methods.php" hash="ab74479c6a0c966eaa8a0e290ccfed9a"/></dir></dir></dir><file name="Form.php" hash="f6a8a89d07384accc0501a6806fb8a58"/><file name="Info.php" hash="2a74edc39a49612eca820a6826d03a93"/><file name="Jsinit.php" hash="f5e7e6864d9a66fdeb760865885eb028"/><file name="Payment.php" hash="e55e4e8c36ac4e3a8372723cc7e34fbc"/><file name="Placeform.php" hash="22e9a71ba8d56e338b273df0a31d408e"/><file name="Redirect.php" hash="ed0a1ae878f925001dda455bdcee7281"/></dir><dir name="Helper"><file name="Data.php" hash="39b50d67f2f0ce838900530ded9cb5f7"/><file name="Ppp.php" hash="2209927ca48e88ea8312cb3babb3cac5"/></dir><dir name="Model"><file name="Abstract.php" hash="
|
16 |
<compatible/>
|
17 |
<dependencies><required><php><min>5.0.0</min><max>6.0.0</max></php></required></dependencies>
|
18 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Eximbay</name>
|
4 |
+
<version>2.0.2</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/gpl-license.php">GNU General Public License</license>
|
7 |
<channel>community</channel>
|
8 |
<extends/>
|
9 |
<summary>Official Eximbay Payment Extension</summary>
|
10 |
<description>This payment module offers a variety of popular payment methods for online merchants.</description>
|
11 |
+
<notes>clicking Place Order button pops up new Eximbay Payment window if payment page type is popup.</notes>
|
12 |
<authors><author><name>KRPartners Co.,Ltd</name><user>prokod1</user><email>prokod@kr.net</email></author></authors>
|
13 |
+
<date>2014-12-10</date>
|
14 |
+
<time>07:45:12</time>
|
15 |
+
<contents><target name="magecommunity"><dir name="Krp"><dir name="Eximbay"><dir name="Block"><dir name="Checkout"><dir name="Onepage"><dir name="Payment"><file name="Methods.php" hash="ab74479c6a0c966eaa8a0e290ccfed9a"/></dir></dir></dir><file name="Form.php" hash="f6a8a89d07384accc0501a6806fb8a58"/><file name="Info.php" hash="2a74edc39a49612eca820a6826d03a93"/><file name="Jsinit.php" hash="f5e7e6864d9a66fdeb760865885eb028"/><file name="Payment.php" hash="e55e4e8c36ac4e3a8372723cc7e34fbc"/><file name="Placeform.php" hash="22e9a71ba8d56e338b273df0a31d408e"/><file name="Redirect.php" hash="ed0a1ae878f925001dda455bdcee7281"/></dir><dir name="Helper"><file name="Data.php" hash="39b50d67f2f0ce838900530ded9cb5f7"/><file name="Ppp.php" hash="2209927ca48e88ea8312cb3babb3cac5"/></dir><dir name="Model"><file name="Abstract.php" hash="08b106780bbcdab3c2d051e7c977b7da"/><file name="Acc.php" hash="e01ef19e450cc81d7abea76716a68ee3"/><file name="Alp.php" hash="fc5e746a521d7e8fe609d56dd8971fb2"/><file name="Cup.php" hash="3e61b570bf9ec0f47a8282b289c5cbc2"/><file name="Ecn.php" hash="8c81daff5feccef2173f7afe399d2b4d"/><file name="Event.php" hash="29d2ca1d795d0937d9c224e48ac43d57"/><file name="Nnb.php" hash="dbfd83d3c79479decb81ecd2198a3f31"/><file name="Popup.php" hash="26b4d183cdaebcd6a66e3ccc97570be8"/><file name="Popupiframe.php" hash="fceb0e286d5c7f2d47937dc24763d276"/><file name="Ppl.php" hash="67a14f356dbc79d54b3ad8448416bca6"/><file name="Tnp.php" hash="f5a167e11ec3c37b16d87ac4284f1f95"/></dir><dir name="controllers"><file name="EximbayController.php" hash="9aef2e23676514be7da811f02ace1638"/><file name="ProcessingController.php" hash="5013588c5b789e0a634152e04db41c60"/></dir><dir name="etc"><file name="config.xml" hash="3160448769fb4023ac13a4653939de2b"/><file name="system.xml" hash="7f2438cbf4938dfe7e9794d827e546c1"/></dir><dir name="sql"><dir name="eximbay_setup"><file name="install-2.0.0.php" hash="de251375de4ea828e2f827f0bfbb4ce5"/><file name="mysql4-ugrade-0.1.0-2.0.0.php" hash="8dbe742a111b82d3aa4106bb9bc7fce9"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="eximbay.xml" hash="46de7d1b0a663271c7b90d3bdfc0e8e8"/></dir><dir name="template"><dir name="eximbay"><file name="info.phtml" hash="8d7970f6b7f17546d5741d61455a0654"/><file name="jsinit.phtml" hash="b146ee4b5a669e2bde2cb300baeedd80"/><dir name="pdf"><file name="info.phtml" hash="145976fe44cdfef7cb0a9ec438a3c162"/></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="eximbay.xml" hash="b396456cf9d9e934255f5c7d75d9933d"/></dir><dir name="template"><dir name="eximbay"><file name="blank.phtml" hash="ea239a21df8d55020f39349254ef5cba"/><dir name="checkout"><dir name="onepage"><dir name="payment"><file name="methods.phtml" hash="be48a6dec436726ba2bef57c04e2c18e"/></dir><dir name="review"><file name="button.phtml" hash="6a4af9bbbf6069d659a12bbd739cddd7"/></dir></dir></dir><file name="form.phtml" hash="fe17e160010d308c0df0ebc29673004d"/><file name="info.phtml" hash="4b365112722a6b4d0555580ac1c20c5e"/><file name="payment.phtml" hash="ee89c0503e1075ddacff5b8c8fca9b32"/><file name="placeform.phtml" hash="1886ca9af1a89d258b621646ed4c2693"/><file name="redirect.phtml" hash="ff792a53e3cd9721e906edafcc30e3d5"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Krp_Eximbay.xml" hash="f163f260b5d1203cb8b9146e838d672d"/></dir></target><target name="magelocale"><dir name="en_US"><file name="Krp_Eximbay.csv" hash="4ae9e31213fc1113498d1c162b7cef4d"/></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="images"><dir name="eximbay"><file name="eximbay_acc.jpg" hash="b64b77cd6a2a3bcea931e78c85b01e54"/><file name="eximbay_alp.jpg" hash="fdf33a103183ee24f238d26b4b546de5"/><file name="eximbay_banner.png" hash="afd1fd216aefbbfc7caaade06e5e25e4"/><file name="eximbay_cup.jpg" hash="42c17b3b9b9841a28efc1f921099ee6f"/><file name="eximbay_loading.gif" hash="68affa0374b82d560d800c9ea3e160ad"/><file name="eximbay_logo.gif" hash="54276432f5b4f61f32e8c8cd2a0cc6d1"/><file name="eximbay_nnb.jpg" hash="31063516179a5fb158f02cb25b5f94fb"/><file name="eximbay_ppl.jpg" hash="80e621524248fe39508f91349a353bb5"/><file name="eximbay_tnp.jpg" hash="56d1053176bc6ea5b7a39ec43b9d2da2"/></dir></dir></dir></dir></dir></target></contents>
|
16 |
<compatible/>
|
17 |
<dependencies><required><php><min>5.0.0</min><max>6.0.0</max></php></required></dependencies>
|
18 |
</package>
|