Version Notes
Introduction of sandbox feature
Download this release
Release Info
Developer | J2T DESIGN |
Extension | J2t_Payplug |
Version | 1.0.12 |
Comparing to | |
See all releases |
Code changes from version 1.0.11 to 1.0.12
app/code/community/J2t/Payplug/controllers/PaymentController.php
CHANGED
@@ -88,6 +88,14 @@ class J2t_Payplug_PaymentController extends Mage_Core_Controller_Front_Action
|
|
88 |
$order->addStatusHistoryComment(Mage::helper('j2tpayplug')->__('Payment has been captured by Payment Gateway. Transaction id: %s', $data['id_transaction']));
|
89 |
$order->save();
|
90 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
91 |
if (Mage::getStoreConfig('payment/j2tpayplug/invoice', $data['custom_data'])){
|
92 |
//generate invoice
|
93 |
try {
|
@@ -151,9 +159,42 @@ class J2t_Payplug_PaymentController extends Mage_Core_Controller_Front_Action
|
|
151 |
|
152 |
public function cancelAction()
|
153 |
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
154 |
//redirect to cart and error message payment has been declined
|
155 |
$this->_getSession()->addError(Mage::helper('j2tpayplug')->escapeHtml(Mage::helper('j2tpayplug')->__('There has been a problem during the payment.')));
|
156 |
$this->_redirect('checkout/cart');
|
157 |
}
|
158 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
159 |
}
|
88 |
$order->addStatusHistoryComment(Mage::helper('j2tpayplug')->__('Payment has been captured by Payment Gateway. Transaction id: %s', $data['id_transaction']));
|
89 |
$order->save();
|
90 |
|
91 |
+
try
|
92 |
+
{
|
93 |
+
$order->sendNewOrderEmail();
|
94 |
+
}
|
95 |
+
catch (Exception $ex) {
|
96 |
+
Mage::logException($ex);
|
97 |
+
}
|
98 |
+
|
99 |
if (Mage::getStoreConfig('payment/j2tpayplug/invoice', $data['custom_data'])){
|
100 |
//generate invoice
|
101 |
try {
|
159 |
|
160 |
public function cancelAction()
|
161 |
{
|
162 |
+
//redirect to cart and error message payment has been declined
|
163 |
+
if ($this->_getSession()->getLastRealOrderId())
|
164 |
+
{
|
165 |
+
$order = Mage::getModel('sales/order')->loadByIncrementId($this->_getSession()->getLastRealOrderId());
|
166 |
+
if ($order->getId())
|
167 |
+
{
|
168 |
+
//Cancel order
|
169 |
+
if ($order->getState() != Mage_Sales_Model_Order::STATE_CANCELED)
|
170 |
+
{
|
171 |
+
$order->registerCancellation("Canceled by Payment Provider")->save();
|
172 |
+
}
|
173 |
+
$quote = Mage::getModel('sales/quote')
|
174 |
+
->load($order->getQuoteId());
|
175 |
+
//Return quote
|
176 |
+
if ($quote->getId())
|
177 |
+
{
|
178 |
+
$quote->setIsActive(1)
|
179 |
+
->setReservedOrderId(NULL)
|
180 |
+
->save();
|
181 |
+
$this->_getSession()->replaceQuote($quote);
|
182 |
+
}
|
183 |
+
|
184 |
+
//Unset data
|
185 |
+
$this->_getSession()->unsLastRealOrderId();
|
186 |
+
}
|
187 |
+
}
|
188 |
//redirect to cart and error message payment has been declined
|
189 |
$this->_getSession()->addError(Mage::helper('j2tpayplug')->escapeHtml(Mage::helper('j2tpayplug')->__('There has been a problem during the payment.')));
|
190 |
$this->_redirect('checkout/cart');
|
191 |
}
|
192 |
|
193 |
+
// public function cancelAction()
|
194 |
+
// {
|
195 |
+
// //redirect to cart and error message payment has been declined
|
196 |
+
// $this->_getSession()->addError(Mage::helper('j2tpayplug')->escapeHtml(Mage::helper('j2tpayplug')->__('There has been a problem during the payment.')));
|
197 |
+
// $this->_redirect('checkout/cart');
|
198 |
+
// }
|
199 |
+
|
200 |
}
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>J2t_Payplug</name>
|
4 |
-
<version>1.0.
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/OSL-3.0">OSL v3.0</license>
|
7 |
<channel>community</channel>
|
@@ -10,9 +10,9 @@
|
|
10 |
<description>It allows to pay with PayPlug</description>
|
11 |
<notes>Introduction of sandbox feature</notes>
|
12 |
<authors><author><name>J2T Design</name><user>j2tdesign</user><email>j2tdesign.net@gmail.com</email></author></authors>
|
13 |
-
<date>2017-
|
14 |
-
<time>17:
|
15 |
-
<contents><target name="magecommunity"><dir name="J2t"><dir name="Payplug"><dir name="Block"><dir name="Adminhtml"><dir name="System"><dir name="Config"><file name="Accountdetails.php" hash="c89acdccd51f392dac8dfd032013683f"/></dir></dir></dir><file name="Form.php" hash="0c89710b2d4e94d76e9cc4b37ae3e7a6"/><file name="Info.php" hash="6e5e03ae417efe6d538b6437d5c99f87"/></dir><dir name="Helper"><file name="Data.php" hash="123d5de46cd1577e867e8ab9b0236d09"/></dir><dir name="Model"><file name="Observer.php" hash="3d161081938d37620f427a0f8ad52307"/><file name="PaymentMethod.php" hash="dda6ff53374e6656ce1bcee68992c384"/></dir><dir name="controllers"><file name="PaymentController.php" hash="
|
16 |
<compatible/>
|
17 |
-
<dependencies><required><php><min>5.1.0</min><max>
|
18 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>J2t_Payplug</name>
|
4 |
+
<version>1.0.12</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/OSL-3.0">OSL v3.0</license>
|
7 |
<channel>community</channel>
|
10 |
<description>It allows to pay with PayPlug</description>
|
11 |
<notes>Introduction of sandbox feature</notes>
|
12 |
<authors><author><name>J2T Design</name><user>j2tdesign</user><email>j2tdesign.net@gmail.com</email></author></authors>
|
13 |
+
<date>2017-02-13</date>
|
14 |
+
<time>17:26:19</time>
|
15 |
+
<contents><target name="magecommunity"><dir name="J2t"><dir name="Payplug"><dir name="Block"><dir name="Adminhtml"><dir name="System"><dir name="Config"><file name="Accountdetails.php" hash="c89acdccd51f392dac8dfd032013683f"/></dir></dir></dir><file name="Form.php" hash="0c89710b2d4e94d76e9cc4b37ae3e7a6"/><file name="Info.php" hash="6e5e03ae417efe6d538b6437d5c99f87"/></dir><dir name="Helper"><file name="Data.php" hash="123d5de46cd1577e867e8ab9b0236d09"/></dir><dir name="Model"><file name="Observer.php" hash="3d161081938d37620f427a0f8ad52307"/><file name="PaymentMethod.php" hash="dda6ff53374e6656ce1bcee68992c384"/></dir><dir name="controllers"><file name="PaymentController.php" hash="fd38ef289fd355c8aea32b42596261e0"/></dir><dir name="etc"><file name="config.xml" hash="99f3dbba953d973970a33421c6d42930"/><file name="system.xml" hash="bfb3f1cb7466f1c893847ba660549842"/></dir><dir name="sql"><dir name="j2tpayplug_setup"><file name="install-1.0.0.php" hash="38cd84e5305bf53bca042f3a325523e5"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="j2tpayplug"><file name="form.phtml" hash="cacf102de2ad4d183c502ad85d309439"/><file name="info.phtml" hash="7270ac2591cb0ad18915d8f5e92bef69"/></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="j2tpayplug.xml" hash=""/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="J2t_Payplug.xml" hash="dccffdae1d3e6bae6c2e01ed7ec0cff3"/></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><file name="j2t_all_admin_1.css" hash=""/><dir name="images"><file name="j2t_all_1.png" hash=""/></dir></dir></dir></dir></target><target name="magemedia"><dir name="."><file name="icon_accepted_cards_payplug.gif" hash=""/></dir></target></contents>
|
16 |
<compatible/>
|
17 |
+
<dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
|
18 |
</package>
|