gpg-checkout - Version 0.1.1

Version Notes

First version of the module.

Download this release

Release Info

Developer Utiks
Extension gpg-checkout
Version 0.1.1
Comparing to
See all releases


Code changes from version 0.1.0 to 0.1.1

app/code/community/Utiks/GpgCheckout/Block/Form/GpgCheckout.php CHANGED
@@ -1,27 +1,10 @@
1
  <?php
2
-
3
- /**
4
- * Gpg Checkout Payment method form block
5
- *
6
- * * PHP version 5.5
7
- *
8
- * @category Utiks
9
- * @package Utiks_GpgCheckout
10
- * @author Anis Hidouri <anis@utiks.com>
11
- * @copyright 2015-2016 Copyright (c) utiks (http://www.utiks.com)
12
- * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License
13
- * @link http://www.utiks.com
14
- */
15
-
16
  /**
17
  * Class Utiks_GpgCheckout_Block_Form_GpgCheckout
18
  *
19
  * @category Utiks
20
  * @package Utiks_GpgCheckout
21
- * @author Anis Hidouri <anis@utiks.com>
22
  * @copyright 2015-2016 Copyright (c) utiks (http://www.utiks.com)
23
- * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License
24
- * @link http://www.utiks.com
25
  */
26
  class Utiks_GpgCheckout_Block_Form_GpgCheckout extends Mage_Payment_Block_Form
