Skip to content

Commit 673cbbd

Browse files
committed
Merge pull request #16 from magently/master
New version: 0.7.5
2 parents de43a5a + 86f6a2b commit 673cbbd

File tree

4 files changed

+14
-18
lines changed

4 files changed

+14
-18
lines changed

app/code/community/Sign2pay/Payment/Model/Processor.php

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,11 @@ public function performPayment(array $initial_response)
5757
return $this->processPaymentCaptureResponse($payment);
5858
}
5959
catch (Exception $e) {
60+
Mage::logException($e);
6061
Mage::getSingleton('checkout/session')->addError($e->getMessage());
61-
return Mage::app()->getResponse()->setRedirect('cancel', array('_secure'=>true));
62+
63+
$this->cancel();
64+
return Mage::app()->getResponse()->setRedirect('failure', array('_secure'=>true));
6265
}
6366
}
6467

@@ -196,12 +199,11 @@ public function processPaymentCaptureResponse(array $request)
196199

197200
/**
198201
* Cancel the order
199-
*
200-
* @param Mage_Sales_Model_Order $order
201202
*/
202-
public function cancel(Mage_Sales_Model_Order $order)
203+
public function cancel()
203204
{
204-
$order->cancel()->save();
205+
Mage::helper('sign2pay')->setStatusOnOrder($this->_order, 'Canceled');
206+
$this->_order->cancel()->save();
205207

206208
return $this;
207209
}

app/code/community/Sign2pay/Payment/controllers/PaymentController.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -85,13 +85,7 @@ public function cancelAction()
8585
$session = Mage::getSingleton('checkout/session');
8686
$session->setQuoteId($session->getSign2payQuoteId(true));
8787
if ($session->getLastRealOrderId()) {
88-
$order = Mage::getModel('sales/order')->loadByIncrementId($session->getLastRealOrderId());
89-
if ($order->getId()) {
90-
Mage::getModel('sign2pay/processor')->cancel($order);
91-
}
9288
Mage::helper('sign2pay/checkout')->restoreQuote();
93-
Mage::getSingleton('checkout/session')->addError("The payment has been cancelled.");
94-
9589
}
9690
$this->_redirect('checkout/cart');
9791
}

app/code/community/Sign2pay/Payment/etc/config.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<config>
33
<modules>
44
<Sign2pay_Payment>
5-
<version>0.7.4</version>
5+
<version>0.7.5</version>
66
</Sign2pay_Payment>
77
</modules>
88

