Payson - Version 1.0.1

Version Notes

* When order is cancelled product is credited to inventory
* Cart is now restored when returning from Payson and payment failed

Download this release

Release Info

Developer Oscar Villegas
Extension Payson
Version 1.0.1
Comparing to
See all releases


Code changes from version 1.0.0 to 1.0.1

app/code/community/Payson/Payson/Helper/Api.php CHANGED
@@ -846,7 +846,7 @@ LIMIT
846
  }
847
 
848
  case self::STATUS_ERROR:
849
-
850
  $order->cancel();
851
 
852
  $order->addStatusHistoryComment($helper->__('The order was denied by Payson.'));
@@ -857,7 +857,7 @@ LIMIT
857
  case self::STATUS_EXPIRED:
858
  case self::STATUS_REVERSALERROR:
859
  default: {
860
- $order->cancel();
861
  }
862
  }
863
 
846
  }
847
 
848
  case self::STATUS_ERROR:
849
+
850
  $order->cancel();
851
 
852
  $order->addStatusHistoryComment($helper->__('The order was denied by Payson.'));
857
  case self::STATUS_EXPIRED:
858
  case self::STATUS_REVERSALERROR:
859
  default: {
860
+ $order->cancel();
861
  }
862
  }
863
 
app/code/community/Payson/Payson/Model/Config.php CHANGED
@@ -216,5 +216,6 @@ class Payson_Payson_Model_Config {
216
 
217
  return $configValue == 1;
218
  }
 
219
  }
220
 
216
 
217
  return $configValue == 1;
218
  }
219
+
220
  }
221
 