27
  {
1
  <?php
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  /**
3
  * Class Utiks_GpgCheckout_Block_Form_GpgCheckout
4
  *
5
  * @category Utiks
6
  * @package Utiks_GpgCheckout
 
7
  * @copyright 2015-2016 Copyright (c) utiks (http://www.utiks.com)
 
 
8
  */
9
  class Utiks_GpgCheckout_Block_Form_GpgCheckout extends Mage_Payment_Block_Form
10
  {
app/code/community/Utiks/GpgCheckout/Block/Info/GpgCheckout.php CHANGED
@@ -1,27 +1,10 @@
1
  <?php
2
-
3
- /**
4
- * Gpg Checkout Payment method Info block
5
- *
6
- * * PHP version 5.5
7
- *
8
- * @category Utiks
9
- * @package Utiks_GpgCheckout
10
- * @author Anis Hidouri <anis@utiks.com>
11
- * @copyright 2015-2016 Copyright (c) utiks (http://www.utiks.com)
12
- * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License
13
- * @link http://www.utiks.com
14
- */
15
-
16
  /**
17
  * Class Utiks_GpgCheckout_Block_Info_GpgCheckout
18
  *
19
  * @category Utiks
20
  * @package Utiks_GpgCheckout
21
- * @author Anis Hidouri <anis@utiks.com>
22
  * @copyright 2015-2016 Copyright (c) utiks (http://www.utiks.com)
23
- * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License
24
- * @link http://www.utiks.com
25
  */
26
  class Utiks_GpgCheckout_Block_Info_GpgCheckout extends Mage_Payment_Block_Info
27
  {
@@ -60,7 +43,7 @@ class Utiks_GpgCheckout_Block_Info_GpgCheckout extends Mage_Payment_Block_Info
60
  $transport = array(
61
  $paymentHelper->__('Transaction number') => $data['gpg_transaction'],
62
  $paymentHelper->__('Transaction Status') => $data['transactionStatus'],
63
- $paymentHelper->__('Payment Type') => $data['paymentType'],
64
  $paymentHelper->__('Authorization code') => $data['authorizationCode'],
65
  );
66
 
1
  <?php
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  /**
3
  * Class Utiks_GpgCheckout_Block_Info_GpgCheckout
4
  *
5
  * @category Utiks
6
  * @package Utiks_GpgCheckout
 
7
  * @copyright 2015-2016 Copyright (c) utiks (http://www.utiks.com)
 
 
8
  */
9
  class Utiks_GpgCheckout_Block_Info_GpgCheckout extends Mage_Payment_Block_Info
10
  {
43
  $transport = array(
44
  $paymentHelper->__('Transaction number') => $data['gpg_transaction'],
45
  $paymentHelper->__('Transaction Status') => $data['transactionStatus'],
46
+ $paymentHelper->__('Payment Type') => $data['paymentType'],
47
  $paymentHelper->__('Authorization code') => $data['authorizationCode'],
48
  );
49
 
app/code/community/Utiks/GpgCheckout/Helper/Data.php CHANGED
@@ -1,41 +1,13 @@
1
  <?php
2
-
3
- /**
4
- * Gpg Checkout Payment helper
5
- *
6
- * * PHP version 5.5
7
- *
8
- * @category Utiks
9
- * @package Utiks_GpgCheckout
10
- * @author Anis Hidouri <anis@utiks.com>
11
- * @copyright 2015-2016 Copyright (c) utiks (http://www.utiks.com)
12
- * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License
13
- * @link http://www.utiks.com
14
- */
15
-
16
  /**
17
  * Class Utiks_GpgCheckout_Helper_Data
18
  *
19
  * @category Utiks
20
  * @package Utiks_GpgCheckout
21
- * @author Anis Hidouri <anis@utiks.com>
22
  * @copyright 2015-2016 Copyright (c) utiks (http://www.utiks.com)
23
- * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License
24
- * @link http://www.utiks.com
25
  */
26
  class Utiks_GpgCheckout_Helper_Data extends Mage_Core_Helper_Abstract
27
  {
28
-
29
-
30
- //GPG Payment Types
31
-
32
- const DIRECT_PAYMENT = 'Paiement Direct';
33
- const RECURRENT_PAYMENT = 'Paiement récurent ';
34
- const DEFERRED_PAYMENT = 'Paiement différer';
35
- const PRE_AUTHORIZATION_PAYMENT = 'Paiement Pré-autorisation';
36
- const PRE_AUTHORIZATION_CONFIRMATION_PAYMENT = 'Paiement Pré-autorisation Confirmation';
37
- const SUBSCRIPTION_PAYMENT = 'Paiement Abonnement';
38
-
39
  /**
40
  * Get order payment type
41
  *
@@ -48,22 +20,22 @@ class Utiks_GpgCheckout_Helper_Data extends Mage_Core_Helper_Abstract
48
  $paymentType = null;
49
  switch ($type) {
50
  case "1":
51
- $paymentType = self::DIRECT_PAYMENT;
52
  break;
53
  case "2":
54
- $paymentType = self::RECURRENT_PAYMENT;
55
  break;
56
  case "3":
57
- $paymentType = self::DEFERRED_PAYMENT;
58
  break;
59
  case "4":
60
- $paymentType = self::PRE_AUTHORIZATION_PAYMENT;
61
  break;
62
  case "5":
63
- $paymentType = self::PRE_AUTHORIZATION_CONFIRMATION_PAYMENT;
64
  break;
65
  case "6":
66
- $paymentType = self::SUBSCRIPTION_PAYMENT;
67
  break;
68
  }
69
 
@@ -93,17 +65,35 @@ class Utiks_GpgCheckout_Helper_Data extends Mage_Core_Helper_Abstract
93
  return $url;
94
  }
95
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
96
  /**
97
  * @param string $string
98
  *
99
  * @return mixed
100
  */
101
- public function getStoreConfigByName($string)
102
  {
103
- $configValue = Mage::getStoreConfig('payment/mycheckout');
104
-
105
- return $configValue['' . $string];
106
-
 
 
107
  }
108
 
109
  /**
@@ -131,7 +121,7 @@ class Utiks_GpgCheckout_Helper_Data extends Mage_Core_Helper_Abstract
131
  $data = array(
132
  'orderAmount' => $order->getGrandTotal(),
133
  'OrderDevice' => $order->getOrderCurrencyCode(),
134
- 'OrderItems' => $this->getOrderItemsNames($order)
135
  );
136
  }
137
 
@@ -165,8 +155,8 @@ class Utiks_GpgCheckout_Helper_Data extends Mage_Core_Helper_Abstract
165
  {
166
  $order = Mage::getModel('sales/order');
167
  $order->load($orderId);
168
- $customer_id = $order->getCustomerId();
169
- $customerData = Mage::getModel('customer/customer')->load($customer_id)->getData();
170
  $customerShippingData = $order->getShippingAddress()->getData();
171
  return array_merge($customerData, $customerShippingData);
172
  }
1
  <?php
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  /**
3
  * Class Utiks_GpgCheckout_Helper_Data
4
  *
5
  * @category Utiks
6
  * @package Utiks_GpgCheckout
 
7
  * @copyright 2015-2016 Copyright (c) utiks (http://www.utiks.com)
 
 
8
  */
9
  class Utiks_GpgCheckout_Helper_Data extends Mage_Core_Helper_Abstract
10
  {
 
 
 
 
 
 
 
 
 
 
 
11
  /**
12
  * Get order payment type
13
  *
20
  $paymentType = null;
21
  switch ($type) {
22
  case "1":
23
+ $paymentType = Mage::helper('utiks_gpgcheckout')->__('Direct Payment');
24
  break;
25
  case "2":
26
+ $paymentType = Mage::helper('utiks_gpgcheckout')->__('Recurring Payment');
27
  break;
28
  case "3":
29
+ $paymentType = Mage::helper('utiks_gpgcheckout')->__('Deferred Payment');
30
  break;
31
  case "4":
32
+ $paymentType = Mage::helper('utiks_gpgcheckout')->__('Pre-Authorization Payment');
33
  break;
34
  case "5":
35
+ $paymentType = Mage::helper('utiks_gpgcheckout')->__('Pre-Authorization Confirmation Payment');
36
  break;
37
  case "6":
38
+ $paymentType = Mage::helper('utiks_gpgcheckout')->__('Annual Subscription Payment');
39
  break;
40
  }
41
 
65
  return $url;
66
  }
67
 
68
+ /**
69
+ * Return payment image state
70
+ *
71
+ * @return string $url
72
+ */
73
+ public function getGpgSubmitUrl()
74
+ {
75
+ $mode = $this->getStoreConfigByName('mode');
76
+ if ($mode == 'production') {
77
+ $submitUrl = $this->getStoreConfigByName('submit_url_production');
78
+ } else {
79
+ $submitUrl = $this->getStoreConfigByName('submit_url_test');
80
+ }
81
+ return $submitUrl;
82
+ }
83
+
84
  /**
85
  * @param string $string
86
  *
87
  * @return mixed
88
  */
89
+ public function getStoreConfigByName($string = '')
90
  {
91
+ $configValue = Mage::getStoreConfig('payment/gpgcheckout');
92
+ if (isset($configValue[$string])){
93
+ return $configValue[$string];
94
+ } else {
95
+ return null;
96
+ }
97
  }
98
 
99
  /**
121
  $data = array(
122
  'orderAmount' => $order->getGrandTotal(),
123
  'OrderDevice' => $order->getOrderCurrencyCode(),
124
+ 'OrderItems' => $this->getOrderItemsNames($order)
125
  );
126
  }
127
 
155
  {
156
  $order = Mage::getModel('sales/order');
157
  $order->load($orderId);
158
+ $customer_id = $order->getCustomerId();
159
+ $customerData = Mage::getModel('customer/customer')->load($customer_id)->getData();
160
  $customerShippingData = $order->getShippingAddress()->getData();
161
  return array_merge($customerData, $customerShippingData);
162
  }
app/code/community/Utiks/GpgCheckout/Model/PaymentMethod.php CHANGED
@@ -2,33 +2,17 @@
2
  /**
3
  * Class Utiks_GpgCheckout_Model_PaymentMethod
4
  *
5
- * * PHP version 5.5
6
- *
7
  * @category Utiks
8
  * @package Utiks_GpgCheckout
9
- * @author Anis Hidouri <anis@utiks.com>
10
  * @copyright 2015-2016 Copyright (c) utiks (http://www.utiks.com)
11
- * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License
12
- * @link http://www.utiks.com
13
- */
14
-
15
- /**
16
- * Class Utiks_GpgCheckout_Model_PaymentMethod
17
- *
18
- * @category Utiks
19
- * @package Utiks_GpgCheckout
20
- * @author Anis Hidouri <anis@utiks.com>
21
- * @copyright 2015-2016 Copyright (c) utiks (http://www.utiks.com)
22
- * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License
23
- * @link http://www.utiks.com
24
  */
25
  class Utiks_GpgCheckout_Model_PaymentMethod extends Mage_Payment_Model_Method_Abstract
26
  {
27
- protected $_code = 'gpgcheckout';
28
- protected $_formBlockType = 'utiks_gpgcheckout/form_gpgCheckout';
29
- protected $_infoBlockType = 'utiks_gpgcheckout/info_gpgCheckout';
30
- protected $_isGateway = true;
31
- protected $_canAuthorize = true;
32
  protected $_canUseCheckout = true;
33
 
34
  /**
@@ -50,7 +34,7 @@ class Utiks_GpgCheckout_Model_PaymentMethod extends Mage_Payment_Model_Method_Ab
50
  */
51
  public function isAvailable($quote = null)
52
  {
53
- $helper = Mage::helper('utiks_gpgcheckout');
54
  $availability = $helper->getStoreConfigByName('active');
55
  if ($availability == 1) {
56
  return parent::isAvailable($quote = null);
2
  /**
3
  * Class Utiks_GpgCheckout_Model_PaymentMethod
4
  *
 
 
5
  * @category Utiks
6
  * @package Utiks_GpgCheckout
 
7
  * @copyright 2015-2016 Copyright (c) utiks (http://www.utiks.com)
 
 
 
 
 
 
 
 
 
 
 
 
 
8
  */
9
  class Utiks_GpgCheckout_Model_PaymentMethod extends Mage_Payment_Model_Method_Abstract
10
  {
11
+ protected $_code = 'gpgcheckout';
12
+ protected $_formBlockType = 'utiks_gpgcheckout/form_gpgCheckout';
13
+ protected $_infoBlockType = 'utiks_gpgcheckout/info_gpgCheckout';
14
+ protected $_isGateway = true;
15
+ protected $_canAuthorize = true;
16
  protected $_canUseCheckout = true;
17
 
18
  /**
34
  */
35
  public function isAvailable($quote = null)
36
  {
37
+ $helper = Mage::helper('utiks_gpgcheckout');
38
  $availability = $helper->getStoreConfigByName('active');
39
  if ($availability == 1) {
40
  return parent::isAvailable($quote = null);
app/code/community/Utiks/GpgCheckout/Model/System/Config/Source/GatewayUrls.php CHANGED
@@ -1,27 +1,10 @@
1
  <?php
2
-
3
- /**
4
- * Gpg Checkout Payment Gateway urls source model
5
- *
6
- * * PHP version 5.5
7
- *
8
- * @category Utiks
9
- * @package Utiks_GpgCheckout
10
- * @author Anis Hidouri <anis@utiks.com>
11
- * @copyright 2015-2016 Copyright (c) utiks (http://www.utiks.com)
12
- * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License
13
- * @link http://www.utiks.com
14
- */
15
-
16
  /**
17
  * Class Utiks_GpgCheckout_Model_System_Config_Source_GatewayUrls
18
  *
19
  * @category Utiks
20
  * @package Utiks_GpgCheckout
21
- * @author Anis Hidouri <anis@utiks.com>
22
  * @copyright 2015-2016 Copyright (c) utiks (http://www.utiks.com)
23
- * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License
24
- * @link http://www.utiks.com
25
  */
26
  class Utiks_GpgCheckout_Model_System_Config_Source_GatewayUrls
27
  {
@@ -33,8 +16,14 @@ class Utiks_GpgCheckout_Model_System_Config_Source_GatewayUrls
33
  public function toOptionArray()
34
  {
35
  return array(
36
- array('value' => 'https://preprod.gpgcheckout.com/Paiement_test/Validation_paiement.php', 'label' => Mage::helper('adminhtml')->__('Mode développement/préproduction')),
37
- array('value' => 'https://www.gpgcheckout.com/Paiement/Validation_paiement.php', 'label' => Mage::helper('adminhtml')->__('Production site en ligne')),
 
 
 
 
 
 
38
  );
39
  }
40
  }
1
  <?php
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  /**
3
  * Class Utiks_GpgCheckout_Model_System_Config_Source_GatewayUrls
4
  *
5
  * @category Utiks
6
  * @package Utiks_GpgCheckout
 
7
  * @copyright 2015-2016 Copyright (c) utiks (http://www.utiks.com)
 
 
8
  */
9
  class Utiks_GpgCheckout_Model_System_Config_Source_GatewayUrls
10
  {
16
  public function toOptionArray()
17
  {
18
  return array(
19
+ array(
20
+ 'value' => 'test',
21
+ 'label' => Mage::helper('utiks_gpgcheckout')->__('Test mode')
22
+ ),
23
+ array(
24
+ 'value' => 'production',
25
+ 'label' => Mage::helper('utiks_gpgcheckout')->__('Production mode')
26
+ ),
27
  );
28
  }
29
  }
app/code/community/Utiks/GpgCheckout/Model/System/Config/Source/PaymentType.php CHANGED
@@ -1,27 +1,10 @@
1
  <?php
2
-
3
- /**
4
- * Gpg Checkout Payment types source model
5
- *
6
- * * PHP version 5.5
7
- *
8
- * @category Utiks
9
- * @package Utiks_GpgCheckout
10
- * @author Anis Hidouri <anis@utiks.com>
11
- * @copyright 2015-2016 Copyright (c) utiks (http://www.utiks.com)
12
- * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License
13
- * @link http://www.utiks.com
14
- */
15
-
16
  /**
17
  * Class Utiks_GpgCheckout_Model_System_Config_Source_PaymentType
18
  *
19
  * @category Utiks
20
  * @package Utiks_GpgCheckout
21
- * @author Anis Hidouri <anis@utiks.com>
22
  * @copyright 2015-2016 Copyright (c) utiks (http://www.utiks.com)
23
- * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License
24
- * @link http://www.utiks.com
25
  */
26
  class Utiks_GpgCheckout_Model_System_Config_Source_PaymentType
27
  {
@@ -34,12 +17,12 @@ class Utiks_GpgCheckout_Model_System_Config_Source_PaymentType
34
  public function toOptionArray()
35
  {
36
  return array(
37
- array('value' => 1, 'label' => Mage::helper('adminhtml')->__('Paiement direct')),
38
- array('value' => 2, 'label' => Mage::helper('adminhtml')->__('Paiement récurent')),
39
- array('value' => 3, 'label' => Mage::helper('adminhtml')->__('Paiement différer')),
40
- array('value' => 4, 'label' => Mage::helper('adminhtml')->__('Paiement Pré-autorisation')),
41
- array('value' => 5, 'label' => Mage::helper('adminhtml')->__('Paiement Pré-autorisation Confirmation')),
42
- array('value' => 6, 'label' => Mage::helper('adminhtml')->__('Paiement Abonnement annuel')),
43
  );
44
  }
45
  }
1
  <?php
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  /**
3
  * Class Utiks_GpgCheckout_Model_System_Config_Source_PaymentType
4
  *
5
  * @category Utiks
6
  * @package Utiks_GpgCheckout
 
7
  * @copyright 2015-2016 Copyright (c) utiks (http://www.utiks.com)
 
 
8
  */
9
  class Utiks_GpgCheckout_Model_System_Config_Source_PaymentType
10
  {
17
  public function toOptionArray()
18
  {
19
  return array(
20
+ array('value' => 1, 'label' => Mage::helper('utiks_gpgcheckout')->__('Direct Payment')),
21
+ array('value' => 2, 'label' => Mage::helper('utiks_gpgcheckout')->__('Recurring Payment')),
22
+ array('value' => 3, 'label' => Mage::helper('utiks_gpgcheckout')->__('Deferred Payment')),
23
+ array('value' => 4, 'label' => Mage::helper('utiks_gpgcheckout')->__('Pre-Authorization Payment')),
24
+ array('value' => 5, 'label' => Mage::helper('utiks_gpgcheckout')->__('Pre-Authorization Confirmation Payment')),
25
+ array('value' => 6, 'label' => Mage::helper('utiks_gpgcheckout')->__('Annual Subscription Payment')),
26
  );
27
  }
28
  }
app/code/community/Utiks/GpgCheckout/Model/System/Config/Source/ReccuNumber.php CHANGED
@@ -1,27 +1,10 @@
1
  <?php
2
-
3
- /**
4
- * Gpg Checkout ReccuNumber source model
5
- *
6
- * * PHP version 5.5
7
- *
8
- * @category Utiks
9
- * @package Utiks_GpgCheckout
10
- * @author Anis Hidouri <anis@utiks.com>
11
- * @copyright 2015-2016 Copyright (c) utiks (http://www.utiks.com)
12
- * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License
13
- * @link http://www.utiks.com
14
- */
15
-
16
  /**
17
  * Class Utiks_GpgCheckout_Model_System_Config_Source_ReccuNumber
18
  *
19
  * @category Utiks
20
  * @package Utiks_GpgCheckout
21
- * @author Anis Hidouri <anis@utiks.com>
22
  * @copyright 2015-2016 Copyright (c) utiks (http://www.utiks.com)
23
- * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License
24
- * @link http://www.utiks.com
25
  */
26
  class Utiks_GpgCheckout_Model_System_Config_Source_ReccuNumber
27
  {
@@ -34,9 +17,9 @@ class Utiks_GpgCheckout_Model_System_Config_Source_ReccuNumber
34
  public function toOptionArray()
35
  {
36
  return array(
37
- array('value' => 2, 'label' => Mage::helper('adminhtml')->__('2 fois')),
38
- array('value' => 3, 'label' => Mage::helper('adminhtml')->__('3 fois')),
39
- array('value' => 6, 'label' => Mage::helper('adminhtml')->__('6 fois')),
40
  );
41
  }
42
  }
1
  <?php
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  /**
3
  * Class Utiks_GpgCheckout_Model_System_Config_Source_ReccuNumber
4
  *
5
  * @category Utiks
6
  * @package Utiks_GpgCheckout
 
7
  * @copyright 2015-2016 Copyright (c) utiks (http://www.utiks.com)
 
 
8
  */
9
  class Utiks_GpgCheckout_Model_System_Config_Source_ReccuNumber
10
  {
17
  public function toOptionArray()
18
  {
19
  return array(
20
+ array('value' => 2, 'label' => Mage::helper('utiks_gpgcheckout')->__('%s times', '2')),
21
+ array('value' => 3, 'label' => Mage::helper('utiks_gpgcheckout')->__('%s times', '3')),
22
+ array('value' => 6, 'label' => Mage::helper('utiks_gpgcheckout')->__('%s times', '6')),
23
  );
24
  }
25
  }
app/code/community/Utiks/GpgCheckout/controllers/PaymentController.php CHANGED
@@ -1,44 +1,25 @@
1
  <?php
2
-
3
- /**
4
- * Gpg Checkout Payment controller
5
- *
6
- * * PHP version 5.5
7
- *
8
- * @category Utiks
9
- * @package Utiks_GpgCheckout
10
- * @author Anis Hidouri <anis@utiks.com>
11
- * @copyright 2015-2016 Copyright (c) utiks (http://www.utiks.com)
12
- * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License
13
- * @link http://www.utiks.com
14
- */
15
-
16
  /**
17
  * Class Utiks_GpgCheckout_PaymentController
18
  *
19
  * @category Utiks
20
  * @package Utiks_GpgCheckout
21
- * @author Anis Hidouri <anis@utiks.com>
22
  * @copyright 2015-2016 Copyright (c) utiks (http://www.utiks.com)
23
- * @license http://www.gnu.org/copyleft/gpl.html GNU General Public License
24
- * @link http://www.utiks.com
25
  */
26
  class Utiks_GpgCheckout_PaymentController extends Mage_Core_Controller_Front_Action
27
  {
28
 
29
- //GPG Checkout transactions status
30
-
31
- const TRANSACTION_FAILED = '05';
32
- const TRANSACTION_CANCELLED = '06';
33
- const TRANSACTION_REFUND = '07';
34
- const TRANSACTION_SUCCEEDED = '00';
35
  const TRANSACTION_CHARGEBACK = '08';
36
- const FRAUD_DETECTION = '02';
37
 
38
  protected $_helper;
39
  protected $_logs;
40
 
41
-
42
  /**
43
  * Constructor
44
  */
@@ -49,100 +30,96 @@ class Utiks_GpgCheckout_PaymentController extends Mage_Core_Controller_Front_Act
49
  }
50
 
51
  /**
52
- * Render redirect page
53
- *
54
  * @return template
55
  */
56
  public function redirectAction()
57
  {
58
  $this->loadLayout();
59
- $block = $this->getLayout()->createBlock('Mage_Core_Block_Template', 'gpgcheckout', array('template' => 'gpgcheckout/redirect.phtml'));
60
- $this->getLayout()->getBlock('content')->append($block);
61
  $this->renderLayout();
62
  }
63
 
64
-
65
  /**
66
  * Response triggered when GPGCheckout sends back a response after processing the customer's payment
67
- *
68
  * @throws Exception
69
  */
70
  public function responseAction()
71
  {
72
  $order = null;
73
-
74
  if ($this->getRequest()->isPost()) {
75
  try{
76
  $gpgCheckoutResponse = $this->getRequest()->getParams();
77
- $gpgCheckoutTransactionId = key($gpgCheckoutResponse);
78
- $gpgCheckoutResponse = array_shift(array_values($gpgCheckoutResponse));
79
  $transactionStatus = $gpgCheckoutResponse['TransStatus'];
80
  $orderId = $gpgCheckoutResponse['PAYID'];
81
  $paymentType = $this->getHelper()->getPaymentType($gpgCheckoutResponse['PayementType']);
82
  $authorizationCode = $gpgCheckoutResponse['AuthorisationCode'];
83
  $signature = $gpgCheckoutResponse['Signature'];
84
- $totalAmount = $gpgCheckoutResponse['TotalAmount'];
85
  $numSite = $this->getHelper()->getStoreConfigByName('num_site');
86
  $password = $this->getHelper()->getStoreConfigByName('gpg_password');
87
  $device = $gpgCheckoutResponse['Currency'];
88
- $signatureCheck = sha1($numSite . $password . $orderId . $totalAmount . $device);
89
 
90
  $order = Mage::getModel('sales/order');
91
  $order->load($orderId);
92
  $payment = $order->getPayment();
93
- // in case fraud detection cancel order and redirect to failure page
94
  if ($signature != $signatureCheck) {
95
  $paymentAdditionalData = array(
96
- 'gpg_transaction' => $gpgCheckoutTransactionId,
97
  'transactionStatus' => self::FRAUD_DETECTION,
98
- 'paymentType' => $paymentType,
99
  'authorizationCode' => $authorizationCode
100
  );
101
- $order->cancel()->setState(Mage_Sales_Model_Order::STATE_CANCELED, true, 'GPG Checkout fraud detection ')->save();
102
  $payment->setAdditionalData(serialize($paymentAdditionalData));
103
  $payment->save();
104
- $message = 'GPG Checkout fraud detection, transaction id n° '.$gpgCheckoutTransactionId;
105
  $this->setLogMessage($message, $order);
106
  Mage_Core_Controller_Varien_Action::_redirect('checkout/onepage/failure', array('_secure' => true));
107
  }
108
  $paymentAdditionalData = array(
109
- 'gpg_transaction' => $gpgCheckoutTransactionId,
110
  'transactionStatus' => $transactionStatus,
111
- 'paymentType' => $paymentType,
112
  'authorizationCode' => $authorizationCode
113
  );
114
  $paymentAdditionalData = serialize($paymentAdditionalData);
115
  if ($transactionStatus == self::TRANSACTION_SUCCEEDED) {
116
- // Payment was successful,update the order state
117
- $order->setState(Mage_Sales_Model_Order::STATE_PROCESSING, true, 'GPG Checkout has authorized the payment.');
 
 
 
 
 
118
  $order->sendNewOrderEmail();
119
  $order->setEmailSent(true);
120
- $message = 'GPG Checkout has authorized the payment, transaction id n° '.$gpgCheckoutTransactionId;
121
  $this->setLogMessage($message, $order);
122
 
123
- } elseif ($transactionStatus == self::TRANSACTION_FAILED || transactionStatus == self::TRANSACTION_CANCELLED) {
124
  //you can change failed status with your custom status
125
- $order->cancel()->setState(Mage_Sales_Model_Order::STATE_CANCELED, true, 'GPG Checkout payment failed or cancelled.');
126
- $message = 'GPG Checkout payment failed or cancelled, transaction id n° '.$gpgCheckoutTransactionId;
127
  $this->setLogMessage($message, $order);
128
  }
129
  $order->save();
130
- //update order payment information
131
  $payment->setAdditionalData($paymentAdditionalData);
132
  $payment->save();
133
  Mage::getSingleton('checkout/session')->unsQuoteId();
134
  } catch (Exception $e) {
135
- $message = 'an error has occurred with order'.$order->getIncrementId().'__More details! '.$e->getMessage();
136
  Mage::log($message, null, 'GPGCheckoutException.log', true);
137
  }
138
-
139
-
140
  }
141
  }
142
 
143
- /**
144
  * Get module helper
145
- *
146
  * @return mixed
147
  */
148
  public function getHelper()
@@ -152,18 +129,18 @@ class Utiks_GpgCheckout_PaymentController extends Mage_Core_Controller_Front_Act
152
 
153
  /**
154
  * Get gpgcheckout payment log
155
- *
156
  * @param string $message
157
- *
158
  * @param object $order
159
  */
160
  public function setLogMessage($message,$order)
161
  {
162
  if ($this->_logs == 1) {
163
  $orderIncrementId = $order->getIncrementId();
164
- $datetime = Zend_Date::now();
165
- $logText = sprintf("%s payment log informations for order n° %s : %s", $datetime, $orderIncrementId, $message);
166
  Mage::log($logText, null, 'GPGCheckout.log', true);
167
- }
168
  }
169
  }
1
  <?php
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
  /**
3
  * Class Utiks_GpgCheckout_PaymentController
4
  *
5
  * @category Utiks
6
  * @package Utiks_GpgCheckout
 
7
  * @copyright 2015-2016 Copyright (c) utiks (http://www.utiks.com)
 
 
8
  */
9
  class Utiks_GpgCheckout_PaymentController extends Mage_Core_Controller_Front_Action
10
  {
11
 
12
+ //GPG Checkout transactions status
13
+ const TRANSACTION_SUCCEEDED = '00';
14
+ const FRAUD_DETECTION = '02';
15
+ const TRANSACTION_FAILED = '05';
16
+ const TRANSACTION_CANCELLED = '06';
17
+ const TRANSACTION_REFUND = '07';
18
  const TRANSACTION_CHARGEBACK = '08';
 
19
 
20
  protected $_helper;
21
  protected $_logs;
22
 
 
23
  /**
24
  * Constructor
25
  */
30
  }
31
 
32
  /**
33
+ * Render redirect page
34
+ *
35
  * @return template
36
  */
37
  public function redirectAction()
38
  {
39
  $this->loadLayout();
 
 
40
  $this->renderLayout();
41
  }
42
 
 
43
  /**
44
  * Response triggered when GPGCheckout sends back a response after processing the customer's payment
45
+ *
46
  * @throws Exception
47
  */
48
  public function responseAction()
49
  {
50
  $order = null;
51
+
52
  if ($this->getRequest()->isPost()) {
53
  try{
54
  $gpgCheckoutResponse = $this->getRequest()->getParams();
 
 
55
  $transactionStatus = $gpgCheckoutResponse['TransStatus'];
56
  $orderId = $gpgCheckoutResponse['PAYID'];
57
  $paymentType = $this->getHelper()->getPaymentType($gpgCheckoutResponse['PayementType']);
58
  $authorizationCode = $gpgCheckoutResponse['AuthorisationCode'];
59
  $signature = $gpgCheckoutResponse['Signature'];
60
+ $totalAmount = (float) $gpgCheckoutResponse['TotalAmount'] * 1000;
61
  $numSite = $this->getHelper()->getStoreConfigByName('num_site');
62
  $password = $this->getHelper()->getStoreConfigByName('gpg_password');
63
  $device = $gpgCheckoutResponse['Currency'];
64
+ $signatureCheck = sha1($transactionStatus . $orderId . $password);
65
 
66
  $order = Mage::getModel('sales/order');
67
  $order->load($orderId);
68
  $payment = $order->getPayment();
69
+ // In case of fraud detection, order is canceled and redirect to failure page
70
  if ($signature != $signatureCheck) {
71
  $paymentAdditionalData = array(
 
72
  'transactionStatus' => self::FRAUD_DETECTION,
73
+ 'paymentType' => $paymentType,
74
  'authorizationCode' => $authorizationCode
75
  );
76
+ $order->cancel()->setState(Mage_Sales_Model_Order::STATE_CANCELED, true, $this->__('GPG Checkout fraud detection'))->save();
77
  $payment->setAdditionalData(serialize($paymentAdditionalData));
78
  $payment->save();
79
+ $message = $this->__('GPG Checkout fraud detection, transaction id n° %s', $gpgCheckoutTransactionId);
80
  $this->setLogMessage($message, $order);
81
  Mage_Core_Controller_Varien_Action::_redirect('checkout/onepage/failure', array('_secure' => true));
82
  }
83
  $paymentAdditionalData = array(
 
84
  'transactionStatus' => $transactionStatus,
85
+ 'paymentType' => $paymentType,
86
  'authorizationCode' => $authorizationCode
87
  );
88
  $paymentAdditionalData = serialize($paymentAdditionalData);
89
  if ($transactionStatus == self::TRANSACTION_SUCCEEDED) {
90
+ // Payment was successful,update the order state
91
+ $transactionOrderStatus = $this->_helper->getStoreConfigByName('order_status');
92
+ $order->setData('state', $transactionOrderStatus);
93
+ $order->setStatus($transactionOrderStatus);
94
+ $msg = 'GPG Checkout has authorized the payment,Order set to '.$transactionOrderStatus;
95
+ $history = $order->addStatusHistoryComment($msg, false);
96
+ $history->setIsCustomerNotified(false);
97
  $order->sendNewOrderEmail();
98
  $order->setEmailSent(true);
99
+ $message = $this->__('GPG Checkout has authorized the payment, transaction id n° %s', $gpgCheckoutTransactionId);
100
  $this->setLogMessage($message, $order);
101
 
102
+ } elseif ($transactionStatus == self::TRANSACTION_FAILED || $transactionStatus == self::TRANSACTION_CANCELLED) {
103
  //you can change failed status with your custom status
104
+ $order->cancel()->setState(Mage_Sales_Model_Order::STATE_CANCELED, true, $this->__('GPG Checkout payment failed or cancelled'));
105
+ $message = $this->__('GPG Checkout payment failed or cancelled, transaction id n° %s', $gpgCheckoutTransactionId);
106
  $this->setLogMessage($message, $order);
107
  }
108
  $order->save();
109
+ // Update order payment information
110
  $payment->setAdditionalData($paymentAdditionalData);
111
  $payment->save();
112
  Mage::getSingleton('checkout/session')->unsQuoteId();
113
  } catch (Exception $e) {
114
+ $message = 'An error has occurred with order '.$order->getIncrementId().'__More details! '.$e->getMessage();
115
  Mage::log($message, null, 'GPGCheckoutException.log', true);
116
  }
 
 
117
  }
118
  }
119
 
120
+ /**
121
  * Get module helper
122
+ *
123
  * @return mixed
124
  */
125
  public function getHelper()
129
 
130
  /**
131
  * Get gpgcheckout payment log
132
+ *
133
  * @param string $message
134
+ *
135
  * @param object $order
136
  */
137
  public function setLogMessage($message,$order)
138
  {
139
  if ($this->_logs == 1) {
140
  $orderIncrementId = $order->getIncrementId();
141
+ $datetime = Zend_Date::now();
142
+ $logText = sprintf("%s payment log informations for order n° %s : %s", $datetime, $orderIncrementId, $message);
143
  Mage::log($logText, null, 'GPGCheckout.log', true);
144
+ }
145
  }
146
  }
app/code/community/Utiks/GpgCheckout/etc/config.xml CHANGED
@@ -2,7 +2,7 @@
2
  <config>
3
  <modules>
4
  <Utiks_GpgCheckout>
5
- <version>0.1.0</version>
6
  </Utiks_GpgCheckout>
7
  </modules>
8
  <global>
@@ -26,19 +26,6 @@
26
  </utiks_gpgcheckout>
27
  </helpers>
28
  </global>
29
- <default>
30
- <payment>
31
- <gpgcheckout>
32
- <model>utiks_gpgcheckout/paymentMethod</model>
33
- <active>1</active>
34
- <order_status>pending</order_status>
35
- <title>GPG Checkout payment</title>
36
- <payment_action>authorize</payment_action>
37
- <allowspecific>0</allowspecific>
38
- <sort_order>1</sort_order>
39
- </gpgcheckout>
40
- </payment>
41
- </default>
42
  <frontend>
43
  <routers>
44
  <gpgcheckout>
@@ -56,5 +43,39 @@
56
  </utiks_gpgcheckout>
57
  </updates>
58
  </layout>
 
 
 
 
 
 
 
 
 
59
  </frontend>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
60
  </config>
2
  <config>
3
  <modules>
4
  <Utiks_GpgCheckout>
5
+ <version>0.1.1</version>
6
  </Utiks_GpgCheckout>
7
  </modules>
8
  <global>
26
  </utiks_gpgcheckout>
27
  </helpers>
28
  </global>
 
 
 
 
 
 
 
 
 
 
 
 
 
29
  <frontend>
30
  <routers>
31
  <gpgcheckout>
43
  </utiks_gpgcheckout>
44
  </updates>
45
  </layout>
46
+ <translate>
47
+ <modules>
48
+ <Utiks_GpgCheckout>
49
+ <files>
50
+ <default>Utiks_GpgCheckout.csv</default>
51
+ </files>
52
+ </Utiks_GpgCheckout>
53
+ </modules>
54
+ </translate>
55
  </frontend>
56
+ <adminhtml>
57
+ <translate>
58
+ <modules>
59
+ <Utiks_GpgCheckout>
60
+ <files>
61
+ <default>Utiks_GpgCheckout.csv</default>
62
+ </files>
63
+ </Utiks_GpgCheckout>
64
+ </modules>
65
+ </translate>
66
+ </adminhtml>
67
+ <default>
68
+ <payment>
69
+ <gpgcheckout>
70
+ <model>utiks_gpgcheckout/paymentMethod</model>
71
+ <payment_action>authorize</payment_action>
72
+ <title>GPG Checkout Payment</title>
73
+ <order_status>processing</order_status>
74
+ <default_currency>TND</default_currency>
75
+ <mode>test</mode>
76
+ <submit_url_test><![CDATA[https://preprod.gpgcheckout.com/Paiement_test/Validation_paiement.php]]></submit_url_test>
77
+ <submit_url_production><![CDATA[https://www.gpgcheckout.com/Paiement/Validation_paiement.php]]></submit_url_production>
78
+ </gpgcheckout>
79
+ </payment>
80
+ </default>
81
  </config>
app/code/community/Utiks/GpgCheckout/etc/system.xml CHANGED
@@ -3,11 +3,13 @@
3
  <sections>
4
  <payment>
5
  <groups>
6
- <mycheckout translate="label" module="utiks_gpgcheckout">
7
- <label>GPGCheckout Payemnt Method</label>
8
  <frontend_type>text</frontend_type>
9
- <sort_order>1</sort_order>
10
  <show_in_default>1</show_in_default>
 
 
11
  <fields>
12
  <active translate="label">
13
  <label>Enabled</label>
@@ -15,87 +17,121 @@
15
  <source_model>adminhtml/system_config_source_yesno</source_model>
16
  <sort_order>10</sort_order>
17
  <show_in_default>1</show_in_default>
 
 
18
  </active>
19
  <title translate="label">
20
  <label>Title</label>
21
  <frontend_type>text</frontend_type>
22
  <sort_order>20</sort_order>
23
  <show_in_default>1</show_in_default>
 
 
24
  </title>
25
  <order_status translate="label">
26
- <label>New Order Status</label>
27
  <frontend_type>select</frontend_type>
28
  <source_model>adminhtml/system_config_source_order_status</source_model>
29
  <sort_order>50</sort_order>
30
  <show_in_default>1</show_in_default>
 
 
31
  </order_status>
32
- <submit_url>
33
- <label>Gateway URL</label>
34
- <comment>communiqué par GPG</comment>
35
- <frontend_type>select</frontend_type>
36
- <source_model>utiks_gpgcheckout/system_config_source_gatewayUrls</source_model>
37
- <sort_order>58</sort_order>
38
- <show_in_default>1</show_in_default>
39
- <validate>required-entry</validate>
40
- </submit_url>
41
- <num_site>
42
  <label>NumSite</label>
43
- <comment>communiqué par GPG</comment>
44
  <frontend_type>password</frontend_type>
45
  <sort_order>56</sort_order>
46
  <show_in_default>1</show_in_default>
 
 
47
  <validate>required-entry</validate>
48
  </num_site>
49
- <gpg_password>
50
  <label>Password</label>
51
- <comment>Mot de passe du site communiqué par GPG</comment>
52
  <frontend_type>password</frontend_type>
53
  <sort_order>57</sort_order>
54
  <show_in_default>1</show_in_default>
 
 
55
  <validate>required-entry</validate>
56
  </gpg_password>
57
- <vad_number>
58
- <label>Vad</label>
59
- <comment>Code VAD communiqué par GPG</comment>
60
  <frontend_type>password</frontend_type>
61
  <sort_order>58</sort_order>
62
  <show_in_default>1</show_in_default>
 
 
63
  <validate>required-entry</validate>
64
  </vad_number>
65
  <default_currency translate="label">
66
- <label>Device par default</label>
67
  <frontend_type>select</frontend_type>
68
  <source_model>adminhtml/system_config_source_currency</source_model>
69
  <sort_order>59</sort_order>
70
  <show_in_default>1</show_in_default>
 
 
71
  </default_currency>
72
  <terminal translate="label">
73
- <label>Terminal</label>
74
- <comment>Identifiant terminal communiqué par GPG</comment>
75
  <frontend_type>text</frontend_type>
76
  <sort_order>60</sort_order>
77
  <show_in_default>1</show_in_default>
 
 
78
  </terminal>
79
- <logs translate="label">
80
- <label>Activer les logs</label>
81
  <frontend_type>select</frontend_type>
82
- <source_model>adminhtml/system_config_source_yesno</source_model>
83
- <sort_order>61</sort_order>
84
  <show_in_default>1</show_in_default>
85
- </logs>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
86
  <payment_type translate="label">
87
  <label>Payment type</label>
88
  <frontend_type>select</frontend_type>
89
  <source_model>utiks_gpgcheckout/system_config_source_paymentType</source_model>
90
- <sort_order>62</sort_order>
91
  <show_in_default>1</show_in_default>
 
 
92
  </payment_type>
93
  <reccu_num translate="label">
94
- <label>Le nombre de récurrence à utiliser</label>
95
  <frontend_type>select</frontend_type>
96
- <sort_order>63</sort_order>
97
  <source_model>utiks_gpgcheckout/system_config_source_ReccuNumber</source_model>
98
  <show_in_default>1</show_in_default>
 
 
99
  <depends>
100
  <payment_type separator="|">
101
  <value>2|6</value>
@@ -103,14 +139,13 @@
103
  </depends>
104
  </reccu_num>
105
  <reccu_frecuency translate="label">
106
- <label>Reccu_Frecuency</label>
107
- <comment>Le délai de récurrence à utiliser chaque X fois en jours Fréquence en jours pour
108
- les transactions récurrentes et récurrentes différées (obligatoire pour les
109
- récurrentes)Exp : 30 (jour)
110
- </comment>
111
  <frontend_type>text</frontend_type>
112
- <sort_order>64</sort_order>
113
  <show_in_default>1</show_in_default>
 
 
114
  <validate>required-entry</validate>
115
  <depends>
116
  <payment_type>
@@ -119,26 +154,30 @@
119
  </depends>
120
  </reccu_frecuency>
121
  <reccu_expiryDate translate="label">
122
- <label>Reccu_ExpiryDate</label>
123
- <comment>Date Limite sous le format aaaa-MM-jj date limite pour transactions Récurrentes
124
- </comment>
125
  <frontend_type>text</frontend_type>
126
- <sort_order>64</sort_order>
127
  <show_in_default>1</show_in_default>
 
 
128
  <depends>
129
  <payment_type separator="|">
130
  <value>2|3</value>
131
  </payment_type>
132
  </depends>
133
  </reccu_expiryDate>
134
- <sort_order translate="label">
135
- <label>Sort Order</label>
136
- <frontend_type>text</frontend_type>
137
- </sort_order>
138
- <sort_order>100</sort_order>
139
- <show_in_default>1</show_in_default>
 
 
 
140
  </fields>
141
- </mycheckout>
142
  </groups>
143
  </payment>
144
 
3
  <sections>
4
  <payment>
5
  <groups>
6
+ <gpgcheckout translate="label" module="utiks_gpgcheckout">
7
+ <label>GPGCheckout Payment</label>
8
  <frontend_type>text</frontend_type>
9
+ <sort_order>60</sort_order>
10
  <show_in_default>1</show_in_default>
11
+ <show_in_website>1</show_in_website>
12
+ <show_in_store>1</show_in_store>
13
  <fields>
14
  <active translate="label">
15
  <label>Enabled</label>
17
  <source_model>adminhtml/system_config_source_yesno</source_model>
18
  <sort_order>10</sort_order>
19
  <show_in_default>1</show_in_default>
20
+ <show_in_website>1</show_in_website>
21
+ <show_in_store>1</show_in_store>
22
  </active>
23
  <title translate="label">
24
  <label>Title</label>
25
  <frontend_type>text</frontend_type>
26
  <sort_order>20</sort_order>
27
  <show_in_default>1</show_in_default>
28
+ <show_in_website>1</show_in_website>
29
+ <show_in_store>1</show_in_store>
30
  </title>
31
  <order_status translate="label">
32
+ <label>New order status</label>
33
  <frontend_type>select</frontend_type>
34
  <source_model>adminhtml/system_config_source_order_status</source_model>
35
  <sort_order>50</sort_order>
36
  <show_in_default>1</show_in_default>
37
+ <show_in_website>1</show_in_website>
38
+ <show_in_store>1</show_in_store>
39
  </order_status>
40
+ <num_site translate="label">
 
 
 
 
 
 
 
 
 
41
  <label>NumSite</label>
42
+ <comment>Given by GPG</comment>
43
  <frontend_type>password</frontend_type>
44
  <sort_order>56</sort_order>
45
  <show_in_default>1</show_in_default>
46
+ <show_in_website>1</show_in_website>
47
+ <show_in_store>1</show_in_store>
48
  <validate>required-entry</validate>
49
  </num_site>
50
+ <gpg_password translate="label">
51
  <label>Password</label>
52
+ <comment>Given by GPG</comment>
53
  <frontend_type>password</frontend_type>
54
  <sort_order>57</sort_order>
55
  <show_in_default>1</show_in_default>
56
+ <show_in_website>1</show_in_website>
57
+ <show_in_store>1</show_in_store>
58
  <validate>required-entry</validate>
59
  </gpg_password>
60
+ <vad_number translate="label">
61
+ <label>VAD code</label>
62
+ <comment>Given by GPG</comment>
63
  <frontend_type>password</frontend_type>
64
  <sort_order>58</sort_order>
65
  <show_in_default>1</show_in_default>
66
+ <show_in_website>1</show_in_website>
67
+ <show_in_store>1</show_in_store>
68
  <validate>required-entry</validate>
69
  </vad_number>
70
  <default_currency translate="label">
71
+ <label>Default currency</label>
72
  <frontend_type>select</frontend_type>
73
  <source_model>adminhtml/system_config_source_currency</source_model>
74
  <sort_order>59</sort_order>
75
  <show_in_default>1</show_in_default>
76
+ <show_in_website>1</show_in_website>
77
+ <show_in_store>1</show_in_store>
78
  </default_currency>
79
  <terminal translate="label">
80
+ <label>Terminal identification</label>
81
+ <comment>Given byGPG</comment>
82
  <frontend_type>text</frontend_type>
83
  <sort_order>60</sort_order>
84
  <show_in_default>1</show_in_default>
85
+ <show_in_website>1</show_in_website>
86
+ <show_in_store>1</show_in_store>
87
  </terminal>
88
+ <mode translate="label">
89
+ <label>Mode</label>
90
  <frontend_type>select</frontend_type>
91
+ <source_model>utiks_gpgcheckout/system_config_source_gatewayUrls</source_model>
92
+ <sort_order>70</sort_order>
93
  <show_in_default>1</show_in_default>
94
+ <show_in_website>1</show_in_website>
95
+ <show_in_store>1</show_in_store>
96
+ <validate>required-entry</validate>
97
+ </mode>
98
+ <submit_url_test translate="label comment">
99
+ <label>Gateway Test Url</label>
100
+ <comment>Given by GPG</comment>
101
+ <frontend_type>text</frontend_type>
102
+ <sort_order>71</sort_order>
103
+ <show_in_default>1</show_in_default>
104
+ <show_in_website>1</show_in_website>
105
+ <show_in_store>1</show_in_store>
106
+ <validate>required-entry</validate>
107
+ </submit_url_test>
108
+ <submit_url_production translate="label comment">
109
+ <label>Gateway Production Url</label>
110
+ <comment>Given by GPG</comment>
111
+ <frontend_type>text</frontend_type>
112
+ <sort_order>72</sort_order>
113
+ <show_in_default>1</show_in_default>
114
+ <show_in_website>1</show_in_website>
115
+ <show_in_store>1</show_in_store>
116
+ <validate>required-entry</validate>
117
+ </submit_url_production>
118
  <payment_type translate="label">
119
  <label>Payment type</label>
120
  <frontend_type>select</frontend_type>
121
  <source_model>utiks_gpgcheckout/system_config_source_paymentType</source_model>
122
+ <sort_order>92</sort_order>
123
  <show_in_default>1</show_in_default>
124
+ <show_in_website>1</show_in_website>
125
+ <show_in_store>1</show_in_store>
126
  </payment_type>
127
  <reccu_num translate="label">
128
+ <label>Number of recurrence</label>
129
  <frontend_type>select</frontend_type>
130
+ <sort_order>93</sort_order>
131
  <source_model>utiks_gpgcheckout/system_config_source_ReccuNumber</source_model>
132
  <show_in_default>1</show_in_default>
133
+ <show_in_website>1</show_in_website>
134
+ <show_in_store>1</show_in_store>
135
  <depends>
136
  <payment_type separator="|">
137
  <value>2|6</value>
139
  </depends>
140
  </reccu_num>
141
  <reccu_frecuency translate="label">
142
+ <label>Recurrence frequency</label>
143
+ <comment>Recurrence frequency in days</comment>
 
 
 
144
  <frontend_type>text</frontend_type>
145
+ <sort_order>94</sort_order>
146
  <show_in_default>1</show_in_default>
147
+ <show_in_website>1</show_in_website>
148
+ <show_in_store>1</show_in_store>
149
  <validate>required-entry</validate>
150
  <depends>
151
  <payment_type>
154
  </depends>
155
  </reccu_frecuency>
156
  <reccu_expiryDate translate="label">
157
+ <label>Recurrence expiry date</label>
158
+ <comment>Expiry date formatted by aaaa-MM-jj</comment>
 
159
  <frontend_type>text</frontend_type>
160
+ <sort_order>94</sort_order>
161
  <show_in_default>1</show_in_default>
162
+ <show_in_website>1</show_in_website>
163
+ <show_in_store>1</show_in_store>
164
  <depends>
165
  <payment_type separator="|">
166
  <value>2|3</value>
167
  </payment_type>
168
  </depends>
169
  </reccu_expiryDate>
170
+ <logs translate="label">
171
+ <label>Enable log</label>
172
+ <frontend_type>select</frontend_type>
173
+ <source_model>adminhtml/system_config_source_yesno</source_model>
174
+ <sort_order>95</sort_order>
175
+ <show_in_default>1</show_in_default>
176
+ <show_in_website>1</show_in_website>
177
+ <show_in_store>1</show_in_store>
178
+ </logs>
179
  </fields>
180
+ </gpgcheckout>
181
  </groups>
182
  </payment>
183
 
app/design/adminhtml/default/default/template/gpgcheckout/info/gpg-checkout.phtml CHANGED
@@ -3,9 +3,9 @@
3
  * @category Utiks
4
  * @package Utiks_GpgCheckout
5
  * @copyright Copyright (c) 2015 utiks (http://www.utiks.com)
6
- * @author Anis Hidouri <anis@utiks.com>
7
  */
8
  ?>
 
9
  <style>
10
  .gpg-state-ok, .gpg-ko-state {
11
  width: 15px;
@@ -13,10 +13,9 @@
13
  margin-left: 5px;
14
  }
15
  </style>
16
- <div><img src="<?php echo Mage::helper('utiks_gpgcheckout')->getGpgCheckoutLogo(); ?>"/></div>
17
  <div class="gpg-checkout-payment-info">
18
  <?php echo $this->escapeHtml($this->getMethod()->getTitle()) ?>
19
-
20
  <?php if ($_additionalInfo = $this->renderAdditionalPaymentData()):; ?>
21
  <table>
22
  <tr>
@@ -31,12 +30,12 @@
31
  if (!is_array($value)) {
32
  echo $value;
33
  } elseif (is_array($value) && $value['state'] == true) {
34
- echo $value['value'] . '<img class="gpg-ko-state" src="' . Mage::helper('utiks_gpgcheckout')->getGpgState() . 'gpg-ok-state.png"/>';
35
  } elseif (is_array($value) && $value['state'] == false) {
36
  if ($value == '02') {
37
- echo $value['value'] . '<span>fraud detection due to unverified signature</span><img class="gpg-ko-state" src="' . Mage::helper('utiks_gpgcheckout')->getGpgState() . 'gpg-ko-state.png"/>';
38
  } else {
39
- echo $value['value'] . '<img class="gpg-ko-state" src="' . Mage::helper('utiks_gpgcheckout')->getGpgState() . 'gpg-ko-state.png"/>';
40
  }
41
  }
42
  ?></td>
@@ -46,10 +45,9 @@
46
  </table>
47
  <?php else: ?>
48
  <div class="notice-msg" style="padding: 9px 30px; margin-top: 3px">
49
- <?php echo 'GPG Checkout payment error, please check details for more information.' ?>
50
  </div>
51
  <?php endif; ?>
52
 
53
  <?php echo $this->getChildHtml() ?>
54
  </div>
55
-
3
  * @category Utiks
4
  * @package Utiks_GpgCheckout
5
  * @copyright Copyright (c) 2015 utiks (http://www.utiks.com)
 
6
  */
7
  ?>
8
+ <?php $_helper = Mage::helper('utiks_gpgcheckout'); ?>
9
  <style>
10
  .gpg-state-ok, .gpg-ko-state {
11
  width: 15px;
13
  margin-left: 5px;
14
  }
15
  </style>
16
+ <div><img src="<?php echo $_helper->getGpgCheckoutLogo(); ?>"/></div>
17
  <div class="gpg-checkout-payment-info">
18
  <?php echo $this->escapeHtml($this->getMethod()->getTitle()) ?>
 
19
  <?php if ($_additionalInfo = $this->renderAdditionalPaymentData()):; ?>
20
  <table>
21
  <tr>
30
  if (!is_array($value)) {
31
  echo $value;
32
  } elseif (is_array($value) && $value['state'] == true) {
33
+ echo $value['value'] . '<img class="gpg-ko-state" src="' . $_helper->getGpgState() . 'gpg-ok-state.png"/>';
34
  } elseif (is_array($value) && $value['state'] == false) {
35
  if ($value == '02') {
36
+ echo $value['value'] . '<span>'.$_helper->__('fraud detection due to unverified signature').'</span><img class="gpg-ko-state" src="' . $_helper->getGpgState() . 'gpg-ko-state.png"/>';
37
  } else {
38
+ echo $value['value'] . '<img class="gpg-ko-state" src="' . $_helper->getGpgState() . 'gpg-ko-state.png"/>';
39
  }
40
  }
41
  ?></td>
45
  </table>
46
  <?php else: ?>
47
  <div class="notice-msg" style="padding: 9px 30px; margin-top: 3px">
48
+ <?php echo $_helper->__('GPG Checkout payment error, please check details for more information.'); ?>
49
  </div>
50
  <?php endif; ?>
51
 
52
  <?php echo $this->getChildHtml() ?>
53
  </div>
 
app/design/frontend/base/default/layout/gpgcheckout.xml CHANGED
@@ -2,7 +2,18 @@
2
  <layout>
3
  <default>
4
  <reference name="head">
5
- <action method="addItem"><type>skin_css</type><name>css/gpgcheckout/loading.css</name></action>
 
 
 
6
  </reference>
7
  </default>
 
 
 
 
 
 
 
 
8
  </layout>
2
  <layout>
3
  <default>
4
  <reference name="head">
5
+ <action method="addItem">
6
+ <type>skin_css</type>
7
+ <name>css/gpgcheckout/loading.css</name>
8
+ </action>
9
  </reference>
10
  </default>
11
+ <gpgcheckout_payment_redirect>
12
+ <reference name="root">
13
+ <action method="setTemplate"><template>page/1column.phtml</template></action>
14
+ </reference>
15
+ <reference name="content">
16
+ <block type="core/template" name="gpgcheckout" template="gpgcheckout/redirect.phtml"/>
17
+ </reference>
18
+ </gpgcheckout_payment_redirect>
19
  </layout>
app/design/frontend/base/default/template/gpgcheckout/info/gpg-checkout.phtml CHANGED
@@ -3,7 +3,6 @@
3
  * @category Utiks
4
  * @package Utiks_GpgCheckout
5
  * @copyright Copyright (c) 2015 utiks (http://www.utiks.com)
6
- * @author Anis Hidouri <anis@utiks.com>
7
  */
8
  ?>
9
  <p class="subtitle"><strong><?php echo (Mage::helper('utiks_gpgcheckout')->getStoreConfigByName('title') != '' ? Mage::helper('utiks_gpgcheckout')->getStoreConfigByName('title') : $this->escapeHtml($this->getMethod()->getTitle()));?></strong></p>
3
  * @category Utiks
4
  * @package Utiks_GpgCheckout
5
  * @copyright Copyright (c) 2015 utiks (http://www.utiks.com)
 
6
  */
7
  ?>
8
  <p class="subtitle"><strong><?php echo (Mage::helper('utiks_gpgcheckout')->getStoreConfigByName('title') != '' ? Mage::helper('utiks_gpgcheckout')->getStoreConfigByName('title') : $this->escapeHtml($this->getMethod()->getTitle()));?></strong></p>
app/design/frontend/base/default/template/gpgcheckout/redirect.phtml CHANGED
@@ -3,7 +3,6 @@
3
  * @category Utiks
4
  * @package Utiks_GpgCheckout
5
  * @copyright Copyright (c) 2015 utiks (http://www.utiks.com)
6
- * @author Anis Hidouri <anis@utiks.com>
7
  */
8
  ?>
9
  <?php
@@ -12,16 +11,15 @@ $orderId = $helper->getOrderId();
12
  $orderData = $helper->getOrderData($orderId);
13
  $numSite = $helper->getStoreConfigByName('num_site');
14
  $password = $helper->getStoreConfigByName('gpg_password');
15
- $amount = $orderData['orderAmount'];
16
  $devise = $orderData['OrderDevice'];
17
  $orderProducts = $orderData['OrderItems'];
18
  $language = Mage::app()->getLocale()->getLocaleCode();
19
  $signture = sha1($numSite . $password . $orderId . $amount . $devise);
20
  $customerData = $helper->getOrderCustomerData($orderId);
21
  ?>
22
- <div class='gpg_redirect_title'><h1>GPG Checkout Redirect...</h1></div>
23
- <div class="ball"></div>
24
- <form name="paiment" method="POST" action="<?php echo $helper->getStoreConfigByName('submit_url'); ?>">
25
  <input type="hidden" name="NumSite" value="<?php echo $numSite; ?>"><br/><br/>
26
  <input type="hidden" name="Password" value="<?php echo md5($password); ?>"><br/><br/>
27
  <input type="hidden" name="orderID" value="<?php echo $orderId; ?>"><br/><br/>
@@ -51,5 +49,7 @@ $customerData = $helper->getOrderCustomerData($orderId);
51
  <input type="hidden" name="Reccu_Frecuency " value=" <?php echo $helper->getStoreConfigByName('reccu_frecuency'); ?>"><br/><br/>
52
  </form>
53
  <script type="text/javascript">
54
- document.paiment.submit();
 
 
55
  </script>
3
  * @category Utiks
4
  * @package Utiks_GpgCheckout
5
  * @copyright Copyright (c) 2015 utiks (http://www.utiks.com)
 
6
  */
7
  ?>
8
  <?php
11
  $orderData = $helper->getOrderData($orderId);
12
  $numSite = $helper->getStoreConfigByName('num_site');
13
  $password = $helper->getStoreConfigByName('gpg_password');
14
+ $amount = (float) $orderData['orderAmount'] * 1000;
15
  $devise = $orderData['OrderDevice'];
16
  $orderProducts = $orderData['OrderItems'];
17
  $language = Mage::app()->getLocale()->getLocaleCode();
18
  $signture = sha1($numSite . $password . $orderId . $amount . $devise);
19
  $customerData = $helper->getOrderCustomerData($orderId);
20
  ?>
21
+ <div class="gpg_redirect_title"><?php echo $this->__('Please wait while you are redirected to GPG Checkout payment server ...'); ?></div>
22
+ <form id="gpg-payment-form" name="gpg_payment_form" method="post" action="<?php echo $helper->getGpgSubmitUrl(); ?>">
 
23
  <input type="hidden" name="NumSite" value="<?php echo $numSite; ?>"><br/><br/>
24
  <input type="hidden" name="Password" value="<?php echo md5($password); ?>"><br/><br/>
25
  <input type="hidden" name="orderID" value="<?php echo $orderId; ?>"><br/><br/>
49
  <input type="hidden" name="Reccu_Frecuency " value=" <?php echo $helper->getStoreConfigByName('reccu_frecuency'); ?>"><br/><br/>
50
  </form>
51
  <script type="text/javascript">
52
+ document.observe('dom:loaded', function(){
53
+ document.gpg_payment_form.submit();
54
+ });
55
  </script>
app/etc/modules/Utiks_GpgCheckout.xml CHANGED
@@ -3,7 +3,7 @@
3
  <modules>
4
  <Utiks_GpgCheckout>
5
  <active>true</active>
6
- <codePool>local</codePool>
7
  <depends>
8
  <Mage_Payment/>
9
  </depends>
3
  <modules>
4
  <Utiks_GpgCheckout>
5
  <active>true</active>
6
+ <codePool>community</codePool>
7
  <depends>
8
  <Mage_Payment/>
9
  </depends>
app/locale/en_US/Utiks_GpgCheckout.csv ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "Enabled","Enabled"
2
+ "Title","Title"
3
+ "New order status","New order status"
4
+ "Mode","Mode"
5
+ "Given by GPG","Given by GPG"
6
+ "NumSite","NumSite"
7
+ "Password","Password"
8
+ "VAD code","VAD code"
9
+ "Default currency","Default currency"
10
+ "Terminal identification","Terminal identification"
11
+ "Payment type","Payment type"
12
+ "Number of recurrence","Number of recurrence"
13
+ "Recurrence frequency","Recurrence frequency"
14
+ "Recurrence frequency in days","Recurrence frequency in days"
15
+ "Recurrence expiry date","Recurrence expiry date"
16
+ "Expiry date formatted by aaaa-MM-jj","Expiry date formatted by aaaa-MM-jj"
17
+ "Enable log","Enable log"
18
+ "%s times","%s times"
19
+ "Direct Payment","Direct Payment"
20
+ "Recurring Payment","Recurring Payment"
21
+ "Deferred Payment","Deferred Payment"
22
+ "Pre-Authorization Payment","Pre-Authorization Payment"
23
+ "Pre-Authorization Confirmation Payment","Pre-Authorization Confirmation Payment"
24
+ "Annual Subscription Payment","Annual Subscription Payment"
25
+ "Test mode","Test mode"
26
+ "Production mode","Production mode"
27
+ "GPG Checkout fraud detection","GPG Checkout fraud detection"
28
+ "GPG Checkout fraud detection, transaction id n° %s","GPG Checkout fraud detection, transaction id n° %s"
29
+ "GPG Checkout has authorized the payment","GPG Checkout has authorized the payment"
30
+ "GPG Checkout has authorized the payment, transaction id n° %s", "GPG Checkout has authorized the payment, transaction id n° %s"
31
+ "GPG Checkout payment failed or cancelled","GPG Checkout payment failed or cancelled"
32
+ "GPG Checkout payment failed or cancelled, transaction id n° %s","GPG Checkout payment failed or cancelled, transaction id n° %s"
33
+ "%s payment log informations for order n° %s : %s","%s payment log informations for order n° %s : %s"
34
+ "fraud detection due to unverified signature","fraud detection due to unverified signature"
35
+ "GPG Checkout payment error, please check details for more information.","GPG Checkout payment error, please check details for more information."
36
+ "Gateway Test Url","Gateway Test Url"
37
+ "Gateway Production Url","Gateway Production Url"
38
+ "Please wait while you are redirected to GPG Checkout payment server ...","Please wait while you are redirected to GPG Checkout payment server ..."
app/locale/fr_FR/.DS_Store ADDED
Binary file
app/locale/fr_FR/Utiks_GpgCheckout.csv ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "Enabled","Activé"
2
+ "Title","Titre"
3
+ "New order status","Statut des nouvelles commandes"
4
+ "Mode","Mode"
5
+ "Given by GPG","Transmis par GPG"
6
+ "NumSite","NumSite"
7
+ "Password","Mot de passe"
8
+ "VAD code","Code VAD"
9
+ "Default currency","Devise par défaut"
10
+ "Terminal identification","Identification du terminal"
11
+ "Payment type","Type de paiement"
12
+ "Number of recurrence","Nombre des récurrences"
13
+ "Recurrence frequency","Fréquence des récurrences"
14
+ "Recurrence frequency in days","Récurrecnes en jours"
15
+ "Recurrence expiry date","Date d'expiration des récurrences"
16
+ "Expiry date formatted by aaaa-MM-jj","Date d'expiration formatté en aaaa-MM-jj"
17
+ "Enable log","Activer les logs"
18
+ "%s times","%s fois"
19
+ "Direct Payment","Paiement direct"
20
+ "Recurring Payment","Paiement récurent"
21
+ "Deferred Payment","Paiement différé"
22
+ "Pre-Authorization Payment","Paiement pré-autorisation"
23
+ "Pre-Authorization Confirmation Payment","Paiement pré-autorisation confirmation"
24
+ "Annual Subscription Payment","Paiement abonnement annuel"
25
+ "Test mode","Mode test"
26
+ "Production mode","Mode production"
27
+ "GPG Checkout fraud detection","GPG Checkout détection de fraude"
28
+ "GPG Checkout fraud detection, transaction id n° %s","GPG Checkout : détection de fraude, id transaction n° %s"
29
+ "GPG Checkout has authorized the payment","GPG Checkout : paiement autorisé"
30
+ "GPG Checkout has authorized the payment, transaction id n° %s", "GPG Checkout : paiement autorisé, id transaction n° %s"
31
+ "GPG Checkout payment failed or cancelled","GPG Checkout : paiement échoué ou annulé"
32
+ "GPG Checkout payment failed or cancelled, transaction id n° %s","GPG Checkout : paiement échoué ou annulé, id transaction n° %s"
33
+ "%s payment log informations for order n° %s : %s","%s informations de paiement pour la commande n° %s : %s"
34
+ "fraud detection due to unverified signature","Détection de fraude liée à la signature invalide"
35
+ "GPG Checkout payment error, please check details for more information.","GPG Checkout - Erreur de paiement. Veuillez vérifier les détails pour plus d'informations."
36
+ "Gateway Test Url","Url du gateway de test"
37
+ "Gateway Production Url","Url du gateway de production"
38
+ "Please wait while you are redirected to GPG Checkout payment server ...","Veuillez patienter, vous allez être redirigé vers le serveur de paiement GPG Checkout ..."
app/locale/fr_FR/Utiks_Predictionio.csv ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ "No","Non"
2
+ "Yes","Oui"
3
+ "Is Enabled","Activer"
4
+ "If disabled data will not be added to PredictionIO","Si Désactivé Magento va utiliser la recommandation par défault"
5
+ "PredictionIO Host","Adresse IP de serveur de PredictionIO"
6
+ "PredictionIO Post Data Port","Port de serveur de publication de donnée"
7
+ "PredictionIO Recommendation Port","Port de serveur de recommandation"
8
+ "Similarity Engine Key","Clé de Moteur de Similarité"
9
+ "Rate Event","Taux"
10
+ "Similarity Product Count","Nombre de Produits similaires"
11
+ "Number of products to return from PredictionIO","Nombre de produits à retourner par PredictionIO"
12
+ "Black List","Liste Noir"
13
+ "Products IDs that you don't want to be displayed in prediction result","IDs des Produits que vous ne voulez pas être affichés dans la résultat de prédiction"
package.xml CHANGED
@@ -1,19 +1,18 @@
1
- <?xml version="1.0"?>
2
- <package>
3
- <name>Utiks_GpgCheckout</name>
4
- <version>1.0.0</version>
5
- <stability>beta</stability>
6
- <license uri="http://opensource.org/licenses/osl-3.0.php">Open software License</license>
7
- <channel>community</channel>
8
- <extends/>
9
- <summary>Magento External Payment Extension for GPGCheckout Gateway in Tunisia</summary>
10
- <description>GPGCheckout is an electronic payment solution for any merchant wishing to integrate the online payment mode.&amp;#13;&#xD;
11
- GPGCheckout offers merchants the diversity of payment by Tunisian national credit card, international bank card, map of the Tunisian Post and the monarchy Electronic GP Pay</description>
12
- <notes>initial commit</notes>
13
- <authors><author><name>utiks</name><user>utiks</user><email>contact@utiks.com</email></author></authors>
14
- <date>2016-03-30</date>
15
- <time>15:37:01</time>
16
- <contents><target name="mageetc"><dir name="modules"><file name="Utiks_GpgCheckout.xml" hash="efa2a6f4ee608ed5c926a5cc34713a58"/></dir></target><target name="magecommunity"><dir name="Utiks"><dir name="GpgCheckout"><dir name="Block"><dir name="Form"><file name="GpgCheckout.php" hash="b5ee9a3b30d5e5241eda77292a0e0bdd"/></dir><dir name="Info"><file name="GpgCheckout.php" hash="c8e54a9f921e7f66f49c751039edc264"/></dir></dir><dir name="Helper"><file name="Data.php" hash="dd82cbaa3fb703eef3f5543379cfa9de"/></dir><dir name="Model"><file name="PaymentMethod.php" hash="7558798bf0116496845c7dd326b6dc1a"/><dir name="System"><dir name="Config"><dir name="Source"><file name="GatewayUrls.php" hash="5fcca4593cf6afd764ff4b8ffd6469ca"/><file name="PaymentType.php" hash="a0f67c7ac9845cd2137e006b6f7471ce"/><file name="ReccuNumber.php" hash="4d0ae9b880d83b075b1201564c451814"/></dir></dir></dir></dir><dir name="controllers"><file name="PaymentController.php" hash="be4f9c5efc8632c90bfee2e247b82eb4"/></dir><dir name="etc"><file name="config.xml" hash="1296498a655e5ad4f88f4be95423d98d"/><file name="system.xml" hash="7ca7641326c1044cfbf33909396d90fc"/></dir></dir></dir></target><target name="magemedia"><dir name="gpgcheckout"><file name="gpg-ko-state.png" hash="2d05ecee763b5d2eb6ca9149415ce168"/><file name="gpg-ok-state.png" hash="fe355823327684b8e9e63ae947eda6e4"/><file name="gpgcheckout.png" hash="456447607042d77a147590dbb605659e"/><file name="logo_gpg_paiement.png" hash="a07aa9f9c1a45c1286156e78fe250c93"/></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="gpgcheckout"><dir name="form"><file name="paymentmethod.phtml" hash="f779ffb7cbceb0c7352345edf4b77940"/></dir><dir name="info"><file name="gpg-checkout.phtml" hash="05ddfa8ff11d8fa0af1eaf2cb2bbca11"/></dir><file name="redirect.phtml" hash="601129bf6b8ff138307c79e5a1bdf8b7"/></dir></dir><dir name="layout"><file name="gpgcheckout.xml" hash="6c22a8a25bf28dc4d71e2b7509dadd7e"/></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="gpgcheckout"><dir name="info"><file name="gpg-checkout.phtml" hash="25bef8d05e66db2a1c32e027c887aa72"/></dir></dir></dir></dir></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="css"><dir name="gpgcheckout"><file name="loading.css" hash="43abcc3c3c20df299f5c88efdd55cd22"/></dir></dir></dir></dir></dir></target></contents>
17
- <compatible/>
18
- <dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
19
- </package>
1
+ <?xml version="1.0"?>
2
+ <package>
3
+ <name>Utiks_GpgCheckout</name>
4
+ <version>0.1.1</version>
5
+ <stability>beta</stability>
6
+ <license uri="http://opensource.org/licenses/osl-3.0.php">Open Software License</license>
7
+ <channel>community</channel>
8
+ <extends/>
9
+ <summary>Magento External Payment Extension for GPGCheckout Gateway in Tunisia</summary>
10
+ <description>GPGCheckout is an electronic payment solution for any merchant wishing to integrate the online payment mode. GPGCheckout offers merchants the diversity of payment by Tunisian national credit card, international bank card, map of the Tunisian Post and the monarchy Electronic GP Pay</description>
11
+ <notes>First version of the module.</notes>
12
+ <authors><author><name>Utiks</name><user>Utiks</user><email>contact@utiks.com</email></author></authors>
13
+ <date>2016-05-06</date>
14
+ <time>09:36:54</time>
15
+ <contents><target name="magecommunity"><dir name="Utiks"><dir name="GpgCheckout"><dir name="Block"><dir name="Form"><file name="GpgCheckout.php" hash="328ffa953a448393ec576c8f9887ec23"/></dir><dir name="Info"><file name="GpgCheckout.php" hash="b6f2abdfe730541c7fe410cce306b962"/></dir></dir><dir name="Helper"><file name="Data.php" hash="c3de0fa45c0528eff54bbad326db93c3"/></dir><dir name="Model"><file name="PaymentMethod.php" hash="7402b392c7ebef0f33975f1fbd3bed0a"/><dir name="System"><dir name="Config"><dir name="Source"><file name="GatewayUrls.php" hash="787c07313bfce2e192683d43caa6b6d6"/><file name="PaymentType.php" hash="0af3f90b6f0ce0924b29f97557b988ae"/><file name="ReccuNumber.php" hash="148f62fa6cd157baca3e92ce63141a5e"/></dir></dir></dir></dir><dir name="controllers"><file name="PaymentController.php" hash="e9d202043b407eaa864eb24f7b4ecccc"/></dir><dir name="etc"><file name="config.xml" hash="ea6e06d6c9c0bf394148d2d9394a636f"/><file name="system.xml" hash="6e428f4a27085ae59ca50f8381dfe918"/></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Utiks_GpgCheckout.xml" hash="c0500636875a3167c794d7118f4f1512"/></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="gpgcheckout"><dir name="info"><file name="gpg-checkout.phtml" hash="9c5e4abc25d3d39c9d7f06e3f4f72c4a"/></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="gpgcheckout.xml" hash="1ede58404839da4d41ffb856cb30b2c5"/></dir><dir name="template"><dir name="gpgcheckout"><dir name="form"><file name="paymentmethod.phtml" hash="f779ffb7cbceb0c7352345edf4b77940"/></dir><dir name="info"><file name="gpg-checkout.phtml" hash="fcd9e62f4884823506a430efeccbc93a"/></dir><file name="redirect.phtml" hash="bf96b2ea79521abc7ea567a1d89d69de"/></dir></dir></dir></dir></dir></target><target name="magelocale"><dir name="fr_FR"><file name="Utiks_GpgCheckout.csv" hash="7a45b58bafb0fd0b60cc3dc27d32a5f8"/><file name="Utiks_Predictionio.csv" hash="39dbfd4c226083cf91ac033ddfa1b359"/><file name=".DS_Store" hash="ffdfea162a91569e603e5bed30cf9177"/></dir><dir name="en_US"><file name="Utiks_GpgCheckout.csv" hash="8f695da9e4735f49fda52704dc2aa837"/></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="css"><dir name="gpgcheckout"><file name="loading.css" hash="8f9f19b88f393f8bc3cc7951329f8775"/></dir></dir></dir></dir></dir></target><target name="magemedia"><dir name="gpgcheckout"><file name="gpg-ko-state.png" hash="2d05ecee763b5d2eb6ca9149415ce168"/><file name="gpg-ok-state.png" hash="fe355823327684b8e9e63ae947eda6e4"/><file name="gpgcheckout.png" hash="456447607042d77a147590dbb605659e"/><file name="logo_gpg_paiement.png" hash="a07aa9f9c1a45c1286156e78fe250c93"/></dir></target></contents>
16
+ <compatible/>
17
+ <dependencies><required><php><min>5.1.0</min><max>6.0.0</max></php></required></dependencies>
18
+ </package>
 
skin/frontend/base/default/css/gpgcheckout/loading.css CHANGED
@@ -1,78 +1,9 @@
1
  /* This CSS file just define some default styles and loaders */
2
  /* You don't need to include it if you're working with your custom overlay loader element */
3
-
4
- .ball {
5
- background-color: rgba(0,0,0,0);
6
- border: 5px solid rgba(0,183,229,0.9);
7
- opacity: .9;
8
- border-top: 5px solid rgba(0,0,0,0);
9
- border-left: 5px solid rgba(0,0,0,0);
10
- border-radius: 50px;
11
- box-shadow: 0 0 35px #2187e7;
12
- width: 50px;
13
- height: 50px;
14
- margin: 0 auto;
15
- -moz-animation: spin .5s infinite linear;
16
- -webkit-animation: spin .5s infinite linear;
17
- }
18
-
19
- .ball1 {
20
- background-color: rgba(0,0,0,0);
21
- border: 5px solid rgba(0,183,229,0.9);
22
- opacity: .9;
23
- border-top: 5px solid rgba(0,0,0,0);
24
- border-left: 5px solid rgba(0,0,0,0);
25
- border-radius: 50px;
26
- box-shadow: 0 0 15px #2187e7;
27
- width: 30px;
28
- height: 30px;
29
- margin: 0 auto;
30
- position: relative;
31
- top: -50px;
32
- -moz-animation: spinoff .5s infinite linear;
33
- -webkit-animation: spinoff .5s infinite linear;
34
- }
35
-
36
- @-moz-keyframes spin {
37
- 0% {
38
- -moz-transform: rotate(0deg);
39
- }
40
-
41
- 100% {
42
- -moz-transform: rotate(360deg);
43
- };
44
- }
45
-
46
- @-moz-keyframes spinoff {
47
- 0% {
48
- -moz-transform: rotate(0deg);
49
- }
50
-
51
- 100% {
52
- -moz-transform: rotate(-360deg);
53
- };
54
- }
55
-
56
- @-webkit-keyframes spin {
57
- 0% {
58
- -webkit-transform: rotate(0deg);
59
- }
60
-
61
- 100% {
62
- -webkit-transform: rotate(360deg);
63
- };
64
- }
65
-
66
- @-webkit-keyframes spinoff {
67
- 0% {
68
- -webkit-transform: rotate(0deg);
69
- }
70
-
71
- 100% {
72
- -webkit-transform: rotate(-360deg);
73
- };
74
- }
75
  .gpg_redirect_title {
76
  margin-bottom: 30px;
77
  text-align: center;
 
 
 
78
  }
1
  /* This CSS file just define some default styles and loaders */
2
  /* You don't need to include it if you're working with your custom overlay loader element */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  .gpg_redirect_title {
4
  margin-bottom: 30px;
5
  text-align: center;
6
+ }
7
+ #gpg-payment-form {
8
+ height: 0px;
9
  }