Skip to content

Commit

Permalink
Merge pull request #16 from magently/master
Browse files Browse the repository at this point in the history
New version: 0.7.5
  • Loading branch information
tilsammans committed Nov 27, 2015
2 parents de43a5a + 86f6a2b commit 673cbbd
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 18 deletions.
12 changes: 7 additions & 5 deletions app/code/community/Sign2pay/Payment/Model/Processor.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,11 @@ public function performPayment(array $initial_response)
return $this->processPaymentCaptureResponse($payment);
}
catch (Exception $e) {
Mage::logException($e);
Mage::getSingleton('checkout/session')->addError($e->getMessage());
return Mage::app()->getResponse()->setRedirect('cancel', array('_secure'=>true));

$this->cancel();
return Mage::app()->getResponse()->setRedirect('failure', array('_secure'=>true));
}
}

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

/**
* Cancel the order
*
* @param Mage_Sales_Model_Order $order
*/
public function cancel(Mage_Sales_Model_Order $order)
public function cancel()
{
$order->cancel()->save();
Mage::helper('sign2pay')->setStatusOnOrder($this->_order, 'Canceled');
$this->_order->cancel()->save();

return $this;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,7 @@ public function cancelAction()
$session = Mage::getSingleton('checkout/session');
$session->setQuoteId($session->getSign2payQuoteId(true));
if ($session->getLastRealOrderId()) {
$order = Mage::getModel('sales/order')->loadByIncrementId($session->getLastRealOrderId());
if ($order->getId()) {
Mage::getModel('sign2pay/processor')->cancel($order);
}
Mage::helper('sign2pay/checkout')->restoreQuote();
Mage::getSingleton('checkout/session')->addError("The payment has been cancelled.");

}
$this->_redirect('checkout/cart');
}
Expand Down
2 changes: 1 addition & 1 deletion app/code/community/Sign2pay/Payment/etc/config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<config>
<modules>
<Sign2pay_Payment>
<version>0.7.4</version>
<version>0.7.5</version>
</Sign2pay_Payment>
</modules>

Expand Down
12 changes: 6 additions & 6 deletions package.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<package>
<name>Sign2Pay_Mobile_Payments</name>
<version>0.7.4</version>
<version>0.7.5</version>
<stability>beta</stability>
<license>Sign2Pay Commercial License</license>
<channel>community</channel>
Expand All @@ -13,13 +13,13 @@ Analysing hundreds of data points in a single signature, Sign2Pay provides the s
&#xD;
Compatible with: 1.7, 1.8, 1.9</description>
<notes>Changes:&#xD;
- Add dynamic bank logo to payment method label&#xD;
- Add mobile phone number to authorize request&#xD;
- Simplify order cancelation workflow during payment&#xD;
- Change logo url in admin section&#xD;
</notes>
<authors><author><name>Sign2Pay</name><user>Sign2Pay</user><email>[email protected]</email></author></authors>
<date>2015-11-24</date>
<time>15:36:47</time>
<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>
<date>2015-11-27</date>
<time>11:26:56</time>
<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>
<compatible/>
<dependencies><required><php><min>5.3.0</min><max>6.0.0</max></php></required></dependencies>
</package>

0 comments on commit 673cbbd

Please sign in to comment.