app/code/community/Payson/Payson/controllers/CheckoutController.php CHANGED
@@ -102,6 +102,7 @@ class Payson_Payson_CheckoutController extends Mage_Core_Controller_Front_Action
102
  case 'ERROR': {
103
  $errorMessage = Mage::helper('payson')->__('The payment was denied by Payson. Please, try a different payment method');
104
  Mage::getSingleton('core/session')->addError($errorMessage);
 
105
  if ($config->restoreCartOnError())
106
  $this->restoreCart();
107
 
102
  case 'ERROR': {
103
  $errorMessage = Mage::helper('payson')->__('The payment was denied by Payson. Please, try a different payment method');
104
  Mage::getSingleton('core/session')->addError($errorMessage);
105
+ $this->CancelOrder($errorMessage);
106
  if ($config->restoreCartOnError())
107
  $this->restoreCart();
108
 
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Payson</name>
4
- <version>1.0.0</version>
5
  <stability>stable</stability>
6
  <license>BSD</license>
7
  <channel>community</channel>
@@ -16,8 +16,8 @@
16
  * Cart is now restored when returning from Payson and payment failed</notes>
17
  <authors><author><name>Daniel Hansen</name><user>PaysonAB</user><email>integration@payson.se</email></author></authors>
18
  <date>2013-05-28</date>
19
- <time>13:26:26</time>
20
- <contents><target name="mage"><dir name="app"><dir name="code"><dir name="community"><dir name="Payson"><dir name="Payson"><dir name="Block"><file name="Form.php" hash="5ad3b8115583fbd8b5fd0ac24440325b"/><dir name="Invoice"><file name="Form.php" hash="8e9bc849ecbb21c3cdf709b2ba074a87"/></dir><dir name="Order"><dir name="Totals"><file name="Fee.php" hash="0ea99606a8f5e80a2a5f80208c683e44"/></dir></dir><dir name="Standard"><file name="Form.php" hash="eb63196829d96c6da7309eadd87c707e"/></dir></dir><dir name="Helper"><dir name="Api"><dir name="Response"><file name="Interface.php" hash="50bda3e73b646165c325e5aa38811554"/><dir name="Standard"><file name="Parameters.php" hash="3fa48fd19ca86ce96613047038e70a2f"/></dir><file name="Standard.php" hash="8d4a4960a8110338a2a0f9b162b52b37"/><file name="Validate.php" hash="35d82eef0cf69983f3ffd9fcc3692e25"/></dir></dir><file name="Api.php" hash="2f85ea4724e4fad6ea6cd15f7ddf55ed"/><file name="Data.php" hash="3e3492d7136d77ff61876d2b4d729c20"/></dir><dir name="Model"><file name="Config.php" hash="d39090c646bc4d973d30084a21ca0353"/><dir name="Method"><file name="Abstract.php" hash="55be4eda8833b5434ffb30beb61e32f5"/><file name="Invoice.php" hash="4a97c381dc250e1b0e0e3084057c356a"/><file name="Standard.php" hash="48b4aa062bf5490937c6c68de0b79a2b"/></dir><dir name="Mysql4"><file name="Setup.php" hash="64d97efb592c665290ae4a13015c2df5"/></dir><dir name="Order"><dir name="Creditmemo"><dir name="Total"><file name="Invoice.php" hash="883c7d27f035a9284c6624a741a3fe31"/></dir></dir><dir name="Invoice"><dir name="Total"><file name="Invoice.php" hash="c357815cc2eeb6836946ea3a13528029"/></dir></dir></dir><dir name="Quote"><dir name="Address"><dir name="Total"><file name="Invoice.php" hash="423a7c2f9a61e47b8d8a0155d624488a"/></dir></dir></dir><file name="Standard.php" hash="a154909d27639455270b9c2d1a22b1bc"/></dir><dir name="controllers"><dir name="Adminhtml"><dir name="Sales"><dir name="Order"><file name="ShipmentController.php" hash="56118704e788b2b53086f7c9be71c996"/></dir></dir></dir><file name="CheckoutController.php" hash="d8dfb135ada18c213052e3dc613c34e7"/><file name="IpnController.php" hash="9b724b278793d5fc8e64f0a49f7914c7"/></dir><dir name="etc"><file name="config.xml" hash="c2ac51d643757dc151591b2834088378"/><file name="system.xml" hash="80254a7bf100e003d15b3f47ffbe06e5"/></dir><dir name="sql"><dir name="payson_setup"><file name="mysql4-install-0.1.0.php" hash="8422dccd6ccb5ce214f17bfa8ae08bd3"/><file name="mysql4-upgrade-0.1.0-0.1.2.php" hash="cc846d866a93167c79d3286f512e6bf6"/></dir></dir></dir></dir></dir></dir><dir name="design"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="Payson"><dir name="Payson"><file name="total.phtml" hash="795e38fb672ffd23f38ed28578c7ee2f"/></dir></dir><dir name="layout"><file name="Payson.xml" hash=""/></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="Payson"><dir name="Payson"><file name="invoice_form.phtml" hash="2b69133eb3c04f582535e3a80ba76229"/><file name="standard_form.phtml" hash="147fd545564940747b2e8a85a23c1dd6"/></dir></dir></dir><dir name="layout"><file name="Payson.xml" hash=""/></dir></dir></dir></dir></dir><dir name="etc"><dir name="modules"><file name="Payson_Payson.xml" hash=""/></dir></dir><dir name="locale"><dir name="sv_SE"><file name="Payson_Payson.csv" hash=""/></dir></dir></dir><dir name="skin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="Payson"><dir name="Payson"><file name="payson.gif" hash="638d0055cbc1a4bdc32e9fa1156b722a"/><file name="payson.png" hash="308916345711a4520313c94218c5bda7"/><file name="payson_faktura.png" hash="fa218c9949c05c6f3452d9f4c541da2c"/></dir></dir></dir></dir></dir></dir></target></contents>
21
  <compatible/>
22
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
23
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Payson</name>
4
+ <version>1.0.1</version>
5
  <stability>stable</stability>
6
  <license>BSD</license>
7
  <channel>community</channel>
16
  * Cart is now restored when returning from Payson and payment failed</notes>
17
  <authors><author><name>Daniel Hansen</name><user>PaysonAB</user><email>integration@payson.se</email></author></authors>
18
  <date>2013-05-28</date>
19
+ <time>13:52:33</time>
20
+ <contents><target name="mage"><dir name="app"><dir name="code"><dir name="community"><dir name="Payson"><dir name="Payson"><dir name="Block"><file name="Form.php" hash="5ad3b8115583fbd8b5fd0ac24440325b"/><dir name="Invoice"><file name="Form.php" hash="8e9bc849ecbb21c3cdf709b2ba074a87"/></dir><dir name="Order"><dir name="Totals"><file name="Fee.php" hash="0ea99606a8f5e80a2a5f80208c683e44"/></dir></dir><dir name="Standard"><file name="Form.php" hash="eb63196829d96c6da7309eadd87c707e"/></dir></dir><dir name="Helper"><dir name="Api"><dir name="Response"><file name="Interface.php" hash="50bda3e73b646165c325e5aa38811554"/><dir name="Standard"><file name="Parameters.php" hash="3fa48fd19ca86ce96613047038e70a2f"/></dir><file name="Standard.php" hash="8d4a4960a8110338a2a0f9b162b52b37"/><file name="Validate.php" hash="35d82eef0cf69983f3ffd9fcc3692e25"/></dir></dir><file name="Api.php" hash="aaa51ed3ad24973b3a49767547c132f1"/><file name="Data.php" hash="3e3492d7136d77ff61876d2b4d729c20"/></dir><dir name="Model"><file name="Config.php" hash="0da5e7697ba63c4aa759ed418fed65dc"/><dir name="Method"><file name="Abstract.php" hash="55be4eda8833b5434ffb30beb61e32f5"/><file name="Invoice.php" hash="4a97c381dc250e1b0e0e3084057c356a"/><file name="Standard.php" hash="48b4aa062bf5490937c6c68de0b79a2b"/></dir><dir name="Mysql4"><file name="Setup.php" hash="64d97efb592c665290ae4a13015c2df5"/></dir><dir name="Order"><dir name="Creditmemo"><dir name="Total"><file name="Invoice.php" hash="883c7d27f035a9284c6624a741a3fe31"/></dir></dir><dir name="Invoice"><dir name="Total"><file name="Invoice.php" hash="c357815cc2eeb6836946ea3a13528029"/></dir></dir></dir><dir name="Quote"><dir name="Address"><dir name="Total"><file name="Invoice.php" hash="423a7c2f9a61e47b8d8a0155d624488a"/></dir></dir></dir><file name="Standard.php" hash="a154909d27639455270b9c2d1a22b1bc"/></dir><dir name="controllers"><dir name="Adminhtml"><dir name="Sales"><dir name="Order"><file name="ShipmentController.php" hash="56118704e788b2b53086f7c9be71c996"/></dir></dir></dir><file name="CheckoutController.php" hash="9baf383b10822197e6f6c07d3bcd6033"/><file name="IpnController.php" hash="9b724b278793d5fc8e64f0a49f7914c7"/></dir><dir name="etc"><file name="config.xml" hash="c2ac51d643757dc151591b2834088378"/><file name="system.xml" hash="80254a7bf100e003d15b3f47ffbe06e5"/></dir><dir name="sql"><dir name="payson_setup"><file name="mysql4-install-0.1.0.php" hash="8422dccd6ccb5ce214f17bfa8ae08bd3"/><file name="mysql4-upgrade-0.1.0-0.1.2.php" hash="cc846d866a93167c79d3286f512e6bf6"/></dir></dir></dir></dir></dir></dir><dir name="design"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="Payson"><dir name="Payson"><file name="total.phtml" hash="795e38fb672ffd23f38ed28578c7ee2f"/></dir></dir><dir name="layout"><file name="Payson.xml" hash=""/></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="Payson"><dir name="Payson"><file name="invoice_form.phtml" hash="2b69133eb3c04f582535e3a80ba76229"/><file name="standard_form.phtml" hash="147fd545564940747b2e8a85a23c1dd6"/></dir></dir></dir><dir name="layout"><file name="Payson.xml" hash=""/></dir></dir></dir></dir></dir><dir name="etc"><dir name="modules"><file name="Payson_Payson.xml" hash=""/></dir></dir><dir name="locale"><dir name="sv_SE"><file name="Payson_Payson.csv" hash=""/></dir></dir></dir><dir name="skin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="Payson"><dir name="Payson"><file name="payson.gif" hash="638d0055cbc1a4bdc32e9fa1156b722a"/><file name="payson.png" hash="308916345711a4520313c94218c5bda7"/><file name="payson_faktura.png" hash="fa218c9949c05c6f3452d9f4c541da2c"/></dir></dir></dir></dir></dir></dir></target></contents>
21
  <compatible/>
22
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
23
  </package>