Version Notes
- Updated dutch language file.
- Updated transaction test mode.
Download this release
Release Info
Developer | Magento Core Team |
Extension | Cardgate_Cgp |
Version | 1.0.32 |
Comparing to | |
See all releases |
Code changes from version 1.0.31 to 1.0.32
app/code/local/Cardgate/Cgp/Model/Gateway/Abstract.php
CHANGED
@@ -32,9 +32,8 @@ abstract class Cardgate_Cgp_Model_Gateway_Abstract extends Mage_Payment_Model_Me
|
|
32 |
*
|
33 |
* @var mixed
|
34 |
*/
|
35 |
-
|
36 |
protected $_url = 'https://gateway.cardgateplus.com/';
|
37 |
-
|
38 |
protected $_supportedCurrencies = array( 'EUR', 'USD', 'JPY', 'BGN', 'CZK',
|
39 |
'DKK', 'GBP', 'HUF', 'LTL', 'LVL',
|
40 |
'PLN', 'RON', 'SEK', 'CHF', 'NOK',
|
@@ -61,7 +60,23 @@ abstract class Cardgate_Cgp_Model_Gateway_Abstract extends Mage_Payment_Model_Me
|
|
61 |
* @return string
|
62 |
*/
|
63 |
public function getGatewayUrl() {
|
64 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
65 |
}
|
66 |
|
67 |
/**
|
@@ -207,7 +222,7 @@ abstract class Cardgate_Cgp_Model_Gateway_Abstract extends Mage_Payment_Model_Me
|
|
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 );
|
213 |
}
|
@@ -480,7 +495,7 @@ abstract class Cardgate_Cgp_Model_Gateway_Abstract extends Mage_Payment_Model_Me
|
|
480 |
case 'directdebit':
|
481 |
$s_arr['option'] = 'directdebit';
|
482 |
break;
|
483 |
-
|
484 |
// Przelewy24
|
485 |
case 'przelewy24':
|
486 |
$s_arr['option'] = 'przelewy24';
|
@@ -535,6 +550,7 @@ abstract class Cardgate_Cgp_Model_Gateway_Abstract extends Mage_Payment_Model_Me
|
|
535 |
$s_arr['amount'] .
|
536 |
$s_arr['ref'] .
|
537 |
$this->getConfigData( 'hash_key' ) );
|
|
|
538 |
// Logging
|
539 |
$base->log( 'Initiating a new transaction' );
|
540 |
$base->log( 'Sending customer to Card Gate Plus with values:' );
|
32 |
*
|
33 |
* @var mixed
|
34 |
*/
|
|
|
35 |
protected $_url = 'https://gateway.cardgateplus.com/';
|
36 |
+
protected $_test_url = 'http://gateway.cardgate.dev/';
|
37 |
protected $_supportedCurrencies = array( 'EUR', 'USD', 'JPY', 'BGN', 'CZK',
|
38 |
'DKK', 'GBP', 'HUF', 'LTL', 'LVL',
|
39 |
'PLN', 'RON', 'SEK', 'CHF', 'NOK',
|
60 |
* @return string
|
61 |
*/
|
62 |
public function getGatewayUrl() {
|
63 |
+
if ( $this->is_test_url() ) {
|
64 |
+
return $this->_test_url;
|
65 |
+
} else {
|
66 |
+
return $this->_url;
|
67 |
+
}
|
68 |
+
}
|
69 |
+
|
70 |
+
private function is_test_url() {
|
71 |
+
$url = (isset( $_SERVER['HTTPS'] ) && $_SERVER['HTTPS'] != 'off' ? 'https' : 'http');
|
72 |
+
$url .= '://';
|
73 |
+
$url.= $_SERVER['SERVER_NAME'];
|
74 |
+
|
75 |
+
if ( strpos( $url, 'dbcorp.nl' ) > 0 ) {
|
76 |
+
return true;
|
77 |
+
} else {
|
78 |
+
return false;
|
79 |
+
}
|
80 |
}
|
81 |
|
82 |
/**
|
222 |
$extra_data = $session->_additional_information;
|
223 |
$order = $this->getOrder();
|
224 |
|
225 |
+
if ( !$this->getConfigData( 'orderemail_at_payment' ) ) {
|
226 |
$order->sendNewOrderEmail();
|
227 |
$order->setEmailSent( true );
|
228 |
}
|
495 |
case 'directdebit':
|
496 |
$s_arr['option'] = 'directdebit';
|
497 |
break;
|
498 |
+
|
499 |
// Przelewy24
|
500 |
case 'przelewy24':
|
501 |
$s_arr['option'] = 'przelewy24';
|
550 |
$s_arr['amount'] .
|
551 |
$s_arr['ref'] .
|
552 |
$this->getConfigData( 'hash_key' ) );
|
553 |
+
|
554 |
// Logging
|
555 |
$base->log( 'Initiating a new transaction' );
|
556 |
$base->log( 'Sending customer to Card Gate Plus with values:' );
|
app/code/local/Cardgate/Cgp/controllers/StandardController.php
CHANGED
@@ -87,6 +87,7 @@ class Cardgate_Cgp_StandardController extends Mage_Core_Controller_Front_Action
|
|
87 |
* After a failed transaction a customer will be send here
|
88 |
*/
|
89 |
public function cancelAction() {
|
|
|
90 |
switch ( $_REQUEST['cgpstatusid'] ) {
|
91 |
case 0:
|
92 |
$message = $this->__( 'Your payment is being evaluated by the bank. Please do not attempt to pay again, until your payment is either confirmed or denied by the bank.' );
|
@@ -138,6 +139,7 @@ class Cardgate_Cgp_StandardController extends Mage_Core_Controller_Front_Action
|
|
138 |
* After a successful transaction a customer will be send here
|
139 |
*/
|
140 |
public function successAction() {
|
|
|
141 |
$session = Mage::getSingleton( 'checkout/session' );
|
142 |
$quote = Mage::getModel( 'sales/quote' )->load( $session->getCardgateQuoteId() );
|
143 |
if ( $quote->getId() ) {
|
87 |
* After a failed transaction a customer will be send here
|
88 |
*/
|
89 |
public function cancelAction() {
|
90 |
+
|
91 |
switch ( $_REQUEST['cgpstatusid'] ) {
|
92 |
case 0:
|
93 |
$message = $this->__( 'Your payment is being evaluated by the bank. Please do not attempt to pay again, until your payment is either confirmed or denied by the bank.' );
|
139 |
* After a successful transaction a customer will be send here
|
140 |
*/
|
141 |
public function successAction() {
|
142 |
+
|
143 |
$session = Mage::getSingleton( 'checkout/session' );
|
144 |
$quote = Mage::getModel( 'sales/quote' )->load( $session->getCardgateQuoteId() );
|
145 |
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.
|
24 |
</Cardgate_Cgp>
|
25 |
</modules>
|
26 |
|
20 |
<config>
|
21 |
<modules>
|
22 |
<Cardgate_Cgp>
|
23 |
+
<version>1.0.32</version>
|
24 |
</Cardgate_Cgp>
|
25 |
</modules>
|
26 |
|
app/code/local/Cardgate/Cgp/etc/system.xml
CHANGED
@@ -32,7 +32,7 @@
|
|
32 |
<groups>
|
33 |
<settings translate="comment">
|
34 |
<label>Settings</label>
|
35 |
-
<comment><![CDATA[<strong>Note:</strong> Don't forget to set-up in the <a href=
|
36 |
<sort_order>100</sort_order>
|
37 |
<show_in_default>1</show_in_default>
|
38 |
<show_in_website>1</show_in_website>
|
@@ -41,7 +41,7 @@
|
|
41 |
<test_mode translate="label comment">
|
42 |
<label>Test/Live Mode</label>
|
43 |
<frontend_type>select</frontend_type>
|
44 |
-
<comment><![CDATA[Switching between test and live mode. If you don't have an account <a href='http://www.cardgate.com/' target='_blank'>sign up here
|
45 |
<source_model>cgp/adminhtml_system_config_source_modes</source_model>
|
46 |
<sort_order>20</sort_order>
|
47 |
<show_in_default>1</show_in_default>
|
@@ -51,7 +51,7 @@
|
|
51 |
<site_id translate="label comment">
|
52 |
<label>Site ID</label>
|
53 |
<frontend_type>text</frontend_type>
|
54 |
-
<comment><![CDATA[Fill in you site ID number. You can find your site ID number at <a href=
|
55 |
<sort_order>30</sort_order>
|
56 |
<show_in_default>1</show_in_default>
|
57 |
<show_in_website>1</show_in_website>
|
@@ -60,7 +60,7 @@
|
|
60 |
<hash_key translate="label comment">
|
61 |
<label>Hash Key</label>
|
62 |
<frontend_type>text</frontend_type>
|
63 |
-
<comment><![CDATA[Fill in you secret hash key for the site. You can create your hash key code at <a href=
|
64 |
<sort_order>40</sort_order>
|
65 |
<show_in_default>1</show_in_default>
|
66 |
<show_in_website>1</show_in_website>
|
@@ -69,7 +69,7 @@
|
|
69 |
<use_backoffice_urls translate="label comment">
|
70 |
<label>Use back-office URLs</label>
|
71 |
<frontend_type>select</frontend_type>
|
72 |
-
<comment><![CDATA[Use the return URLs as filled in at <a href=
|
73 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
74 |
<sort_order>50</sort_order>
|
75 |
<show_in_default>1</show_in_default>
|
32 |
<groups>
|
33 |
<settings translate="comment">
|
34 |
<label>Settings</label>
|
35 |
+
<comment><![CDATA[<strong>Note:</strong> Don't forget to set-up in the <a href='https://my.cardgate.com/' target='_blank'>Merchant Backoffice</a> a Control URL to 'http://www.yourdomain.com/cgp/standard/control/'.]]></comment>
|
36 |
<sort_order>100</sort_order>
|
37 |
<show_in_default>1</show_in_default>
|
38 |
<show_in_website>1</show_in_website>
|
41 |
<test_mode translate="label comment">
|
42 |
<label>Test/Live Mode</label>
|
43 |
<frontend_type>select</frontend_type>
|
44 |
+
<comment><![CDATA[Switching between test and live mode. If you don't have an account <a href='http://www.cardgate.com/' target='_blank'>sign up here</a>.]]></comment>
|
45 |
<source_model>cgp/adminhtml_system_config_source_modes</source_model>
|
46 |
<sort_order>20</sort_order>
|
47 |
<show_in_default>1</show_in_default>
|
51 |
<site_id translate="label comment">
|
52 |
<label>Site ID</label>
|
53 |
<frontend_type>text</frontend_type>
|
54 |
+
<comment><![CDATA[Fill in you site ID number. You can find your site ID number at <a href='https://my.cardgate.com/' target='_blank'>merchant back-office</a>.]]></comment>
|
55 |
<sort_order>30</sort_order>
|
56 |
<show_in_default>1</show_in_default>
|
57 |
<show_in_website>1</show_in_website>
|
60 |
<hash_key translate="label comment">
|
61 |
<label>Hash Key</label>
|
62 |
<frontend_type>text</frontend_type>
|
63 |
+
<comment><![CDATA[Fill in you secret hash key for the site. You can create your hash key code at <a href='https://my.cardgate.com/' target='_blank'>merchant back-office</a>.]]></comment>
|
64 |
<sort_order>40</sort_order>
|
65 |
<show_in_default>1</show_in_default>
|
66 |
<show_in_website>1</show_in_website>
|
69 |
<use_backoffice_urls translate="label comment">
|
70 |
<label>Use back-office URLs</label>
|
71 |
<frontend_type>select</frontend_type>
|
72 |
+
<comment><![CDATA[Use the return URLs as filled in at <a href='https://my.cardgate.com/' target='_blank'>merchant back-office</a> instead of the default plugin values.]]></comment>
|
73 |
<source_model>adminhtml/system_config_source_yesno</source_model>
|
74 |
<sort_order>50</sort_order>
|
75 |
<show_in_default>1</show_in_default>
|
app/locale/nl_NL/Cardgate_Cgp.csv
CHANGED
@@ -9,17 +9,17 @@
|
|
9 |
"Czech","Tsjechisch"
|
10 |
"Russian","Russisch"
|
11 |
"Swedish","Zweeds"
|
12 |
-
"<strong>Note:</strong> Don't forget to set-up in the <a href=
|
13 |
"Test Mode","Test modus"
|
14 |
"Live Mode","Live modus"
|
15 |
"Test/Live Mode","Test/Live modus"
|
16 |
-
"Switching between test and live mode. If you don't have an account <a href='http://www.cardgate.com/' target='_blank'>sign up here</a>.","Schakelen tussen test en live modus. Als u nog geen account heeft, kunt u zich <a href='http://www.cardgate.com/
|
17 |
"Site ID","Site ID"
|
18 |
-
"Fill in you site ID number. You can find your site ID number at <a href=https://
|
19 |
"Hash Key","Codeer Sleutel"
|
20 |
-
"Fill in you secret hash key for the site. You can create your hash key code at <a href=https://
|
21 |
"Use back-office URLs","Gebruik back-office URLs"
|
22 |
-
"Use the return URLs as filled in at <a href=
|
23 |
"Create invoice after payment","Maak een factuur aan na betaling"
|
24 |
"Automatically create invoices after payment.","Maak automatisch een factuur aan na betaling."
|
25 |
"Mail invoice to customer","Email factuur aan klant"
|
9 |
"Czech","Tsjechisch"
|
10 |
"Russian","Russisch"
|
11 |
"Swedish","Zweeds"
|
12 |
+
"<strong>Note:</strong> Don't forget to set-up in the <a href='https://my.cardgate.com/' target='_blank'>Merchant Backoffice</a> a Control URL to 'http://www.yourdomain.com/cgp/standard/control/'.","<strong>Let op!</strong> Vergeet niet uw 'Control URL (http://www.yourdomain.com/cgp/standard/control/)' op te geven in de <a href='https://my.cardgate.com/' target='_blank'>Merchant Backoffice</a>."
|
13 |
"Test Mode","Test modus"
|
14 |
"Live Mode","Live modus"
|
15 |
"Test/Live Mode","Test/Live modus"
|
16 |
+
"Switching between test and live mode. If you don't have an account <a href='http://www.cardgate.com/' target='_blank'>sign up here</a>.","Schakelen tussen test en live modus. Als u nog geen account heeft, kunt u zich <a href='http://www.cardgate.com/' target='_blank'>hier aanmelden</a>."
|
17 |
"Site ID","Site ID"
|
18 |
+
"Fill in you site ID number. You can find your site ID number at <a href='https://my.cardgate.com/' target='_blank'>merchant back-office</a>.","Vul hier uw site ID in. Dit nummer kunt u vinden in de <a href='https://my.cardgate.com/' target='_blank'>merchant back-office</a>."
|
19 |
"Hash Key","Codeer Sleutel"
|
20 |
+
"Fill in you secret hash key for the site. You can create your hash key code at <a href='https://my.cardgate.com/' target='_blank'>merchant back-office</a>.","Vul hier uw codeer sleutel in. Deze kunt u aanmaken in de <a href='https://my.cardgate.com/' target='_blank'>merchant back-office</a>."
|
21 |
"Use back-office URLs","Gebruik back-office URLs"
|
22 |
+
"Use the return URLs as filled in at <a href='https://my.cardgate.com/' target='_blank'>merchant back-office</a> instead of the default plugin values.","Gebruik de return URLs, zoals door u aangemaakt in de <a href='https://my.cardgate.com/' target='_blank'>merchant back-office</a> i.p.v. de standaard plugin waarden."
|
23 |
"Create invoice after payment","Maak een factuur aan na betaling"
|
24 |
"Automatically create invoices after payment.","Maak automatisch een factuur aan na betaling."
|
25 |
"Mail invoice to customer","Email factuur aan klant"
|
package.xml
CHANGED
@@ -1,18 +1,19 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Cardgate_Cgp</name>
|
4 |
-
<version>1.0.
|
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>-
|
|
|
12 |
<authors><author><name>Richard Schoots</name><user>auto-converted</user><email>support@cardgate.com</email></author></authors>
|
13 |
-
<date>2015-
|
14 |
-
<time>13:
|
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="
|
16 |
<compatible/>
|
17 |
<dependencies/>
|
18 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>Cardgate_Cgp</name>
|
4 |
+
<version>1.0.32</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>- Updated dutch language file.
|
12 |
+
- Updated transaction test mode.</notes>
|
13 |
<authors><author><name>Richard Schoots</name><user>auto-converted</user><email>support@cardgate.com</email></author></authors>
|
14 |
+
<date>2015-05-07</date>
|
15 |
+
<time>13:48:41</time>
|
16 |
+
<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="9c483a4b377d81da59f726aa3908a7a6"/></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="67a89fc24244f86ac22cfc22cb36497e"/><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="1524983a5b9d05ef2d7e7d92c25ff409"/></dir><dir name="etc"><file name="adminhtml.xml" hash="1caa98cae31103bb77143f821f68f451"/><file name="config.xml" hash="40846b4531be47ecab68a71fb2b1d76c"/><file name="system.xml" hash="e1a6d488d1ec693157d8ece2bc7e809c"/></dir></dir></dir></target></contents>
|
17 |
<compatible/>
|
18 |
<dependencies/>
|
19 |
</package>
|