Cardgate_Cgp - Version 1.0.31

Version Notes

- Added Instruction field to Bank Transfer payment method.

Download this release

Release Info

Developer Magento Core Team
Extension Cardgate_Cgp
Version 1.0.31
Comparing to
See all releases


Code changes from version 1.0.30 to 1.0.31

app/code/local/Cardgate/Cgp/Block/Form/Banktransfer.php ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento CardGatePlus payment extension
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ *
12
+ * @category Mage
13
+ * @package Cardgate_Cgp
14
+ * @author Richard schoots, <support@cardgate.com>
15
+ * @copyright Copyright (c) 2015 CardGatePlus B.V. (http://www.cardgateplus.com)
16
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
17
+ */
18
+
19
+ class Cardgate_Cgp_Block_Form_Banktransfer extends Mage_Payment_Block_Form
20
+ {
21
+
22
+ protected function _construct()
23
+ {
24
+ parent::_construct();
25
+ $this->setTemplate('cardgate/cgp/form/banktransfer.phtml');
26
+ }
27
+
28
+ /**
29
+ * Return information payment object
30
+ *
31
+ * @return Mage_Payment_Model_Info
32
+ */
33
+ public function getInfoInstance()
34
+ {
35
+ return $this->getMethod()->getInfoInstance();
36
+ }
37
+
38
+ /**
39
+ * Returns HTML options for select field with iDEAL banks
40
+ *
41
+ * @return string
42
+ */
43
+ public function getInstructions()
44
+ {
45
+ $settings = Mage::getStoreConfig( 'cgp/cgp_banktransfer' );
46
+ return trim($settings['instructions']);
47
+ }
48
+ }
app/code/local/Cardgate/Cgp/Block/Form/Ideal.php CHANGED
@@ -67,7 +67,7 @@ class Cardgate_Cgp_Block_Form_Ideal extends Mage_Payment_Block_Form
67
  'class' => 'required-entry',
68
  'label' => Mage::helper('cgp')->__('Select your bank'),
69
  'values' => $a2,
70
- 'value' => '',
71
  'required' => true,
72
  'disabled' => false,
73
  ));
@@ -79,18 +79,18 @@ class Cardgate_Cgp_Block_Form_Ideal extends Mage_Payment_Block_Form
79
  *
80
  * @return array
81
  */
82
-
83
- private function getBankOptions(){
84
- $url = 'https://gateway.cardgateplus.com/cache/idealDirectoryRabobank.dat';
85
- if( !ini_get('allow_url_fopen') || !function_exists('file_get_contents') ) {
86
- $result = false;
87
- } else {
88
- $result = file_get_contents($url);
89
- }
90
-
91
- $aBanks = array();
92
-
93
- if ($result) {
94
  $aBanks = unserialize($result);
95
  unset($aBanks[0]);
96
  $a2 = array();
@@ -99,11 +99,11 @@ class Cardgate_Cgp_Block_Form_Ideal extends Mage_Payment_Block_Form
99
  $a2[$id] = $name;
100
  }
101
  $aBanks = $a2;
102
- $aBanks = array_merge(array(''=>Mage::helper('cgp')->__('--Please select--')),$aBanks);
103
- }
104
- if (count($aBanks)< 1) {
105
- $aBanks = array_merge(array(''=>Mage::helper('cgp')->__('--Please select--')),$this->_banks);
106
- }
107
- return $aBanks;
108
  }
109
  }
67
  'class' => 'required-entry',
68
  'label' => Mage::helper('cgp')->__('Select your bank'),
69
  'values' => $a2,
70
+ 'value' => '',
71
  'required' => true,
72
  'disabled' => false,
73
  ));
79
  *
80
  * @return array
81
  */
82
+
83
+ private function getBankOptions(){
84
+ $url = 'https://gateway.cardgateplus.com/cache/idealDirectoryRabobank.dat';
85
+ if( !ini_get('allow_url_fopen') || !function_exists('file_get_contents') ) {
86
+ $result = false;
87
+ } else {
88
+ $result = file_get_contents($url);
89
+ }
90
+
91
+ $aBanks = array();
92
+
93
+ if ($result) {
94
  $aBanks = unserialize($result);
95
  unset($aBanks[0]);
96
  $a2 = array();
99
  $a2[$id] = $name;
100
  }
101
  $aBanks = $a2;
102
+ $aBanks = array_merge(array(''=>Mage::helper('cgp')->__('--Please select--')),$aBanks);
103
+ }
104
+ if (count($aBanks)< 1) {
105
+ $aBanks = array_merge(array(''=>Mage::helper('cgp')->__('--Please select--')),$this->_banks);
106
+ }
107
+ return $aBanks;
108
  }
