Version Notes
initial commit
Download this release
Release Info
Developer | Utiks |
Extension | gpg-checkout |
Version | 0.1.0 |
Comparing to | |
See all releases |
Version 0.1.0
- app/code/community/Utiks/GpgCheckout/Block/Form/GpgCheckout.php +36 -0
- app/code/community/Utiks/GpgCheckout/Block/Info/GpgCheckout.php +70 -0
- app/code/community/Utiks/GpgCheckout/Helper/Data.php +173 -0
- app/code/community/Utiks/GpgCheckout/Model/PaymentMethod.php +61 -0
- app/code/community/Utiks/GpgCheckout/Model/System/Config/Source/GatewayUrls.php +40 -0
- app/code/community/Utiks/GpgCheckout/Model/System/Config/Source/PaymentType.php +45 -0
- app/code/community/Utiks/GpgCheckout/Model/System/Config/Source/ReccuNumber.php +42 -0
- app/code/community/Utiks/GpgCheckout/controllers/PaymentController.php +169 -0
- app/code/community/Utiks/GpgCheckout/etc/config.xml +60 -0
- app/code/community/Utiks/GpgCheckout/etc/system.xml +146 -0
- app/design/adminhtml/default/default/template/gpgcheckout/info/gpg-checkout.phtml +55 -0
- app/design/frontend/base/default/layout/gpgcheckout.xml +8 -0
- app/design/frontend/base/default/template/gpgcheckout/form/paymentmethod.phtml +1 -0
- app/design/frontend/base/default/template/gpgcheckout/info/gpg-checkout.phtml +22 -0
- app/design/frontend/base/default/template/gpgcheckout/redirect.phtml +55 -0
- app/etc/modules/Utiks_GpgCheckout.xml +12 -0
- media/gpgcheckout/gpg-ko-state.png +0 -0
- media/gpgcheckout/gpg-ok-state.png +0 -0
- media/gpgcheckout/gpgcheckout.png +0 -0
- media/gpgcheckout/logo_gpg_paiement.png +0 -0
- package.xml +19 -0
- skin/frontend/base/default/css/gpgcheckout/loading.css +78 -0
app/code/community/Utiks/GpgCheckout/Block/Form/GpgCheckout.php
ADDED
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
{
|
28 |
+
/**
|
29 |
+
* Constructor
|
30 |
+
*/
|
31 |
+
protected function _construct()
|
32 |
+
{
|
33 |
+
parent::_construct();
|
34 |
+
$this->setTemplate('gpgcheckout/form/paymentmethod.phtml');
|
35 |
+
}
|
36 |
+
}
|
app/code/community/Utiks/GpgCheckout/Block/Info/GpgCheckout.php
ADDED
@@ -0,0 +1,70 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
{
|
28 |
+
|
29 |
+
protected $_helper;
|
30 |
+
|
31 |
+
/**
|
32 |
+
* Constructor
|
33 |
+
*/
|
34 |
+
public function _construct()
|
35 |
+
{
|
36 |
+
parent::_construct();
|
37 |
+
$this->setTemplate('gpgcheckout/info/gpg-checkout.phtml');
|
38 |
+
$this->_helper = Mage::helper('utiks_gpgcheckout');
|
39 |
+
}
|
40 |
+
|
41 |
+
/**
|
42 |
+
* Return information to be showed in order admin page
|
43 |
+
*
|
44 |
+
* @return array|Varien_Object
|
45 |
+
*/
|
46 |
+
protected function renderAdditionalPaymentData()
|
47 |
+
{
|
48 |
+
|
49 |
+
if (null !== $this->_paymentSpecificInformation) {
|
50 |
+
return $this->_paymentSpecificInformation;
|
51 |
+
}
|
52 |
+
$info = $this->getInfo();
|
53 |
+
$data = unserialize($info->getData('additional_data'));
|
54 |
+
if ($data['transactionStatus'] == '00') {
|
55 |
+
$data['transactionStatus'] = array('value' => $data['transactionStatus'], 'state' => true);
|
56 |
+
} elseif ($data['transactionStatus'] == '05' || $data['transactionStatus'] == '06' || $data['transactionStatus'] == '02') {
|
57 |
+
$data['transactionStatus'] = array('value' => $data['transactionStatus'], 'state' => false);
|
58 |
+
}
|
59 |
+
$paymentHelper = Mage::helper('payment');
|
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 |
+
|
67 |
+
return $transport;
|
68 |
+
}
|
69 |
+
}
|
70 |
+
|
app/code/community/Utiks/GpgCheckout/Helper/Data.php
ADDED
@@ -0,0 +1,173 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
*
|
42 |
+
* @param string $type
|
43 |
+
*
|
44 |
+
* @return null|string
|
45 |
+
*/
|
46 |
+
public function getPaymentType($type)
|
47 |
+
{
|
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 |
+
|
70 |
+
return $paymentType;
|
71 |
+
}
|
72 |
+
|
73 |
+
|
74 |
+
/**
|
75 |
+
* Return logo image
|
76 |
+
*
|
77 |
+
* @return string
|
78 |
+
*/
|
79 |
+
public function getGpgCheckoutLogo()
|
80 |
+
{
|
81 |
+
$url = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA) . '/gpgcheckout/gpgcheckout.png';
|
82 |
+
return $url;
|
83 |
+
}
|
84 |
+
|
85 |
+
/**
|
86 |
+
* Return payment image state
|
87 |
+
*
|
88 |
+
* @return string $url
|
89 |
+
*/
|
90 |
+
public function getGpgState()
|
91 |
+
{
|
92 |
+
$url = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_MEDIA) . 'gpgcheckout/';
|
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 |
+
/**
|
110 |
+
* Get current Order Id
|
111 |
+
*
|
112 |
+
* @return mixed
|
113 |
+
*/
|
114 |
+
public function getOrderId()
|
115 |
+
{
|
116 |
+
return Mage::getSingleton('checkout/session')->getLastOrderId();
|
117 |
+
}
|
118 |
+
|
119 |
+
/**
|
120 |
+
* Get Order Data
|
121 |
+
*
|
122 |
+
* @param $orderId
|
123 |
+
* @return array|null
|
124 |
+
*/
|
125 |
+
public function getOrderData($orderId)
|
126 |
+
{
|
127 |
+
$data = null;
|
128 |
+
$order = Mage::getModel('sales/order');
|
129 |
+
$order->load($orderId);
|
130 |
+
if ($order) {
|
131 |
+
$data = array(
|
132 |
+
'orderAmount' => $order->getGrandTotal(),
|
133 |
+
'OrderDevice' => $order->getOrderCurrencyCode(),
|
134 |
+
'OrderItems' => $this->getOrderItemsNames($order)
|
135 |
+
);
|
136 |
+
}
|
137 |
+
|
138 |
+
return $data;
|
139 |
+
}
|
140 |
+
|
141 |
+
/**
|
142 |
+
* Get all order items names
|
143 |
+
*
|
144 |
+
* @param $order
|
145 |
+
* @return string
|
146 |
+
*/
|
147 |
+
public function getOrderItemsNames($order)
|
148 |
+
{
|
149 |
+
$orderItems = array();
|
150 |
+
foreach ($order->getAllVisibleItems() as $item) {
|
151 |
+
$orderItems[] = round($item->getQtyOrdered()) . '*' . $item->getName();
|
152 |
+
}
|
153 |
+
|
154 |
+
return implode(',', $orderItems);
|
155 |
+
}
|
156 |
+
|
157 |
+
/**
|
158 |
+
* Get customer information
|
159 |
+
*
|
160 |
+
* @param string $orderId
|
161 |
+
*
|
162 |
+
* @return array
|
163 |
+
*/
|
164 |
+
public function getOrderCustomerData($orderId)
|
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 |
+
}
|
173 |
+
}
|
app/code/community/Utiks/GpgCheckout/Model/PaymentMethod.php
ADDED
@@ -0,0 +1,61 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
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 |
+
/**
|
35 |
+
* Return redirect url
|
36 |
+
*
|
37 |
+
* @return string
|
38 |
+
*/
|
39 |
+
public function getOrderPlaceRedirectUrl()
|
40 |
+
{
|
41 |
+
return Mage::getUrl('gpgcheckout/payment/redirect', array('_secure' => true));
|
42 |
+
}
|
43 |
+
|
44 |
+
/**
|
45 |
+
* Check whether payment method can be used
|
46 |
+
*
|
47 |
+
* @param null $quote
|
48 |
+
*
|
49 |
+
* @return bool
|
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);
|
57 |
+
}
|
58 |
+
|
59 |
+
return false;
|
60 |
+
}
|
61 |
+
}
|
app/code/community/Utiks/GpgCheckout/Model/System/Config/Source/GatewayUrls.php
ADDED
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
{
|
28 |
+
/**
|
29 |
+
* Options getter
|
30 |
+
*
|
31 |
+
* @return array
|
32 |
+
*/
|
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 |
+
}
|
app/code/community/Utiks/GpgCheckout/Model/System/Config/Source/PaymentType.php
ADDED
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
{
|
28 |
+
|
29 |
+
/**
|
30 |
+
* Options getter
|
31 |
+
*
|
32 |
+
* @return array
|
33 |
+
*/
|
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 |
+
}
|
app/code/community/Utiks/GpgCheckout/Model/System/Config/Source/ReccuNumber.php
ADDED
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
{
|
28 |
+
|
29 |
+
/**
|
30 |
+
* Options getter
|
31 |
+
*
|
32 |
+
* @return array
|
33 |
+
*/
|
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 |
+
}
|
app/code/community/Utiks/GpgCheckout/controllers/PaymentController.php
ADDED
@@ -0,0 +1,169 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
*/
|
45 |
+
public function _construct()
|
46 |
+
{
|
47 |
+
$this->_helper = Mage::helper('utiks_gpgcheckout');
|
48 |
+
$this->_logs = $this->_helper->getStoreConfigByName('logs');
|
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()
|
149 |
+
{
|
150 |
+
return $this->_helper;
|
151 |
+
}
|
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 |
+
}
|
app/code/community/Utiks/GpgCheckout/etc/config.xml
ADDED
@@ -0,0 +1,60 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<Utiks_GpgCheckout>
|
5 |
+
<version>0.1.0</version>
|
6 |
+
</Utiks_GpgCheckout>
|
7 |
+
</modules>
|
8 |
+
<global>
|
9 |
+
<models>
|
10 |
+
<utiks_gpgcheckout>
|
11 |
+
<class>Utiks_GpgCheckout_Model</class>
|
12 |
+
<resourceModel>utiks_gpgcheckout_resource</resourceModel>
|
13 |
+
</utiks_gpgcheckout>
|
14 |
+
<utiks_gpgcheckout_resource>
|
15 |
+
<class>Utiks_GpgCheckout_Model_Resource</class>
|
16 |
+
</utiks_gpgcheckout_resource>
|
17 |
+
</models>
|
18 |
+
<blocks>
|
19 |
+
<utiks_gpgcheckout>
|
20 |
+
<class>Utiks_GpgCheckout_Block</class>
|
21 |
+
</utiks_gpgcheckout>
|
22 |
+
</blocks>
|
23 |
+
<helpers>
|
24 |
+
<utiks_gpgcheckout>
|
25 |
+
<class>Utiks_GpgCheckout_Helper</class>
|
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>
|
45 |
+
<use>standard</use>
|
46 |
+
<args>
|
47 |
+
<frontName>gpgcheckout</frontName>
|
48 |
+
<module>Utiks_GpgCheckout</module>
|
49 |
+
</args>
|
50 |
+
</gpgcheckout>
|
51 |
+
</routers>
|
52 |
+
<layout>
|
53 |
+
<updates>
|
54 |
+
<utiks_gpgcheckout>
|
55 |
+
<file>gpgcheckout.xml</file>
|
56 |
+
</utiks_gpgcheckout>
|
57 |
+
</updates>
|
58 |
+
</layout>
|
59 |
+
</frontend>
|
60 |
+
</config>
|
app/code/community/Utiks/GpgCheckout/etc/system.xml
ADDED
@@ -0,0 +1,146 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
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>
|
14 |
+
<frontend_type>select</frontend_type>
|
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>
|
102 |
+
</payment_type>
|
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>
|
117 |
+
<value>2</value>
|
118 |
+
</payment_type>
|
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 |
+
|
145 |
+
</sections>
|
146 |
+
</config>
|
app/design/adminhtml/default/default/template/gpgcheckout/info/gpg-checkout.phtml
ADDED
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
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;
|
12 |
+
height: 15px;
|
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>
|
23 |
+
<th colspan="3">
|
24 |
+
|
25 |
+
</th>
|
26 |
+
</tr>
|
27 |
+
<?php foreach ($_additionalInfo as $key => $value): ?>
|
28 |
+
<tr>
|
29 |
+
<th><?php echo $key; ?></th>
|
30 |
+
<td><?php
|
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>
|
43 |
+
|
44 |
+
</tr>
|
45 |
+
<?php endforeach; ?>
|
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 |
+
|
app/design/frontend/base/default/layout/gpgcheckout.xml
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
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>
|
app/design/frontend/base/default/template/gpgcheckout/form/paymentmethod.phtml
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
<!-- put your custom payment method template here -->
|
app/design/frontend/base/default/template/gpgcheckout/info/gpg-checkout.phtml
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
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>
|
10 |
+
|
11 |
+
<?php if ($_specificInfo = $this->getSpecificInformation()):?>
|
12 |
+
<dl class="payment-info">
|
13 |
+
<?php foreach ($_specificInfo as $_label => $_value):?>
|
14 |
+
<dt><?php echo $this->escapeHtml($_label)?></dt>
|
15 |
+
<dd><?php echo nl2br(implode($this->getValueAsArray($_value, true), "\n"))?></dd>
|
16 |
+
<?php endforeach; ?>
|
17 |
+
</dl>
|
18 |
+
<?php endif;?>
|
19 |
+
<div>
|
20 |
+
<img src="<?php echo Mage::getBaseUrl('media')."gpgcheckout/gpgcheckout.png" ?>" />
|
21 |
+
</div>
|
22 |
+
<?php echo $this->getChildHtml()?>
|
app/design/frontend/base/default/template/gpgcheckout/redirect.phtml
ADDED
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
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
|
10 |
+
$helper = Mage::helper('utiks_gpgcheckout');
|
11 |
+
$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/>
|
28 |
+
<input type="hidden" name="Amount" value="<?php echo $amount; ?>"><br/><br/>
|
29 |
+
<input type="hidden" name="Currency" value="<?php echo $devise; ?>"><br/><br/>
|
30 |
+
<input type="hidden" name="Language" value="<?php echo $language; ?>"><br/><br/>
|
31 |
+
<input type="hidden" name="EMAIL" value="<?php echo $customerData['email']; ?>"><br/><br/>
|
32 |
+
<input type="hidden" name="CustLastName" value="<?php echo $customerData['lastname']; ?>"><br/><br/>
|
33 |
+
<input type="hidden" name="CustFirstName" value="<?php echo $customerData['firstname']; ?>"><br/><br/>
|
34 |
+
<input type="hidden" name="CustAddress" value="<?php echo $customerData['city'] . ',' . $customerData['street'] . ',' . $customerData['postcode']; ?>"><br/><br/>
|
35 |
+
<input type="hidden" name="CustZIP" value="<?php echo $customerData['postcode']; ?>"><br/><br/>
|
36 |
+
<input type="hidden" name="CustCity" value="<?php echo $customerData['city']; ?>"><br/><br/>
|
37 |
+
<input type="hidden" name="CustCountry" value="<?php echo $customerData['country_id']; ?>"><br/><br/>
|
38 |
+
<input type="hidden" name="CustTel" value="<?php echo $customerData['telephone']; ?>"><br/><br/>
|
39 |
+
<input type="hidden" name="PayementType" value="<?php echo $helper->getStoreConfigByName('payment_type'); ?>"><br/><br/>
|
40 |
+
<input type="hidden" name="MerchandSession" value=""><br/><br/>
|
41 |
+
<input type="hidden" name="orderProducts" value="<?php echo $orderProducts ?>"><br/><br/>
|
42 |
+
<input type="hidden" name="signature" value="<?php echo $signture; ?>"><br/><br/>
|
43 |
+
<input type="hidden" name="AmountSecond" value=""><br/><br/>
|
44 |
+
<input type="hidden" name="vad" value="<?php echo $helper->getStoreConfigByName('vad_number'); ?>"><br/><br/>
|
45 |
+
<input type="hidden" name="Terminal" value="<?php echo $helper->getStoreConfigByName('terminal'); ?>"><br/><br/>
|
46 |
+
<input type="hidden" name="TauxConversion" value=" "><br/><br/>
|
47 |
+
<input type="hidden" name="BatchNumber" value=" "><br/><br/>
|
48 |
+
<input type="hidden" name="MerchantReference" value=" "><br/><br/>
|
49 |
+
<input type="hidden" name="Reccu_Num" value="<?php echo $helper->getStoreConfigByName('reccu_num'); ?>"><br/><br/>
|
50 |
+
<input type="hidden" name="Reccu_ExpiryDate " value="<?php echo $helper->getStoreConfigByName('reccu_expiryDate'); ?>"><br/><br/>
|
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>
|
app/etc/modules/Utiks_GpgCheckout.xml
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?xml version="1.0"?>
|
2 |
+
<config>
|
3 |
+
<modules>
|
4 |
+
<Utiks_GpgCheckout>
|
5 |
+
<active>true</active>
|
6 |
+
<codePool>local</codePool>
|
7 |
+
<depends>
|
8 |
+
<Mage_Payment/>
|
9 |
+
</depends>
|
10 |
+
</Utiks_GpgCheckout>
|
11 |
+
</modules>
|
12 |
+
</config>
|
media/gpgcheckout/gpg-ko-state.png
ADDED
Binary file
|
media/gpgcheckout/gpg-ok-state.png
ADDED
Binary file
|
media/gpgcheckout/gpgcheckout.png
ADDED
Binary file
|
media/gpgcheckout/logo_gpg_paiement.png
ADDED
Binary file
|
package.xml
ADDED
@@ -0,0 +1,19 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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.&#13;
|
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>
|
skin/frontend/base/default/css/gpgcheckout/loading.css
ADDED
@@ -0,0 +1,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 |
+
|
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 |
+
}
|