package.xml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<?xml version="1.0"?>
22
<package>
33
<name>Sign2Pay_Mobile_Payments</name>
4-
<version>0.7.4</version>
4+
<version>0.7.5</version>
55
<stability>beta</stability>
66
<license>Sign2Pay Commercial License</license>
77
<channel>community</channel>
@@ -13,13 +13,13 @@ Analysing hundreds of data points in a single signature, Sign2Pay provides the s
1313
&#xD;
1414
Compatible with: 1.7, 1.8, 1.9</description>
1515
<notes>Changes:&#xD;
16-
- Add dynamic bank logo to payment method label&#xD;
17-
- Add mobile phone number to authorize request&#xD;
16+
- Simplify order cancelation workflow during payment&#xD;
17+
- Change logo url in admin section&#xD;
1818
</notes>
1919
<authors><author><name>Sign2Pay</name><user>Sign2Pay</user><email>[email protected]</email></author></authors>
20-
<date>2015-11-24</date>
21-
<time>15:36:47</time>
22-
<contents><target name="magecommunity"><dir name="Sign2pay"><dir name="Payment"><dir name="Block"><dir name="Adminhtml"><file name="Notifications.php" hash="80a5205a24d830664b7f0a75c649c3ca"/></dir><dir name="Form"><file name="Sign2pay.php" hash="d32961e2b98a40b2e836ba080ece7b13"/></dir><dir name="Info"><file name="Sign2pay.php" hash="f24dfc1137275bb5963ac3ce115c9702"/></dir><file name="Redirect.php" hash="6541b32748997daa49f163fbc073692a"/><file name="RiskAssessment.php" hash="2404631636842acb48d0faa17bdaa0c0"/></dir><dir name="Helper"><file name="Checkout.php" hash="8dc4a28893064a1be1652eeb3e8092bb"/><file name="CountryCodes.php" hash="06142eb49e0d3290a78036e58fcc8d26"/><file name="Data.php" hash="a9cc9a7671f29b6e4685bb42b7694857"/></dir><dir name="Model"><dir name="Model"><dir name="System"><dir name="Config"><dir name="Source"><file name="OnepageTypes.php" hash="ef9973c103caa53d5dee6ff8bf13a547"/></dir></dir></dir></dir><file name="Observer.php" hash="b1c40e839b5a316dccc46ff25a691390"/><file name="Processor.php" hash="ac3799cd66646cf764337ecb1b9731d5"/><file name="Sign2pay.php" hash="d32ef2a9d5b9af7213fec934256effcd"/></dir><dir name="controllers"><file name="PaymentController.php" hash="aef7e5cdd64aac71793a4b2fb062b0b9"/></dir><dir name="etc"><file name="config.xml" hash="440f8b3b379381ec9458033fe54f5a87"/><file name="system.xml" hash="3b53e87a3157590c06f8370d5867320e"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="sign2pay.xml" hash="953d1389f9c540f790ffefc1541f2695"/></dir><dir name="template"><dir name="sign2pay"><dir name="form"><file name="sign2pay.phtml" hash="127ad19fb075adf3b1dea937fed82052"/></dir><file name="redirect.phtml" hash="f9fa638723240bd8e3f84ae3835a499c"/><file name="riskassessment.phtml" hash="9d15a0924c0ebe7516a4f2cf23b0be17"/><file name="success.phtml" hash="8670cd6c98497a862f1e134082c9f45c"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Sign2pay_Payment.xml" hash="62959f5fdbe4e43aee1ac6c3bffc0978"/></dir></target><target name="mageweb"><dir name="js"><dir name="sign2pay"><file name="jquery.min.js" hash="e0e0559014b222245deb26b6ae8bd940"/><file name="payment.js" hash="6d4bfd7bce9ef29ad133796cb280b488"/></dir></dir></target></contents>
20+
<date>2015-11-27</date>
21+
<time>11:26:56</time>
22+
<contents><target name="magecommunity"><dir name="Sign2pay"><dir name="Payment"><dir name="Block"><dir name="Adminhtml"><file name="Notifications.php" hash="80a5205a24d830664b7f0a75c649c3ca"/></dir><dir name="Form"><file name="Sign2pay.php" hash="d32961e2b98a40b2e836ba080ece7b13"/></dir><dir name="Info"><file name="Sign2pay.php" hash="f24dfc1137275bb5963ac3ce115c9702"/></dir><file name="Redirect.php" hash="6541b32748997daa49f163fbc073692a"/><file name="RiskAssessment.php" hash="2404631636842acb48d0faa17bdaa0c0"/></dir><dir name="Helper"><file name="Checkout.php" hash="8dc4a28893064a1be1652eeb3e8092bb"/><file name="CountryCodes.php" hash="06142eb49e0d3290a78036e58fcc8d26"/><file name="Data.php" hash="a9cc9a7671f29b6e4685bb42b7694857"/></dir><dir name="Model"><dir name="Model"><dir name="System"><dir name="Config"><dir name="Source"><file name="OnepageTypes.php" hash="ef9973c103caa53d5dee6ff8bf13a547"/></dir></dir></dir></dir><file name="Observer.php" hash="b1c40e839b5a316dccc46ff25a691390"/><file name="Processor.php" hash="0a0124b4bbf7dcf8f3bf9d86c635db99"/><file name="Sign2pay.php" hash="d32ef2a9d5b9af7213fec934256effcd"/></dir><dir name="controllers"><file name="PaymentController.php" hash="0b49d4a50bf2301c6d45d271f602ddca"/></dir><dir name="etc"><file name="config.xml" hash="5d61019032214bfd5f7d8231e6b9b923"/><file name="system.xml" hash="327ceb144bc52677cfecf141ad9a3cdd"/></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="sign2pay.xml" hash="953d1389f9c540f790ffefc1541f2695"/></dir><dir name="template"><dir name="sign2pay"><dir name="form"><file name="sign2pay.phtml" hash="127ad19fb075adf3b1dea937fed82052"/></dir><file name="redirect.phtml" hash="f9fa638723240bd8e3f84ae3835a499c"/><file name="riskassessment.phtml" hash="9d15a0924c0ebe7516a4f2cf23b0be17"/><file name="success.phtml" hash="8670cd6c98497a862f1e134082c9f45c"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Sign2pay_Payment.xml" hash="62959f5fdbe4e43aee1ac6c3bffc0978"/></dir></target><target name="mageweb"><dir name="js"><dir name="sign2pay"><file name="jquery.min.js" hash="e0e0559014b222245deb26b6ae8bd940"/><file name="payment.js" hash="6d4bfd7bce9ef29ad133796cb280b488"/></dir></dir></target></contents>
2323
<compatible/>
2424
<dependencies><required><php><min>5.3.0</min><max>6.0.0</max></php></required></dependencies>
2525
</package>

0 commit comments

Comments
 (0)