CoinGate_For_Magento - Version 1.0.6

Version Notes

* Update API urls
* Update order cancel action functionality

Download this release

Release Info

Developer CoinGate
Extension CoinGate_For_Magento
Version 1.0.6
Comparing to
See all releases


Code changes from version 1.0.5 to 1.0.6

app/code/community/Mage/Coingate/Model/CoingateFactory.php CHANGED
@@ -2,7 +2,7 @@
2
 
3
  require_once(Mage::getBaseDir() . '/app/code/community/Mage/Coingate/lib/coingate_merchant.class.php');
4
 
5
- define('COINGATE_MAGENTO_VERSION', '1.0.5');
6
 
7
  class Mage_Coingate_Model_CoingateFactory extends Mage_Payment_Model_Method_Abstract
8
  {
2
 
3
  require_once(Mage::getBaseDir() . '/app/code/community/Mage/Coingate/lib/coingate_merchant.class.php');
4
 
5
+ define('COINGATE_MAGENTO_VERSION', '1.0.6');
6
 
7
  class Mage_Coingate_Model_CoingateFactory extends Mage_Payment_Model_Method_Abstract
8
  {
app/code/community/Mage/Coingate/controllers/PayController.php CHANGED
@@ -33,6 +33,14 @@ class Mage_Coingate_PayController extends Mage_Core_Controller_Front_Action
33
  {
34
  $session = Mage::getSingleton('checkout/session');
35
  $session->setQuoteId($session->getPayQuoteId(TRUE));
 
 
 
 
 
 
 
 
36
  $this->_redirect('checkout/cart');
37
  }
38
 
@@ -50,7 +58,7 @@ class Mage_Coingate_PayController extends Mage_Core_Controller_Front_Action
50
  $order->load(Mage::getSingleton('checkout/session')->getLastOrderId());
51
 
52
  if ($order->getId()) {
53
- $order->setStatus('canceled')->save();
54
  }
55
 
56
  $this->_redirect('checkout/onepage/failure');
33
  {
34
  $session = Mage::getSingleton('checkout/session');
35
  $session->setQuoteId($session->getPayQuoteId(TRUE));
36
+
37
+ $order = Mage::getModel('sales/order');
38
+ $order->load($session->getLastOrderId());
39
+
40
+ if ($order->getId()) {
41
+ $order->cancel()->save();
42
+ }
43
+
44
  $this->_redirect('checkout/cart');
45
  }
46
 
58
  $order->load(Mage::getSingleton('checkout/session')->getLastOrderId());
59
 
60
  if ($order->getId()) {
61
+ $order->cancel()->save();
62
  }
63
 
64
  $this->_redirect('checkout/onepage/failure');
app/code/community/Mage/Coingate/etc/config.xml CHANGED
@@ -2,7 +2,7 @@
2
  <config>
3
  <modules>
4
  <Mage_Coingate>
5
- <version>1.0.5</version>
6
  </Mage_Coingate>
7
  </modules>
8
 
2
  <config>
3
  <modules>
4
  <Mage_Coingate>
5
+ <version>1.0.6</version>
6
  </Mage_Coingate>
7
  </modules>
8
 
app/code/community/Mage/Coingate/etc/system.xml CHANGED
@@ -76,7 +76,7 @@
76
  <label>Test mode?</label>
77
  <frontend_type>select</frontend_type>
78
  <source_model>adminhtml/system_config_source_yesno</source_model>
79
- <tooltip>Live (coingate.com) is for production and Sandbox (sandbox.coingate.com) is for testing purpose.</tooltip>
80
  <sort_order>8</sort_order>
81
  <show_in_default>1</show_in_default>
82
  <show_in_website>1</show_in_website>
76
  <label>Test mode?</label>
77
  <frontend_type>select</frontend_type>
78
  <source_model>adminhtml/system_config_source_yesno</source_model>
79
+ <tooltip>Live (coingate.com) is for production and Sandbox (sandbox.coingate.com) is for testing purpose. Please note, that for "Test mode" you must generate separate API credentials on sandbox.coingate.com. API credentials generated on coingate.com will not work for "Test mode".</tooltip>
80
  <sort_order>8</sort_order>
81
  <show_in_default>1</show_in_default>
82
  <show_in_website>1</show_in_website>
app/code/community/Mage/Coingate/lib/coingate_merchant.class.php CHANGED
@@ -106,7 +106,7 @@ class CoingateMerchant {
106
 
107
  private function set_api_url()
108
  {
109
- $this->api_url = strtolower($this->mode) == 'live' ? 'https://coingate.com/api/' : 'https://sandbox.coingate.com/api/';
110
  $this->api_url .= $this->version;
111
  }
112
  }
106
 
107
  private function set_api_url()
108
  {
109
+ $this->api_url = strtolower($this->mode) == 'live' ? 'https://api.coingate.com/' : 'https://api-sandbox.coingate.com/';
110
  $this->api_url .= $this->version;
111
  }
112
  }
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>CoinGate_For_Magento</name>
4
- <version>1.0.5</version>
5
  <stability>stable</stability>
6
  <license uri="https://github.com/coingate/magento-plugin/blob/master/LICENSE">MITL</license>
7
  <channel>community</channel>
@@ -27,12 +27,12 @@ After the customer pays the invoice, the merchant receives 19.80 euro (20 euro m
27
  &#xD;
28
  To be able to use the plugin you have to create an account on &lt;a href="https://coingate.com" target="_blank"&gt;https://coingate.com&lt;/a&gt;&#xD;
29
  </description>
30
- <notes>* Remove CoinGate logs&#xD;
31
- * Allow to relate CoinGate - Magento payment statuses</notes>
32
  <authors><author><name>CoinGate</name><user>coingate</user><email>info@coingate.com</email></author></authors>
33
- <date>2016-11-09</date>
34
- <time>12:02:24</time>
35
- <contents><target name="magecommunity"><dir name="Mage"><dir name="Coingate"><dir name="Block"><file name="Callback.php" hash="ad228ee9b00f327052a72246fe76b339"/><file name="Form.php" hash="ab93f50ac62fab7b986ccfe4732d63e4"/><file name="Redirect.php" hash="21b349e960636fd441b35d42facaf17d"/></dir><dir name="Model"><file name="CoingateFactory.php" hash="d48055139aa587eaf9490173e83493dd"/><file name="ReceiveCurrencies.php" hash="94f7f39c759012b8e75ec8e6846cae5f"/></dir><dir name="controllers"><file name="PayController.php" hash="ffe09d0ff067e5247351990255d0c472"/></dir><dir name="etc"><file name="config.xml" hash="fe380e522cf7a8c00124f0d282dd8a9a"/><file name="system.xml" hash="dd8cdc7665dc165d18137047670109bf"/></dir><dir name="lib"><file name="coingate_merchant.class.php" hash="af5eb495a82c48d703f2acd45f07cf8a"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Mage_Coingate.xml" hash="cc8a4080d714fd0c50eadf91a77be49c"/></dir></target></contents>
36
  <compatible/>
37
  <dependencies><required><php><min>5.0.0</min><max>7.0.0</max></php></required></dependencies>
38
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>CoinGate_For_Magento</name>
4
+ <version>1.0.6</version>
5
  <stability>stable</stability>
6
  <license uri="https://github.com/coingate/magento-plugin/blob/master/LICENSE">MITL</license>
7
  <channel>community</channel>
27
  &#xD;
28
  To be able to use the plugin you have to create an account on &lt;a href="https://coingate.com" target="_blank"&gt;https://coingate.com&lt;/a&gt;&#xD;
29
  </description>
30
+ <notes>* Update API urls&#xD;
31
+ * Update order cancel action functionality</notes>
32
  <authors><author><name>CoinGate</name><user>coingate</user><email>info@coingate.com</email></author></authors>
33
+ <date>2017-04-18</date>
34
+ <time>11:58:01</time>
35
+ <contents><target name="magecommunity"><dir name="Mage"><dir name="Coingate"><dir name="Block"><file name="Callback.php" hash="ad228ee9b00f327052a72246fe76b339"/><file name="Form.php" hash="ab93f50ac62fab7b986ccfe4732d63e4"/><file name="Redirect.php" hash="21b349e960636fd441b35d42facaf17d"/></dir><dir name="Model"><file name="CoingateFactory.php" hash="d698d9c29761ae8e7c68b279d62ed3e2"/><file name="ReceiveCurrencies.php" hash="94f7f39c759012b8e75ec8e6846cae5f"/></dir><dir name="controllers"><file name="PayController.php" hash="3d2635fa3a2dac26b5289699f1010b9a"/></dir><dir name="etc"><file name="config.xml" hash="5cc245db13cd3781f7ba714f461e7b51"/><file name="system.xml" hash="c796ca7a6c0259b3a09e64e06eef60d9"/></dir><dir name="lib"><file name="coingate_merchant.class.php" hash="8dc30b243cda139f3fa7f4dc44c6f583"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Mage_Coingate.xml" hash="cc8a4080d714fd0c50eadf91a77be49c"/></dir></target></contents>
36
  <compatible/>
37
  <dependencies><required><php><min>5.0.0</min><max>7.0.0</max></php></required></dependencies>
38
  </package>