109
  }
app/code/local/Cardgate/Cgp/Model/Gateway/Abstract.php CHANGED
@@ -206,7 +206,7 @@ abstract class Cardgate_Cgp_Model_Gateway_Abstract extends Mage_Payment_Model_Me
206
  $session = Mage::getSingleton( 'checkout/session' );
207
  $extra_data = $session->_additional_information;
208
  $order = $this->getOrder();
209
-
210
  if (!$this->getConfigData( 'orderemail_at_payment' )){
211
  $order->sendNewOrderEmail();
212
  $order->setEmailSent( true );
206
  $session = Mage::getSingleton( 'checkout/session' );
207
  $extra_data = $session->_additional_information;
208
  $order = $this->getOrder();
209
+
210
  if (!$this->getConfigData( 'orderemail_at_payment' )){
211
  $order->sendNewOrderEmail();
212
  $order->setEmailSent( true );
app/code/local/Cardgate/Cgp/Model/Gateway/Banktransfer.php CHANGED
@@ -20,4 +20,5 @@ class Cardgate_Cgp_Model_Gateway_Banktransfer extends Cardgate_Cgp_Model_Gateway
20
  {
21
  protected $_code = 'cgp_banktransfer';
22
  protected $_model = 'banktransfer';
 
23
  }
20
  {
21
  protected $_code = 'cgp_banktransfer';
22
  protected $_model = 'banktransfer';
23
+ protected $_formBlockType = 'cgp/form_banktransfer';
24
  }
app/code/local/Cardgate/Cgp/controllers/StandardController.php CHANGED
@@ -121,7 +121,7 @@ class Cardgate_Cgp_StandardController extends Mage_Core_Controller_Front_Action
121
  } else {
122
  $quote = Mage::getModel( 'sales/quote' )->load( $session->getCardgateQuoteId() );
123
  }
124
- */
125
  $quote = Mage::getModel( 'sales/quote' )->load( $session->getCardgateQuoteId() );
126
 
127
  if ( $quote->getId() ) {
121
  } else {
122
  $quote = Mage::getModel( 'sales/quote' )->load( $session->getCardgateQuoteId() );
123
  }
124
+ */
125
  $quote = Mage::getModel( 'sales/quote' )->load( $session->getCardgateQuoteId() );
126
 
127
  if ( $quote->getId() ) {
app/code/local/Cardgate/Cgp/etc/config.xml CHANGED
@@ -20,7 +20,7 @@
20
  <config>
21
  <modules>
22
  <Cardgate_Cgp>
23
- <version>1.0.30</version>
24
  </Cardgate_Cgp>
25
  </modules>
26
 
20
  <config>
21
  <modules>
22
  <Cardgate_Cgp>
23
+ <version>1.0.31</version>
24
  </Cardgate_Cgp>
25
  </modules>
26
 
app/code/local/Cardgate/Cgp/etc/system.xml CHANGED
@@ -948,17 +948,25 @@
948
  <show_in_store>1</show_in_store>
949
  </active>
950
  <title translate="label">
951
- <label>Title</label>
952
  <frontend_type>text</frontend_type>
953
  <sort_order>10</sort_order>
954
  <show_in_default>1</show_in_default>
955
  <show_in_website>1</show_in_website>
956
  <show_in_store>1</show_in_store>
957
  </title>
 
 
 
 
 
 
 
 
958
  <allowspecific translate="label">
959
  <label>Payment from applicable countries</label>
960
  <frontend_type>allowspecific</frontend_type>
961
- <sort_order>20</sort_order>
962
  <source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model>
963
  <show_in_default>1</show_in_default>
964
  <show_in_website>1</show_in_website>
@@ -967,7 +975,7 @@
967
  <specificcountry translate="label">
968
  <label>Payment from Specific countries</label>
969
  <frontend_type>multiselect</frontend_type>
970
- <sort_order>30</sort_order>
971
  <source_model>adminhtml/system_config_source_country</source_model>
972
  <show_in_default>1</show_in_default>
973
  <show_in_website>1</show_in_website>
948
  <show_in_store>1</show_in_store>
949
  </active>
950
  <title translate="label">
951
+ <label>Titles</label>
952
  <frontend_type>text</frontend_type>
953
  <sort_order>10</sort_order>
954
  <show_in_default>1</show_in_default>
955
  <show_in_website>1</show_in_website>
956
  <show_in_store>1</show_in_store>
957
  </title>
958
+ <instructions translate="label">
959
+ <label>Instructions</label>
960
+ <frontend_type>textarea</frontend_type>
961
+ <sort_order>20</sort_order>
962
+ <show_in_default>1</show_in_default>
963
+ <show_in_website>1</show_in_website>
964
+ <show_in_store>1</show_in_store>
965
+ </instructions>
966
  <allowspecific translate="label">
967
  <label>Payment from applicable countries</label>
968
  <frontend_type>allowspecific</frontend_type>
969
+ <sort_order>30</sort_order>
970
  <source_model>adminhtml/system_config_source_payment_allspecificcountries</source_model>
971
  <show_in_default>1</show_in_default>
972
  <show_in_website>1</show_in_website>
975
  <specificcountry translate="label">
976
  <label>Payment from Specific countries</label>
977
  <frontend_type>multiselect</frontend_type>
978
+ <sort_order>40</sort_order>
979
  <source_model>adminhtml/system_config_source_country</source_model>
980
  <show_in_default>1</show_in_default>
981
  <show_in_website>1</show_in_website>
app/design/frontend/base/default/template/cardgate/cgp/form/banktransfer.phtml ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento CardGatePlus payment extension
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ *
12
+ * @category Mage
13
+ * @package CardGate_Payment
14
+ * @author Richard Schoots, <support@cardgate.com>
15
+ * @copyright Copyright (c) 2015 CardGatePlus B.V. (http://www.cardgateplus.com)
16
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
17
+ */
18
+ ?>
19
+ <?php $_code=$this->getMethodCode() ?>
20
+
21
+ <ul class="form-list checkout-agreements" id="payment_form_<?php echo $_code ?>" style="display:none;">
22
+ <li>
23
+ <?php if ($this->getinstructions() ){ ?>
24
+ <div class="banktransfer-instructions-content agreement-content">
25
+ <?php echo $this->getInstructions(); ?>
26
+ </div>
27
+ <?php } ?>
28
+ </li>
29
+ </ul>
30
+
app/locale/nl_NL/Cardgate_Cgp.csv CHANGED
@@ -76,4 +76,5 @@
76
  "Invoice fee tax class","Factuurkosten BTW class"
77
  "The tax class to use to calculate the invoice fee tax","De BTW class die gebruikt wordt voor het berekenen van de factuurkosten BTW."
78
  "Send Order Email at payment","Verstuur bestelling Email bij betaling"
79
- "Send Order Email only after payment completion.","Verstuur de bestelling Email pas als de betaling afgerond is."
 
76
  "Invoice fee tax class","Factuurkosten BTW class"
77
  "The tax class to use to calculate the invoice fee tax","De BTW class die gebruikt wordt voor het berekenen van de factuurkosten BTW."
78
  "Send Order Email at payment","Verstuur bestelling Email bij betaling"
79
+ "Send Order Email only after payment completion.","Verstuur de bestelling Email pas als de betaling afgerond is."
80
+ "Instructions","Instructies"
package.xml CHANGED
@@ -1,18 +1,18 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Cardgate_Cgp</name>
4
- <version>1.0.30</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>Card Gate Plus Payment Module</summary>
10
  <description>Card Gate Plus is a Payment Service Provider from the Netherlands. We offer various payment methods against competitive rates.</description>
11
- <notes>- option to send Order e-mail only at payment completion.</notes>
12
  <authors><author><name>Richard Schoots</name><user>auto-converted</user><email>support@cardgate.com</email></author></authors>
13
- <date>2014-12-11</date>
14
- <time>15:34:25</time>
15
- <contents><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="images"><dir name="cardgate"><file name="cardgate_cgp.png" hash="b97b15baba0b27042733c8ea4b4fb6bc"/></dir></dir><file name="cardgate_cgp.css" hash="bebfc13fca1b36867c17864ae70fdabd"/></dir></dir></dir></target><target name="magelocale"><dir name="nl_NL"><file name="Cardgate_Cgp.csv" hash="65b0c7a55b855a75633f42494d0e30ca"/></dir></target><target name="mageetc"><dir name="modules"><file name="Cardgate_Cgp.xml" hash="c7a72af045f4b737b50cc6c360d4300d"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="cardgate"><dir name="cgp"><dir name="form"><file name="ideal.phtml" hash="42fdfee86ba3a098f5f73e9240332581"/><file name="klarna.phtml" hash="590c98ab018c474e8e4dc65e9199ba85"/><file name="klarnaaccount.phtml" hash="419f88941703c8562369844bb6a1d692"/></dir><file name="redirect.phtml" hash="ecb2b0a854cd6358adeba535f8889046"/></dir></dir></dir></dir></dir></dir></target><target name="magelocal"><dir name="Cardgate"><dir name="Cgp"><dir name="Block"><dir name="Form"><file name="Ideal.php" hash="286d495abf8a0876182b4a5012b5f567"/><file name="Klarna.php" hash="9bdbe1886bcdb283b86b6d208c3aa712"/><file name="Klarnaaccount.php" hash="0b4b84d9c472e815a30d5977ac53c932"/></dir><file name="Redirect.php" hash="668b52ec0c5fba7f42223d4e40a99987"/></dir><dir name="Helper"><file name="Data.php" hash="c94c725de2e14dc8019323c1ecf08962"/></dir><dir name="Model"><dir name="Adminhtml"><dir name="System"><dir name="Config"><dir name="Source"><file name="Languages.php" hash="4fe09e45e3d9f3866d4b7c8437832972"/><file name="Modes.php" hash="888158f9118ba5087357d5c1ad8514d4"/></dir></dir></dir></dir><dir name="Gateway"><file name="Abstract.php" hash="ef5fc7a9e77162c8895803f6f3ab821b"/><file name="Americanexpress.php" hash="63988a4b6ec2b92c41115bac80b489c0"/><file name="Banktransfer.php" hash="a5e4a42135b0e8da48941869bb0b1435"/><file name="Default.php" hash="956d1ff0c2cfe0698efc23277e602cec"/><file name="Directdebit.php" hash="6ecd143d3d0b91c818fd8a9bf3858d0f"/><file name="Giropay.php" hash="aff19feafd61a08e3e298a865d52c3d5"/><file name="Ideal.php" hash="8ba0ccae24cde16a65ec17b462a64b6d"/><file name="Klarna.php" hash="330efb073aba572606b1f25b597bb106"/><file name="Klarnaaccount.php" hash="2012566e77136f823e965c8811321ea3"/><file name="Maestro.php" hash="b2887cc1de0590ab78e4373324924486"/><file name="Mastercard.php" hash="f1bfabcc244175c3e691e1707a541415"/><file name="Mistercash.php" hash="cc750b3e2d0cab9e345e77124d652115"/><file name="Paypal.php" hash="5831bb3e2e3f6d3e9506e9c6bbcf76c9"/><file name="Przelewy24.php" hash="62dc63f9d029d3f1599ffa6f4ec91e27"/><file name="Sofortbanking.php" hash="c680c21fa1a8a6427519664e1b1c1a94"/><file name="Visa.php" hash="d977468b9dac7c70d637b6167918c569"/><file name="Vpay.php" hash="2eb70f7616beada4fe23f2554f575e2e"/><file name="Webmoney.php" hash="b0f44c9232cf456778123c05127d3f12"/></dir><file name="Base.php" hash="b8a2f888d0d8e86a639b8379720c9e7a"/><file name="Observer.php" hash="81f7a3c5149f52dcb2d4c7434d250003"/></dir><dir name="controllers"><file name="StandardController.php" hash="2070748231cc42d40c67869c14c289d6"/></dir><dir name="etc"><file name="adminhtml.xml" hash="1caa98cae31103bb77143f821f68f451"/><file name="config.xml" hash="0e4681b1a297670b50809484225cca30"/><file name="system.xml" hash="41f0cabf687c23355456729b91375009"/></dir></dir></dir></target></contents>
16
  <compatible/>
17
  <dependencies/>
18
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Cardgate_Cgp</name>
4
+ <version>1.0.31</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>Card Gate Plus Payment Module</summary>
10
  <description>Card Gate Plus is a Payment Service Provider from the Netherlands. We offer various payment methods against competitive rates.</description>
11
+ <notes>- Added Instruction field to Bank Transfer payment method.</notes>
12
  <authors><author><name>Richard Schoots</name><user>auto-converted</user><email>support@cardgate.com</email></author></authors>
13
+ <date>2015-02-17</date>
14
+ <time>13:37:17</time>
15
+ <contents><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="images"><dir name="cardgate"><file name="cardgate_cgp.png" hash="b97b15baba0b27042733c8ea4b4fb6bc"/></dir></dir><file name="cardgate_cgp.css" hash="bebfc13fca1b36867c17864ae70fdabd"/></dir></dir></dir></target><target name="magelocale"><dir name="nl_NL"><file name="Cardgate_Cgp.csv" hash="2dbc55ab2bed686851ad11da0f2c8f2b"/></dir></target><target name="mageetc"><dir name="modules"><file name="Cardgate_Cgp.xml" hash="c7a72af045f4b737b50cc6c360d4300d"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="cardgate"><dir name="cgp"><dir name="form"><file name="banktransfer.phtml" hash="ff7a2a827a7b7a5ed9bcb5d484c30c68"/><file name="ideal.phtml" hash="42fdfee86ba3a098f5f73e9240332581"/><file name="klarna.phtml" hash="590c98ab018c474e8e4dc65e9199ba85"/><file name="klarnaaccount.phtml" hash="419f88941703c8562369844bb6a1d692"/></dir><file name="redirect.phtml" hash="ecb2b0a854cd6358adeba535f8889046"/></dir></dir></dir></dir></dir></dir></target><target name="magelocal"><dir name="Cardgate"><dir name="Cgp"><dir name="Block"><dir name="Form"><file name="Banktransfer.php" hash="cbd094ef3552618c9657f411082beb1e"/><file name="Ideal.php" hash="ad7c7430c45525aef2ee79d53707ac54"/><file name="Klarna.php" hash="9bdbe1886bcdb283b86b6d208c3aa712"/><file name="Klarnaaccount.php" hash="0b4b84d9c472e815a30d5977ac53c932"/></dir><file name="Redirect.php" hash="668b52ec0c5fba7f42223d4e40a99987"/></dir><dir name="Helper"><file name="Data.php" hash="c94c725de2e14dc8019323c1ecf08962"/></dir><dir name="Model"><dir name="Adminhtml"><dir name="System"><dir name="Config"><dir name="Source"><file name="Languages.php" hash="4fe09e45e3d9f3866d4b7c8437832972"/><file name="Modes.php" hash="888158f9118ba5087357d5c1ad8514d4"/></dir></dir></dir></dir><dir name="Gateway"><file name="Abstract.php" hash="570642c968189fc75ceec7eefbc81643"/><file name="Americanexpress.php" hash="63988a4b6ec2b92c41115bac80b489c0"/><file name="Banktransfer.php" hash="af6ff9d03f3a5b41926762bd9d41f5c7"/><file name="Default.php" hash="956d1ff0c2cfe0698efc23277e602cec"/><file name="Directdebit.php" hash="6ecd143d3d0b91c818fd8a9bf3858d0f"/><file name="Giropay.php" hash="aff19feafd61a08e3e298a865d52c3d5"/><file name="Ideal.php" hash="8ba0ccae24cde16a65ec17b462a64b6d"/><file name="Klarna.php" hash="330efb073aba572606b1f25b597bb106"/><file name="Klarnaaccount.php" hash="2012566e77136f823e965c8811321ea3"/><file name="Maestro.php" hash="b2887cc1de0590ab78e4373324924486"/><file name="Mastercard.php" hash="f1bfabcc244175c3e691e1707a541415"/><file name="Mistercash.php" hash="cc750b3e2d0cab9e345e77124d652115"/><file name="Paypal.php" hash="5831bb3e2e3f6d3e9506e9c6bbcf76c9"/><file name="Przelewy24.php" hash="62dc63f9d029d3f1599ffa6f4ec91e27"/><file name="Sofortbanking.php" hash="c680c21fa1a8a6427519664e1b1c1a94"/><file name="Visa.php" hash="d977468b9dac7c70d637b6167918c569"/><file name="Vpay.php" hash="2eb70f7616beada4fe23f2554f575e2e"/><file name="Webmoney.php" hash="b0f44c9232cf456778123c05127d3f12"/></dir><file name="Base.php" hash="b8a2f888d0d8e86a639b8379720c9e7a"/><file name="Observer.php" hash="81f7a3c5149f52dcb2d4c7434d250003"/></dir><dir name="controllers"><file name="StandardController.php" hash="5fd44136d073e9cd1cee4512b9ecdb4b"/></dir><dir name="etc"><file name="adminhtml.xml" hash="1caa98cae31103bb77143f821f68f451"/><file name="config.xml" hash="9d7f94928bdecb3f5d77277371e7a043"/><file name="system.xml" hash="d8e3ebdf1e537a21d0b4130ebb09dae5"/></dir></dir></dir></target></contents>
16
  <compatible/>
17
  <dependencies/>
18
  </package>