Compropago_Payment_Extension - Version 1.0.0

Version Notes

Fixed minor Bugs

Download this release

Release Info

Developer Oswaldo Lopez Garcia
Extension Compropago_Payment_Extension
Version 1.0.0
Comparing to
See all releases


Version 1.0.0

app/code/community/Compropago/Block/Form.php ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Description of Form
4
+ *
5
+ * @author waldix <waldix86@gmail.com>
6
+ */
7
+ class Compropago_Block_Form extends Mage_Payment_Block_Form
8
+ {
9
+ protected function _construct()
10
+ {
11
+ parent::_construct();
12
+ $this->setTemplate('compropago/cash.phtml');
13
+ }
14
+
15
+ public function getMethod()
16
+ {
17
+ return parent::getMethod();
18
+ }
19
+
20
+ }
app/code/community/Compropago/Block/OnepageSuccess.php ADDED
@@ -0,0 +1,13 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class Compropago_Block_OnepageSuccess extends Mage_Checkout_Block_Onepage_Success
4
+ {
5
+ // Write your custom methods
6
+ // All parent’s methods also will work
7
+ protected function _beforeToHtml()
8
+ {
9
+ $outHtml = parent::_beforeToHtml();
10
+ $this->setTemplate('compropago/onepage_success.phtml');
11
+ return $outHtml;
12
+ }
13
+ }
app/code/community/Compropago/Helper/Data.php ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * @category Phoenix
16
+ * @package Phoenix_Moneybookers
17
+ * @copyright Copyright (c) 2013 Phoenix Medien GmbH & Co. KG (http://www.phoenix-medien.de)
18
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
19
+ */
20
+ class Compropago_Helper_Data extends Mage_Payment_Helper_Data
21
+ {
22
+
23
+ }
app/code/community/Compropago/Model/Api.php ADDED
@@ -0,0 +1,106 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * API para el consumo de los servicios
4
+ * de PagoFacil
5
+ * @author ivelazquex <isai.velazquez@gmail.com>
6
+ */
7
+ class Compropago_Model_Api
8
+ {
9
+ // --- ATTRIBUTES ---
10
+ /**
11
+ * URL del servicio de PagoFacil en ambiente de produccion
12
+ * @var string
13
+ */
14
+ protected $_url = 'https://api.compropago.com/v1/charges';
15
+
16
+ /**
17
+ * respuesta sin parsear del servicio
18
+ * @var string
19
+ */
20
+ protected $_response = NULL;
21
+
22
+
23
+ // --- OPERATIONS ---
24
+
25
+ public function __construct()
26
+ {
27
+
28
+ }
29
+
30
+ /**
31
+ * consume el servicio de pago de PagoFacil
32
+ * @param string[] vector con la informacion de la peticion
33
+ * @return mixed respuesta del consumo del servicio
34
+ * @throws Exception
35
+ */
36
+ public function payment($info)
37
+ {
38
+ $response = null;
39
+ // NOTA la url a la cual s edebe conectar en produccion no viene
40
+ // la direccion de produccion en el documento
41
+
42
+ if (!is_array($info))
43
+ {
44
+ throw new Exception('parameter is not an array');
45
+ }
46
+
47
+ $info['url'] = $this->_url;
48
+
49
+ // datos para la peticion del servicio
50
+ $data = array(
51
+ 'order_id' => $info['order_id'],
52
+ 'order_price' => $info['order_price'],
53
+ 'order_name' => $info['order_name'],
54
+ 'image_url' => $info['image_url'],
55
+ 'customer_name' => $info['customer_name'],
56
+ 'customer_email' => $info['customer_email'],
57
+ 'payment_type' => $info['payment_type']
58
+ );
59
+
60
+ $username = $info['client_secret'];
61
+ $password = $info['client_id'];
62
+
63
+ // consumo del servicio
64
+ $ch = curl_init();
65
+ curl_setopt($ch, CURLOPT_URL, $this->_url);
66
+ curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type:application/json'));
67
+ curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
68
+ curl_setopt($ch, CURLOPT_USERPWD, $username . ":");
69
+ curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
70
+ curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
71
+ curl_setopt($ch, CURLOPT_POST, true);
72
+ curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
73
+
74
+ // Blindly accept the certificate
75
+ $this->_response = curl_exec($ch);
76
+ curl_close($ch);
77
+
78
+ // tratamiento de la respuesta del servicio
79
+ $response = json_decode($this->_response,true);
80
+
81
+ // respuesta del servicio
82
+ if ($response == null)
83
+ {
84
+ Mage::throwException("El servicio de Compropago no se encuentra disponible.");
85
+ }
86
+
87
+ if ($response['type'] == "error")
88
+ {
89
+ $errorMessage = $response['message'] . "\n";
90
+ Mage::throwException($errorMessage);
91
+ }
92
+
93
+
94
+ return $response;
95
+ }
96
+
97
+ /**
98
+ * obtiene la respuesta del servicio
99
+ * @return string
100
+ */
101
+ public function getResponse()
102
+ {
103
+ return $this->_response;
104
+ }
105
+
106
+ }
app/code/community/Compropago/Model/Standard.php ADDED
@@ -0,0 +1,237 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Description of Standard
4
+ *
5
+ * @author ivelazquex <isai.velazquez@gmail.com>
6
+ */
7
+ class Compropago_Model_Standard extends Mage_Payment_Model_Method_Abstract
8
+ {
9
+ protected $_code = 'compropago';
10
+ protected $_formBlockType = 'compropago/form';
11
+
12
+ protected $_canUseForMultiShipping = false;
13
+ protected $_canUseInternal = false;
14
+ protected $_isInitializeNeeded = true;
15
+
16
+
17
+ public function assignData($data)
18
+ {
19
+ $customer = Mage::getSingleton('customer/session')->getCustomer();
20
+
21
+ if (!($data instanceof Varien_Object))
22
+ {
23
+ $data = new Varien_Object($data);
24
+ }
25
+
26
+ if ($data->getStoreCode())
27
+ {
28
+ //Verificamos si existe el customer
29
+ if($customer->getFirstname()){
30
+ $info = array(
31
+ "payment_type" => $data->getStoreCode(),
32
+ "customer_name" => htmlentities($customer->getFirstname()),
33
+ "customer_email" => htmlentities($customer->getEmail())
34
+ );
35
+ } else {
36
+ $sessionCheckout = Mage::getSingleton('checkout/session');
37
+ $quote = $sessionCheckout->getQuote();
38
+ $billingAddress = $quote->getBillingAddress();
39
+ $billing = $billingAddress->getData();
40
+ $info = array(
41
+ "payment_type" => $data->getStoreCode(),
42
+ "customer_name" => htmlentities($billing['firstname']),
43
+ "customer_email" => htmlentities($billing['email'])
44
+ );
45
+ }
46
+
47
+ $infoInstance = $this->getInfoInstance();
48
+ $infoInstance->setAdditionalData(serialize($info));
49
+ } else {
50
+ Mage::throwException("Para continuar, selecciona el establecimiento de tu conveniencia.");
51
+ }
52
+
53
+ return $this;
54
+ }
55
+
56
+ public function initialize($paymentAction, $stateObject)
57
+ {
58
+ parent::initialize($paymentAction, $stateObject);
59
+
60
+ if($paymentAction != 'sale')
61
+ {
62
+ return $this;
63
+ }
64
+
65
+ // Set the default state of the new order.
66
+ $state = Mage_Sales_Model_Order::STATE_PENDING_PAYMENT; // state now = 'pending_payment'
67
+ $stateObject->setState($state);
68
+ $stateObject->setStatus($state);
69
+ $stateObject->setIsNotified(false);
70
+
71
+ //Retrieve cart/quote information.
72
+ $sessionCheckout = Mage::getSingleton('checkout/session');
73
+ $quoteId = $sessionCheckout->getQuoteId();
74
+
75
+ // obtiene el quote para informacion de la orden
76
+ $quote = Mage::getModel("sales/quote")->load($quoteId);
77
+ $grandTotal = $quote->getData('grand_total');
78
+ $subTotal = $quote->getSubtotal();
79
+ $shippingHandling = ($grandTotal-$subTotal);
80
+
81
+ $convertQuote = Mage::getSingleton('sales/convert_quote');
82
+ $order = $convertQuote->toOrder($quote);
83
+ $orderNumber = $order->getIncrementId();
84
+ $order1 = Mage::getModel('sales/order')->loadByIncrementId($orderNumber);
85
+
86
+ foreach ($order1->getAllItems() as $item) {
87
+ $name .= $item->getName();
88
+ }
89
+
90
+ // obtener datos del pago en info y asignar monto total
91
+ $infoIntance = $this->getInfoInstance();
92
+ $info = unserialize($infoIntance->getAdditionalData());
93
+ $info['order_id'] = $orderNumber;
94
+ $info['order_price'] = $grandTotal;
95
+ $info['order_name'] = $name;
96
+ $info['client_secret'] = trim($this->getConfigData('client_secret'));
97
+ $info['client_id'] = trim($this->getConfigData('client_id'));
98
+
99
+ $logo = $this->getConfigData('logo_success_src') ? Mage::getDesign()->getSkinUrl('images/compropago/'.$this->getConfigData('logo_success_src')) : Mage::getDesign()->getSkinUrl(Mage::getStoreConfig('design/header/logo_src'));
100
+
101
+ // enviar pago
102
+ try
103
+ {
104
+ $Api = new Compropago_Model_Api();
105
+ $response = $Api->payment($info);
106
+ }
107
+ catch (Exception $error)
108
+ {
109
+ Mage::throwException($error->getMessage());
110
+ }
111
+
112
+ // respuesta del servicio
113
+ if ($response == null)
114
+ {
115
+ Mage::throwException("El servicio de Compropago no se encuentra disponible.");
116
+ }
117
+
118
+ if ($response['type'] == "error")
119
+ {
120
+ $errorMessage = $response['message'] . "\n";
121
+ Mage::throwException($errorMessage);
122
+ }
123
+
124
+
125
+ if($response['api_version'] == '1.0'){
126
+ $expiration_date = $response['expiration_date'];
127
+ $reference = $response['short_payment_id'];
128
+ $instructions = $response['payment_instructions'];
129
+ $step_1 = $instructions['step_1'];
130
+ $step_2 = $instructions['step_2'];
131
+ $step_3 = $instructions['step_3'];
132
+ $bank_number = $instructions['details']['bank_account_number'];
133
+ $bank_name = $instructions['details']['bank_name'];
134
+ $note_extra_comition = $instructions['note_extra_comition'];
135
+ $note_expiration_date = $instructions['note_expiration_date'];
136
+ $api_version = $response['api_version'];
137
+ } elseif ($response['api_version'] == '1.1') {
138
+ $expiration_date = $response['exp_date'];
139
+ $reference = $response['short_id'];
140
+ $instructions = $response['instructions'];
141
+ $step_1 = $instructions['step_1'];
142
+ $step_2 = $instructions['step_2'];
143
+ $step_3 = $instructions['step_3'];
144
+ $bank_number = $instructions['details']['bank_account_number'];
145
+ $bank_name = $instructions['details']['bank_name'];
146
+ $note_extra_comition = $instructions['note_extra_comition'];
147
+ $note_expiration_date = $instructions['note_expiration_date'];
148
+ $api_version = $response['api_version'];
149
+ } elseif ($response['api_version'] == '1.2') {
150
+ $expiration_date = $response['exp_date'];
151
+ $reference = $response['short_id'];
152
+ $instructions = $response['instructions'];
153
+ $step_1 = $instructions['step_1'];
154
+ $step_2 = $instructions['step_2'];
155
+ $step_3 = $instructions['step_3'];
156
+ $bank_number = $instructions['details']['bank_account_number'];
157
+ $bank_name = $instructions['details']['bank_name'];
158
+ $note_extra_comition = $instructions['note_extra_comition'];
159
+ $note_expiration_date = $instructions['note_expiration_date'];
160
+ $api_version = $response['api_version'];
161
+ }
162
+ //$store_image = $response['charge']['store_image'];
163
+
164
+ Mage::getSingleton('core/session')->setExpirationDate($expiration_date);
165
+ Mage::getSingleton('core/session')->setReference($reference);
166
+ Mage::getSingleton('core/session')->setStep1($step_1);
167
+ Mage::getSingleton('core/session')->setStep2($step_2);
168
+ //Mage::getSingleton('core/session')->setStep2($step_2);
169
+ Mage::getSingleton('core/session')->setStep3($step_3);
170
+ Mage::getSingleton('core/session')->setBankNumber($bank_number);
171
+ Mage::getSingleton('core/session')->setBankName($bank_name);
172
+ Mage::getSingleton('core/session')->setNoteExtraComition($note_extra_comition);
173
+ Mage::getSingleton('core/session')->setNoteExpirationDate($note_expiration_date);
174
+ Mage::getSingleton('core/session')->setApiVersion($api_version);
175
+ Mage::getSingleton('core/session')->setLogoSrc($logo);
176
+
177
+ return $this;
178
+ }
179
+
180
+ public function getProviders()
181
+ {
182
+ if (trim($this->getConfigData('client_secret')) == ''
183
+ || trim($this->getConfigData('client_id')) == ''
184
+ ) {
185
+ Mage::throwException("Datos incompletos del servicio, contacte al administrador del sitio");
186
+ }
187
+
188
+ $url = 'https://api.compropago.com/v1/providers/';
189
+ $url.= 'true';
190
+ $username = trim($this->getConfigData('client_secret'));
191
+ $password = trim($this->getConfigData('client_id'));
192
+
193
+ $ch = curl_init();
194
+ curl_setopt($ch, CURLOPT_URL, $url);
195
+ curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
196
+ curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
197
+ curl_setopt($ch, CURLOPT_USERPWD, $username . ":" . $password);
198
+
199
+ // Blindly accept the certificate
200
+ curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
201
+ $this->_response = curl_exec($ch);
202
+ curl_close($ch);
203
+
204
+ // tratamiento de la respuesta del servicio
205
+ $response = json_decode($this->_response,true);
206
+
207
+ // respuesta del servicio
208
+ if ($response['type'] == "error")
209
+ {
210
+ $errorMessage = $response['message'] . "\n";
211
+ Mage::throwException($errorMessage);
212
+ }
213
+
214
+
215
+ $hash = array();
216
+
217
+ foreach($response as $record)
218
+ {
219
+ $hash[$record['rank']] = $record;
220
+ }
221
+
222
+ ksort($hash);
223
+
224
+ foreach($hash as $record)
225
+ {
226
+ $records []= $record;
227
+ }
228
+
229
+ return $records;
230
+ }
231
+
232
+ public function showLogoProviders()
233
+ {
234
+ return ( (int)trim($this->getConfigData("provider")) == 1 ? true : false );
235
+ }
236
+
237
+ }
app/code/community/Compropago/controllers/WebhookController.php ADDED
@@ -0,0 +1,112 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Webhook para notificaciones de pagos.
4
+ *
5
+ * @author waldix (waldix86@gmail.com)
6
+ */
7
+ class Compropago_WebhookController extends Mage_Core_Controller_Front_Action{
8
+ protected $_model = null;
9
+
10
+ public function _construct() {
11
+ $this->_model = Mage::getModel('compropago/Standard');
12
+ }
13
+
14
+ public function indexAction(){
15
+ $params = $this->getRequest()->getParams();
16
+ $body = @file_get_contents('php://input');
17
+ $event_json = json_decode($body);
18
+
19
+ if(isset($event_json)){
20
+ if ($event_json->{'api_version'} === '1.1') {
21
+ if ($event_json->{'id'}){
22
+ $order = $this->verifyOrder($event_json->{'id'});
23
+ $type = $order['type'];
24
+
25
+ if (isset($order['id'])){
26
+ if ($order['id'] === $event_json->{'id'}) {
27
+ $order_id = $order['order_info']['order_id'];
28
+ $this->changeStatus($order_id, $type);
29
+ } else {
30
+ echo 'Order not valid';
31
+ }
32
+ } else {
33
+ echo 'Order not valid';
34
+ }
35
+ }
36
+ } else {
37
+ if ($event_json->data->object->{'id'}){
38
+ $order = $this->verifyOrder($event_json->data->object->{'id'});
39
+ $type = $order['type'];
40
+
41
+ if (isset($order['data']['object']['id'])){
42
+ if ($order['data']['object']['id'] === $event_json->data->object->{'id'}) {
43
+ $order_id = $order['data']['object']['payment_details']['product_id'];
44
+ $this->changeStatus($order_id, $type);
45
+ } else {
46
+ echo 'Order not valid';
47
+ }
48
+ } else {
49
+ echo 'Order not valid';
50
+ }
51
+
52
+ }
53
+ }
54
+ } else {
55
+ echo 'Order not valid';
56
+ }
57
+ }
58
+
59
+ public function changeStatus($order_id, $type){
60
+ $_order = Mage::getModel('sales/order')->loadByIncrementId($order_id);
61
+
62
+ switch ($type) {
63
+ case 'charge.pending':
64
+ $status = $this->_model->getConfigData('order_status_in_process');
65
+ $message = 'The user has not completed the payment process yet.';
66
+ $_order->addStatusToHistory($status, $message);
67
+ break;
68
+ case 'charge.success':
69
+ $message = 'ComproPago automatically confirmed payment for this order.';
70
+ $status = $this->_model->getConfigData('order_status_approved');
71
+ $_order->addStatusToHistory($status,$message,true);
72
+ break;
73
+ case 'charge.declined':
74
+ $status = $this->_model->getConfigData('order_status_in_process');
75
+ $message = 'The user has not completed the payment process yet.';
76
+ $_order->addStatusToHistory($status, $message);
77
+ break;
78
+ case 'charge.deleted':
79
+ $status = $this->_model->getConfigData('order_status_cancelled');
80
+ $message = 'The user has not completed the payment and the order was cancelled.';
81
+ $_order->addStatusToHistory($status, $message,true);
82
+ break;
83
+ case 'charge.expired':
84
+ $status = $this->_model->getConfigData('order_status_cancelled');
85
+ $message = 'The user has not completed the payment and the order was cancelled.';
86
+ $_order->addStatusToHistory($status, $message,true);
87
+ break;
88
+ default:
89
+ $status = $this->_model->getConfigData('order_status_in_process');
90
+ $message = "";
91
+ $_order->addStatusToHistory($status, $message,true);
92
+ }
93
+
94
+ $_order->save();
95
+ }
96
+
97
+ public function verifyOrder($id){
98
+ $url = 'https://api.compropago.com/v1/charges/';
99
+ $url .= $id;
100
+ $username = trim($this->_model->getConfigData('client_secret'));
101
+ $ch = curl_init();
102
+ curl_setopt($ch, CURLOPT_URL, $url);
103
+ curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type:application/json'));
104
+ curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_BASIC);
105
+ curl_setopt($ch, CURLOPT_USERPWD, $username . ":");
106
+ curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
107
+ $this->_response = curl_exec($ch);
108
+ curl_close($ch);
109
+ $response = json_decode($this->_response,true);
110
+ return $response;
111
+ }
112
+ }
app/code/community/Compropago/etc/config.xml ADDED
@@ -0,0 +1,82 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <Compropago>
5
+ <version>1.0.0</version>
6
+ </Compropago>
7
+ </modules>
8
+
9
+ <global>
10
+ <models>
11
+ <compropago>
12
+ <class>Compropago_Model</class>
13
+ </compropago>
14
+ </models>
15
+ <helpers>
16
+ <compropago>
17
+ <class>Compropago_Helper</class>
18
+ </compropago>
19
+ </helpers>
20
+ <resources>
21
+ <compropago>
22
+ <setup>
23
+ <module>Compropago</module>
24
+ </setup>
25
+ </compropago>
26
+ </resources>
27
+ <blocks>
28
+ <compropago>
29
+ <class>Compropago_Block</class>
30
+ </compropago>
31
+ <checkout>
32
+ <rewrite>
33
+ <onepage_success>Compropago_Block_OnepageSuccess</onepage_success>
34
+ </rewrite>
35
+ </checkout>
36
+ </blocks>
37
+ <payment>
38
+ <groups>
39
+ <compropago>Compropago</compropago>
40
+ </groups>
41
+ </payment>
42
+ </global>
43
+
44
+ <frontend>
45
+ <routers>
46
+ <compropago>
47
+ <use>standard</use>
48
+ <args>
49
+ <module>Compropago</module>
50
+ <frontName>compropago</frontName>
51
+ </args>
52
+ </compropago>
53
+ </routers>
54
+ <layout>
55
+ <updates>
56
+ <compropago>
57
+ <file>compropago.xml</file>
58
+ </compropago>
59
+ </updates>
60
+ </layout>
61
+ </frontend>
62
+
63
+ <default>
64
+ <payment>
65
+ <compropago>
66
+ <payment_action>sale</payment_action>
67
+ <model>compropago/standard</model>
68
+ <status>pending</status>
69
+ <title>Pago en efectivo - ComproPago</title>
70
+ <provider>1</provider>
71
+ <order_status_new>pending</order_status_new>
72
+ <order_status_approved>processing</order_status_approved>
73
+ <order_status_refunded>refunded</order_status_refunded>
74
+ <order_status_in_process>pending</order_status_in_process>
75
+ <order_status_in_mediation>pending</order_status_in_mediation>
76
+ <order_status_rejected>rejected</order_status_rejected>
77
+ <order_status_cancelled>cancelled</order_status_cancelled>
78
+ </compropago>
79
+ </payment>
80
+ </default>
81
+
82
+ </config>
app/code/community/Compropago/etc/system.xml ADDED
@@ -0,0 +1,130 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <config>
3
+ <sections>
4
+ <payment>
5
+ <groups>
6
+ <compropago translate="label" module="compropago">
7
+ <label><![CDATA[Pago en efectivo - ComproPago]]></label>
8
+ <sort_order>670</sort_order>
9
+ <show_in_default>1</show_in_default>
10
+ <show_in_website>1</show_in_website>
11
+ <show_in_store>0</show_in_store>
12
+ <fields>
13
+ <active translate="label">
14
+ <label>Habilitar</label>
15
+ <frontend_type>select</frontend_type>
16
+ <source_model>adminhtml/system_config_source_yesno</source_model>
17
+ <sort_order>1</sort_order>
18
+ <show_in_default>1</show_in_default>
19
+ <show_in_website>1</show_in_website>
20
+ <show_in_store>0</show_in_store>
21
+ </active>
22
+ <title translate="label,comment">
23
+ <label>Título</label>
24
+ <comment>
25
+ <![CDATA[
26
+ Este campo se mostrará como etiqueta de metodo de pago.
27
+ ]]>
28
+ </comment>
29
+ <frontend_type>text</frontend_type>
30
+ <sort_order>2</sort_order>
31
+ <show_in_default>1</show_in_default>
32
+ <show_in_website>1</show_in_website>
33
+ <show_in_store>0</show_in_store>
34
+ </title>
35
+ <client_id translate="label">
36
+ <label>Llave Publica</label>
37
+ <frontend_type>text</frontend_type>
38
+ <sort_order>6</sort_order>
39
+ <show_in_default>1</show_in_default>
40
+ <show_in_website>1</show_in_website>
41
+ <show_in_store>0</show_in_store>
42
+ </client_id>
43
+ <client_secret translate="label">
44
+ <label>Llave Privada</label>
45
+ <frontend_type>text</frontend_type>
46
+ <sort_order>7</sort_order>
47
+ <show_in_default>1</show_in_default>
48
+ <show_in_website>1</show_in_website>
49
+ <show_in_store>0</show_in_store>
50
+ </client_secret>
51
+ <provider translate="label">
52
+ <label>Habilitar Logos para Establecimientos</label>
53
+ <frontend_type>select</frontend_type>
54
+ <source_model>adminhtml/system_config_source_yesno</source_model>
55
+ <sort_order>9</sort_order>
56
+ <show_in_default>1</show_in_default>
57
+ <show_in_website>1</show_in_website>
58
+ <show_in_store>1</show_in_store>
59
+ </provider>
60
+ <logo_success_src translate="label">
61
+ <label>Logo para recibo de pago</label>
62
+ <comment>Solo escribe el nombre de tu imagen "image.png" y sube la imagen a la ruta destino “skin/frontend/base/default/images/compropago/image.png" Permite tipos de archivo: PNG, GIF, JPG, JPEG. </comment>
63
+ <frontend_type>text</frontend_type>
64
+ <sort_order>10</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
+ </logo_success_src>
69
+ <order_status_new translate="label">
70
+ <label>Elegir estado de nuevas ordenes</label>
71
+ <comment>
72
+ <![CDATA[
73
+ Ir a "system -> OrderStatuses" y asignar una nueva orden de estado personalizada en la opción de 'new'.
74
+ ]]>
75
+ </comment>
76
+ <frontend_type>select</frontend_type>
77
+ <source_model>adminhtml/system_config_source_order_status</source_model>
78
+ <sort_order>19</sort_order>
79
+ <show_in_default>1</show_in_default>
80
+ <show_in_website>1</show_in_website>
81
+ <show_in_store>1</show_in_store>
82
+ </order_status_new>
83
+ <order_status_approved translate="label">
84
+ <label>Elegir estado de ordenes aprobadas</label>
85
+ <comment>
86
+ <![CDATA[
87
+ Ir a "system -> OrderStatuses" y asignar una nueva orden de estado personalizada en la opción de 'new'.
88
+ ]]>
89
+ </comment>
90
+ <frontend_type>select</frontend_type>
91
+ <source_model>adminhtml/system_config_source_order_status</source_model>
92
+ <sort_order>20</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
+ </order_status_approved>
97
+ <order_status_in_process translate="label">
98
+ <label>Elegir estado de ordenes pendientes</label>
99
+ <comment>
100
+ <![CDATA[
101
+ Ir a "system -> OrderStatuses" y asignar una nueva orden de estado personalizada en la opción de 'new'.
102
+ ]]>
103
+ </comment>
104
+ <frontend_type>select</frontend_type>
105
+ <source_model>adminhtml/system_config_source_order_status</source_model>
106
+ <sort_order>22</sort_order>
107
+ <show_in_default>1</show_in_default>
108
+ <show_in_website>1</show_in_website>
109
+ <show_in_store>1</show_in_store>
110
+ </order_status_in_process>
111
+ <order_status_cancelled translate="label">
112
+ <label>Elegir el estado de las ordenes canceladas</label>
113
+ <comment>
114
+ <![CDATA[
115
+ Ir a "system -> OrderStatuses" y asignar una nueva orden de estado personalizada en la opción de 'new'.
116
+ ]]>
117
+ </comment>
118
+ <frontend_type>select</frontend_type>
119
+ <source_model>adminhtml/system_config_source_order_status</source_model>
120
+ <sort_order>23</sort_order>
121
+ <show_in_default>1</show_in_default>
122
+ <show_in_website>1</show_in_website>
123
+ <show_in_store>1</show_in_store>
124
+ </order_status_cancelled>
125
+ </fields>
126
+ </compropago>
127
+ </groups>
128
+ </payment>
129
+ </sections>
130
+ </config>
app/design/frontend/base/default/layout/compropago.xml ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <!--
3
+ /**
4
+ * Magento
5
+ *
6
+ * NOTICE OF LICENSE
7
+ *
8
+ * This source file is subject to the Academic Free License (AFL 3.0)
9
+ * that is bundled with this package in the file LICENSE_AFL.txt.
10
+ * It is also available through the world-wide-web at this URL:
11
+ * http://opensource.org/licenses/afl-3.0.php
12
+ * If you did not receive a copy of the license and are unable to
13
+ * obtain it through the world-wide-web, please send an email
14
+ * to license@magentocommerce.com so we can send you a copy immediately.
15
+ *
16
+ * DISCLAIMER
17
+ *
18
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
19
+ * versions in the future. If you wish to customize Magento for your
20
+ * needs please refer to http://www.magentocommerce.com for more information.
21
+ *
22
+ * @category design
23
+ * @package base_default
24
+ * @copyright Copyright (c) 2013 Magento Inc. (http://www.magentocommerce.com)
25
+ * @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
26
+ */
27
+
28
+ -->
29
+ <layout version="0.1.0">
30
+ <checkout_onepage_success translate="label">
31
+ <reference name="head">
32
+ <action method="addCss">
33
+ <path>css/compropago/compropago.css</path>
34
+ </action>
35
+ <action method="addJs">
36
+ <script>compropago/compropago.js</script>
37
+ </action>
38
+ </reference>
39
+ </checkout_onepage_success>
40
+ </layout>
app/design/frontend/base/default/template/compropago/cash.phtml ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ *
4
+ * Form payment cash
5
+ *
6
+ * @author Oswaldo Lopez (waldix86@gmail.com)
7
+ */
8
+ ?>
9
+
10
+ <?php $_code= $this->getMethodCode();
11
+ $_model = $this->getMethod();
12
+ $_getProviders = $_model->getProviders();
13
+ ?>
14
+ <link rel="stylesheet" href="<?php echo $this->getSkinUrl('css/compropago/compropago.css'); ?>" />
15
+ <label class="label-instructions">Selecciona un establecimiento para realizar el pago en efectivo</label>
16
+ <ul id="payment_form_<?php echo $_code ?>" style="<?php echo !$_model->showLogoProviders() ? 'display:none' : 'display:block' ?>" >
17
+ <label for="p_method_compropago" style="cursor:pointer;">
18
+ <?php if (!$_model->showLogoProviders())
19
+ { ?>
20
+ <li>
21
+ <select id="<?php echo $_code ?>_store"
22
+ name="payment[store_code]">
23
+ <?php foreach ($_getProviders as $_provider): ?>
24
+ <option value="<?php echo $_provider['internal_name'] ?>"><?php echo $_provider['name'] ?></option>
25
+ <?php endforeach; ?>
26
+ </select>
27
+ </li>
28
+ <?php } else { ?>
29
+ <li>
30
+ <div class="row stores-compact" style="padding: 5px 30px; opacity: 1;" id="<?php echo $_code ?>_store">
31
+ <?php foreach ($_getProviders as $_provider): ?>
32
+ <div class="col-sm-6 col-md-2 element-box">
33
+ <input id="<?php echo $_code ?>_<?php echo $_provider['internal_name'] ?>" type="radio" style="float: left;" name="payment[store_code]" value="<?php echo $_provider['internal_name'] ?>" image-label="<?php echo $_provider['internal_name'] ?>">
34
+ <label for="<?php echo $_code ?>_<?php echo $_provider['internal_name'] ?>" class="provider-description" onclick="document.getElementById('p_method_compropago').click()">
35
+ <img src="<?php echo $_provider['image_medium'] ?>">
36
+ </label>
37
+ </div>
38
+ <?php endforeach; ?>
39
+ </div>
40
+ </li>
41
+ <?php } ?>
42
+ </label>
43
+ </ul>
44
+ <div>
45
+ <?php echo $this->getMethod()->getConfigData('message');?>
46
+ </div>
app/design/frontend/base/default/template/compropago/onepage_success.phtml ADDED
@@ -0,0 +1,113 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * @author waldix <waldix86@gmail.com>
4
+ */
5
+ ?>
6
+
7
+ <?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
8
+ <?php $expiration_date = Mage::getSingleton('core/session')->getExpirationDate();
9
+ $reference = Mage::getSingleton('core/session')->getReference();
10
+ $step_1 = Mage::getSingleton('core/session')->getStep1();
11
+ $step_2 = Mage::getSingleton('core/session')->getStep2();
12
+ $step_3 = Mage::getSingleton('core/session')->getStep3();
13
+ $bank_number = Mage::getSingleton('core/session')->getBankNumber();
14
+ $bank_name = Mage::getSingleton('core/session')->getBankName();
15
+ $note_extra_comition = Mage::getSingleton('core/session')->getNoteExtraComition();
16
+ $note_expiration_date = Mage::getSingleton('core/session')->getNoteExpirationDate();
17
+ $api_version = Mage::getSingleton('core/session')->getApiVersion();
18
+ $logo = Mage::getSingleton('core/session')->getLogoSrc();
19
+
20
+ //$store_image = Mage::getSingleton('core/session')->getStoreImage();
21
+ ?>
22
+ <div id="receipt" class="receipt">
23
+ <link rel="stylesheet" href="<?php echo $this->getSkinUrl('css/compropago/compropago.css'); ?>" />
24
+ <div class="logo-success"><img src="<?php echo $this->__($logo) ?>" alt="<?php echo $this->getLogoAlt() ?>" /></div>
25
+ <div class="page-title">
26
+ <h3>¡Felicitaciones! Su pedido ha sido generado correctamente.</h3>
27
+ </div>
28
+ <?php if ($this->getOrderId()):?>
29
+ <?php if ($this->getCanViewOrder()) :?>
30
+ <p><?php echo $this->__('Your order # is: %s.', sprintf('<a href="%s">%s</a>', $this->escapeHtml($this->getViewOrderUrl()), $this->escapeHtml($this->getOrderId()))) ?></p>
31
+ <?php else :?>
32
+ <div class="cp-instruction-section">
33
+ <div class="expiration-date">
34
+ Último día para pagar:
35
+ <span >
36
+ <?php if( $this->__($api_version) === '1.0' ): ?>
37
+ <?php echo date('d-m-Y', strtotime($this->__($expiration_date))) ?>
38
+ <?php else: ?>
39
+ <?php echo date('d-m-Y', $this->__($expiration_date)) ?>
40
+ <?php endif; ?>
41
+ </span>
42
+ </div>
43
+
44
+ <div class="cp-title">Seguir los siguientes pasos:</div>
45
+
46
+ <div class="cp-step-box">
47
+ <div class="cp-step">
48
+ <div class="cp-num">1.</div> <span> <?php echo $this->__($step_1) ?> </span>
49
+ </div>
50
+ <div class="cp-step">
51
+ <?php if( $this->__($api_version) === '1.0' || $this->__($api_version) === '1.1' ): ?>
52
+ <div class="cp-num">2.</div> <?php echo $this->__($step_2) ?>
53
+ <?php else: ?>
54
+ <div class="cp-num">2.</div> <?php echo $this->__($step_2) ?>
55
+ <div class="account-number-box">
56
+ <div class="account-number">
57
+ <b><?php echo $this->__($bank_name) ?> - <?php echo $this->__($bank_number) ?></b>
58
+ </div>
59
+ <span class="account-number-note">(El número asignado es único por cada orden) </span>
60
+ </div>
61
+ <?php endif; ?>
62
+ </div>
63
+ <div class="cp-step">
64
+ <div class="cp-num">3.</div> <?php echo $this->__($step_3) ?>
65
+ </div>
66
+ </div>
67
+ <hr class="cp-grey">
68
+ <span class="cp-note" style="font-size:12px;color: #333;">Oxxo/7Eleven/Extra cobra en caja una comisión de $7.00/$8.00 por concepto de recepción de cobranza.</span>
69
+ </div>
70
+
71
+ <div class="cp-warning-box">
72
+ <img src="<?php echo $this->getSkinUrl('images/compropago/warning.png'); ?>" style="margin: -7px 0px 0px 0px;">
73
+ <span style="font-size: 12px;"><b>Importante</b></span>
74
+ <ul style="" class="cp-warning">
75
+ <li>El ID de control es: <b><?php echo $this->__($reference) ?></b></li>
76
+ <li>El número de cuenta/tarjeta asignado es único por cada orden de compra.</li>
77
+ <?php if(!empty($note_expiration_date)): ?>
78
+ <li><?php echo $this->__($note_expiration_date) ?></li>
79
+ <?php endif; ?>
80
+
81
+ <?php if (!empty($note_extra_comition)): ?>
82
+ <li><?php echo $this->__($note_extra_comition) ?></li>
83
+ <?php endif; ?>
84
+
85
+ </ul>
86
+ </div>
87
+ <?php endif;?>
88
+ <?php if ($this->getCanViewOrder() && $this->getCanPrintOrder()) :?>
89
+ <p>
90
+ <?php echo $this->__('Click <a href="%s" onclick="this.target=\'_blank\'">here to print</a> a copy of your order confirmation.', $this->getPrintUrl()) ?>
91
+ <?php echo $this->getChildHtml() ?>
92
+ </p>
93
+ <?php endif;?>
94
+ <?php endif;?>
95
+
96
+ <?php if ($this->getAgreementRefId()): ?>
97
+ <p><?php echo $this->__('Your billing agreement # is: %s.', sprintf('<a href="%s">%s</a>', $this->escapeHtml($this->getAgreementUrl()), $this->escapeHtml($this->getAgreementRefId())))?></p>
98
+ <?php endif;?>
99
+
100
+ <?php if ($profiles = $this->getRecurringProfiles()):?>
101
+ <p><?php echo $this->__('Your recurring payment profiles:'); ?></p>
102
+ <ul class="disc">
103
+ <?php foreach($profiles as $profile):?>
104
+ <?php $profileIdHtml = ($this->getCanViewProfiles() ? sprintf('<a href="%s">%s</a>', $this->escapeHtml($this->getProfileUrl($profile)), $this->escapeHtml($this->getObjectData($profile, 'reference_id'))) : $this->escapeHtml($this->getObjectData($profile, 'reference_id')));?>
105
+ <li><?php echo $this->__('Payment profile # %s: "%s".', $profileIdHtml, $this->escapeHtml($this->getObjectData($profile, 'schedule_description')))?></li>
106
+ <?php endforeach;?>
107
+ </ul>
108
+ <?php endif;?>
109
+ <div class="buttons-set">
110
+ <button type="button" class="button continue-succes" title="<?php echo $this->__('Continue Shopping') ?>" onclick="window.location='<?php echo $this->getUrl() ?>'"><span><span><?php echo $this->__('Continue Shopping') ?></span></span></button>
111
+ <button type="button" class="button print-succes" title="Imprimir" onclick="imprimir();"><span><span>Imprimir</span></span></button>
112
+ </div>
113
+ </div>
app/etc/modules/Compropago.xml ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <config>
3
+ <modules>
4
+ <Compropago>
5
+ <active>true</active>
6
+ <codePool>community</codePool>
7
+ <depends>
8
+ <Mage_Payment />
9
+ </depends>
10
+ </Compropago>
11
+ </modules>
12
+ </config>
js/compropago/compropago.js ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
1
+ function imprimir(){
2
+ var objeto=document.getElementById('receipt');
3
+ var ventana=window.open('','popimpr');
4
+ ventana.document.write(objeto.innerHTML);
5
+ ventana.document.close();
6
+ ventana.print();
7
+ ventana.close();
8
+ }
package.xml ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <package>
3
+ <name>ComproPago</name>
4
+ <version>1.0.0</version>
5
+ <stability>stable</stability>
6
+ <license uri="http://opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
7
+ <channel>community</channel>
8
+ <extends/>
9
+ <summary>Extension for cash payments in Compropago.</summary>
10
+ <description>It is a tool that allows us to process cash payments in shop.</description>
11
+ <notes>Fixed minor Bugs</notes>
12
+ <authors><author><name>Oswaldo Lopez Garcia</name><user>waldix</user><email>waldix@compropago.com</email></author></authors>
13
+ <date>2015-12-21</date>
14
+ <time>23:44:10</time>
15
+ <contents><target name="mageetc"><dir name="modules"><file name="Compropago.xml" hash="884374bb8a46b5ac9a62cd8b9f351401"/></dir></target><target name="magecommunity"><dir name="Compropago"><dir name="Block"><file name="Form.php" hash="af36f6b19af072a247cceff2b9d1f452"/><file name="OnepageSuccess.php" hash="d575b5abb647c41017b6d40efb3ee8cb"/></dir><dir name="Helper"><file name="Data.php" hash="5d3d5f4f86f2cec56315a1b02cc3d308"/></dir><dir name="Model"><file name="Api.php" hash="9e7cec75a14a7c265a3df3a5ca49ea8d"/><file name="Standard.php" hash="c005ba798cbce164021c947fce219a8c"/></dir><dir name="controllers"><file name="WebhookController.php" hash="64c404a7a78bb027a313bb1f9c08460b"/></dir><dir name="etc"><file name="config.xml" hash="26776d50679f9c07924f5ab0a7beeb76"/><file name="system.xml" hash="a3f19cb830d63fed92c03c86799bc0cb"/></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="compropago"><file name="cash.phtml" hash="44708775d303abd24f3b37ed54546e5f"/><file name="onepage_success.phtml" hash="ab674c10c9a161debe6dcd723fe13235"/></dir></dir><dir name="layout"><file name="compropago.xml" hash="5854769e6ba117114db548d54ea955f6"/></dir></dir></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="css"><dir name="compropago"><file name="compropago.css" hash="9ff5cc40bc6b811b79f56f9b2dd4a31d"/></dir></dir><dir name="images"><dir name="compropago"><file name="warning.png" hash="e30bf5b88671a415ca7771b3e5dd9c19"/></dir></dir></dir></dir></dir></target><target name="mage"><dir name="js"><dir name="compropago"><file name="compropago.js" hash="5a60426b0106aedc1959e53febef3511"/></dir></dir></target></contents>
16
+ <compatible/>
17
+ <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
18
+ </package>
skin/frontend/base/default/css/compropago/compropago.css ADDED
@@ -0,0 +1,353 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ .cp-select-form {
3
+ margin: 20px 20px 20px 20px !important;
4
+ border: 1px solid #dae3e9;
5
+ border-radius: 3px;
6
+ padding: 10px;
7
+ background: #fafbfd;
8
+ }
9
+
10
+ .cp-instruction-section {
11
+ background: #FFF;
12
+ width: 100%;
13
+ border: 1px solid #DAE2E7;
14
+ margin: 0px 0px 15px 0px;
15
+ border-radius: 8px;
16
+ float: left;
17
+ background-position: 0px 40px;
18
+ font-size: 11pt;
19
+ box-shadow: 0px 1px 4px 1px #E2E2E2;
20
+ }
21
+ .cp-instruction-section .cp-title {
22
+ height: 31px;
23
+ border-bottom: 1px solid #dee3ea;
24
+ color: #000;
25
+ font-size: 11pt;
26
+ font-style: italic;
27
+ line-height: 34px;
28
+ float: left;
29
+ width: 68%;
30
+ margin: 25px 0px 15px 20px;
31
+ }
32
+ .cp-step-box {
33
+ width: 600px;
34
+ color: #000;
35
+ clear: none;
36
+ float: left;
37
+ }
38
+ .cp-step {
39
+ line-height: 25pt;
40
+ margin: 0px 0px 0px 30px;
41
+ font-size: 13px;
42
+ float: left;
43
+ clear: both;
44
+ }
45
+ .cp-step .cp-num {
46
+ float: left;
47
+ margin: 0px 8px 0px 0px;
48
+ }
49
+ hr.cp-grey {
50
+ margin: 10px 0;
51
+ width: 100%;
52
+ border-top: 1px solid #dae3e9 !important;
53
+ border-bottom: 1px solid white;
54
+ box-sizing: content-box;
55
+ height: 0;
56
+ text-rendering: optimizelegibility;
57
+ font-family: inherit;
58
+ border-style: none;
59
+ }
60
+ .cp-note {
61
+ clear: both;
62
+ float: left;
63
+ margin: 0px 0px 10px 20px;
64
+ }
65
+
66
+ .cp-warning-box {
67
+ float: left;
68
+ background: #FFFEEC;
69
+ border: 1px solid #DFDB83;
70
+ border-radius: 3px;
71
+ box-shadow: 0px 1px 3px 1px #E2E2E2;
72
+ clear: both;
73
+ color: #000;
74
+ padding: 10px 10px;
75
+ margin: 0px 0px 14px 0px !important;
76
+ width: 97%;
77
+ }
78
+
79
+ ul.cp-warning {
80
+ font-size: 12px;
81
+ margin-left: 30px;
82
+ }
83
+ ul.cp-warning li {
84
+ line-height: 20px;
85
+ list-style-type: disc;
86
+ }
87
+ .cp-wrap-price{
88
+ float:right;
89
+ font-size: 12px;
90
+
91
+ }
92
+ .cp-price{
93
+ font-weight: bold;
94
+ font-size: 13px;
95
+ }
96
+
97
+ .cp-warning-box-price {
98
+ background: #FFFEEC;
99
+ border: 1px solid #DFDB83;
100
+ border-radius: 3px;
101
+ box-shadow: 0px 1px 3px 1px #E2E2E2;
102
+ clear: both;
103
+ color: #000;
104
+ padding: 10px 10px;
105
+ margin: 9px 0px 20px 0px !important;
106
+ }
107
+ .cp-label-instructions{
108
+ line-height: 42px;
109
+ font-size: 12px;
110
+ }
111
+ .cp-select-instructions{
112
+ height: 30px;
113
+ }
114
+ .expiration-date{
115
+ float: right;
116
+ background: #EFF6FD;
117
+ margin: 10px 10px 0 0;
118
+ border: 1px solid #dae3e9;
119
+ border-radius: 3px;
120
+ box-shadow: 0px 1px 4px 1px #f1f1f3 inset;
121
+ color: #000;
122
+ width: 140px;
123
+ font-size: 12px;
124
+ text-align: center;
125
+ padding: 10px 0px;
126
+ }
127
+ .expiration-date span {
128
+ font-size: 18px;
129
+ font-weight: 500;
130
+ color: #32a0ee;
131
+ margin: 7px 2px 0px;
132
+ text-align: center;
133
+ width: 100%;
134
+ float: left;
135
+ }
136
+
137
+ .account-number-box{
138
+ margin: 4px 90px 6px 140px;
139
+
140
+ }
141
+
142
+ .account-number {
143
+ float: left;
144
+ background: #3DE664;
145
+ border: 1px solid #11AF17;
146
+ border-radius: 3px;
147
+ box-shadow: 0px 1px 4px 1px #1ABB2D inset;
148
+ clear: both;
149
+ color: #000;
150
+ font-size: 16px;
151
+ padding: 5px 10px;
152
+ font-size: 14px;
153
+ min-width: 250px;
154
+ clear: both;
155
+ margin-left: 17px;
156
+ }
157
+
158
+ .account-number-note{
159
+ float: left;
160
+ color: #000;
161
+ font-size: 12px;
162
+ clear: both;
163
+ line-height: 26px;
164
+ margin-left: 28px;
165
+ &.walmart{
166
+ margin-left: 31px!important;
167
+ }
168
+ }
169
+
170
+
171
+ .stores-compact{
172
+ display: inline-block;
173
+ }
174
+
175
+ .element-box{
176
+ float: left;
177
+ position: relative;
178
+ min-height: 1px;
179
+ padding-left: 15px;
180
+ padding-right: 15px;
181
+ }
182
+
183
+ .row{margin-left:-15px;margin-right:-15px;}
184
+ .row:before,.row:after{content:" ";display:table;}
185
+ .row:after{clear:both;}
186
+ .col-xs-1, .col-sm-1, .col-md-1, .col-lg-1, .col-xs-2, .col-sm-2, .col-md-2, .col-lg-2, .col-xs-3, .col-sm-3, .col-md-3, .col-lg-3, .col-xs-4, .col-sm-4, .col-md-4, .col-lg-4, .col-xs-5, .col-sm-5, .col-md-5, .col-lg-5, .col-xs-6, .col-sm-6, .col-md-6, .col-lg-6, .col-xs-7, .col-sm-7, .col-md-7, .col-lg-7, .col-xs-8, .col-sm-8, .col-md-8, .col-lg-8, .col-xs-9, .col-sm-9, .col-md-9, .col-lg-9, .col-xs-10, .col-sm-10, .col-md-10, .col-lg-10, .col-xs-11, .col-sm-11, .col-md-11, .col-lg-11, .col-xs-12, .col-sm-12, .col-md-12, .col-lg-12{
187
+ position:relative;min-height:1px;padding-left:8px;padding-right:8px;
188
+ }
189
+ .col-xs-1, .col-xs-2, .col-xs-3, .col-xs-4, .col-xs-5, .col-xs-6, .col-xs-7, .col-xs-8, .col-xs-9, .col-xs-10, .col-xs-11, .col-xs-12{
190
+ float:left;
191
+ }
192
+ .col-xs-12{
193
+ width:100%;
194
+ }
195
+ .col-xs-11{width:91.66666666666666%;}
196
+ .col-xs-10{width:83.33333333333334%;}
197
+ .col-xs-9{width:75%;}
198
+ .col-xs-8{width:66.66666666666666%;}
199
+ .col-xs-7{width:58.333333333333336%;}
200
+ .col-xs-6{width:50%;}
201
+ .col-xs-5{width:41.66666666666667%;}
202
+ .col-xs-4{width:33.33333333333333%;}
203
+ .col-xs-3{width:25%;}
204
+ .col-xs-2{width:16.666666666666664%;}
205
+ .col-xs-1{width:8.333333333333332%;}
206
+ .col-xs-pull-12{right:100%;}
207
+ .col-xs-pull-11{right:91.66666666666666%;}
208
+ .col-xs-pull-10{right:83.33333333333334%;}
209
+ .col-xs-pull-9{right:75%;}
210
+ .col-xs-pull-8{right:66.66666666666666%;}
211
+ .col-xs-pull-7{right:58.333333333333336%;}
212
+ .col-xs-pull-6{right:50%;}.col-xs-pull-5{right:41.66666666666667%;}.col-xs-pull-4{right:33.33333333333333%;}.col-xs-pull-3{right:25%;}.col-xs-pull-2{right:16.666666666666664%;}.col-xs-pull-1{right:8.333333333333332%;}
213
+ .col-xs-pull-0{right:0%;}.col-xs-push-12{left:100%;}.col-xs-push-11{left:91.66666666666666%;}.col-xs-push-10{left:83.33333333333334%;}.col-xs-push-9{left:75%;}.col-xs-push-8{left:66.66666666666666%;}
214
+ .col-xs-push-7{left:58.333333333333336%;}.col-xs-push-6{left:50%;}.col-xs-push-5{left:41.66666666666667%;}.col-xs-push-4{left:33.33333333333333%;}.col-xs-push-3{left:25%;}.col-xs-push-2{left:16.666666666666664%;}
215
+ .col-xs-push-1{left:8.333333333333332%;}.col-xs-push-0{left:0%;}.col-xs-offset-12{margin-left:100%;}.col-xs-offset-11{margin-left:91.66666666666666%;}.col-xs-offset-10{margin-left:83.33333333333334%;}
216
+ .col-xs-offset-9{margin-left:75%;}.col-xs-offset-8{margin-left:66.66666666666666%;}.col-xs-offset-7{margin-left:58.333333333333336%;}.col-xs-offset-6{margin-left:50%;}.col-xs-offset-5{margin-left:41.66666666666667%;}
217
+ .col-xs-offset-4{margin-left:33.33333333333333%;}.col-xs-offset-3{margin-left:25%;}.col-xs-offset-2{margin-left:16.666666666666664%;}.col-xs-offset-1{margin-left:8.333333333333332%;}.col-xs-offset-0{margin-left:0%;}
218
+ @media (min-width:768px){
219
+ .col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12{
220
+ float:left;
221
+ }
222
+ .col-sm-12{width:100%;}
223
+ .col-sm-11{width:91.66666666666666%;}
224
+ .col-sm-10{width:83.33333333333334%;}
225
+ .col-sm-9{width:75%;} .col-sm-8{width:66.66666666666666%;} .col-sm-7{width:58.333333333333336%;} .col-sm-6{width:50%;} .col-sm-5{width:41.66666666666667%;} .col-sm-4{width:33.33333333333333%;} .col-sm-3{width:25%;} .col-sm-2{width:16.666666666666664%;} .col-sm-1{width:8.333333333333332%;} .col-sm-pull-12{right:100%;} .col-sm-pull-11{right:91.66666666666666%;} .col-sm-pull-10{right:83.33333333333334%;} .col-sm-pull-9{right:75%;} .col-sm-pull-8{right:66.66666666666666%;} .col-sm-pull-7{right:58.333333333333336%;} .col-sm-pull-6{right:50%;} .col-sm-pull-5{right:41.66666666666667%;} .col-sm-pull-4{right:33.33333333333333%;} .col-sm-pull-3{right:25%;} .col-sm-pull-2{right:16.666666666666664%;} .col-sm-pull-1{right:8.333333333333332%;} .col-sm-pull-0{right:0%;} .col-sm-push-12{left:100%;} .col-sm-push-11{left:91.66666666666666%;} .col-sm-push-10{left:83.33333333333334%;} .col-sm-push-9{left:75%;} .col-sm-push-8{left:66.66666666666666%;} .col-sm-push-7{left:58.333333333333336%;} .col-sm-push-6{left:50%;} .col-sm-push-5{left:41.66666666666667%;} .col-sm-push-4{left:33.33333333333333%;} .col-sm-push-3{left:25%;} .col-sm-push-2{left:16.666666666666664%;} .col-sm-push-1{left:8.333333333333332%;} .col-sm-push-0{left:0%;} .col-sm-offset-12{margin-left:100%;} .col-sm-offset-11{margin-left:91.66666666666666%;} .col-sm-offset-10{margin-left:83.33333333333334%;} .col-sm-offset-9{margin-left:75%;} .col-sm-offset-8{margin-left:66.66666666666666%;} .col-sm-offset-7{margin-left:58.333333333333336%;} .col-sm-offset-6{margin-left:50%;} .col-sm-offset-5{margin-left:41.66666666666667%;} .col-sm-offset-4{margin-left:33.33333333333333%;} .col-sm-offset-3{margin-left:25%;} .col-sm-offset-2{margin-left:16.666666666666664%;} .col-sm-offset-1{margin-left:8.333333333333332%;} .col-sm-offset-0{margin-left:0%;}}
226
+ @media (min-width:992px){
227
+ .col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12{
228
+ float:left;
229
+ }
230
+ .col-md-12{width:100%;} .col-md-11{width:91.66666666666666%;} .col-md-10{width:83.33333333333334%;} .col-md-9{width:75%;} .col-md-8{width:66.66666666666666%;} .col-md-7{width:58.333333333333336%;} .col-md-6{width:50%;} .col-md-5{width:41.66666666666667%;} .col-md-4{width:33.33333333333333%;} .col-md-3{width:25%;} .col-md-2{width:16.666666666666664%;} .col-md-1{width:8.333333333333332%;} .col-md-pull-12{right:100%;} .col-md-pull-11{right:91.66666666666666%;} .col-md-pull-10{right:83.33333333333334%;} .col-md-pull-9{right:75%;} .col-md-pull-8{right:66.66666666666666%;} .col-md-pull-7{right:58.333333333333336%;} .col-md-pull-6{right:50%;} .col-md-pull-5{right:41.66666666666667%;} .col-md-pull-4{right:33.33333333333333%;} .col-md-pull-3{right:25%;} .col-md-pull-2{right:16.666666666666664%;} .col-md-pull-1{right:8.333333333333332%;} .col-md-pull-0{right:0%;} .col-md-push-12{left:100%;} .col-md-push-11{left:91.66666666666666%;} .col-md-push-10{left:83.33333333333334%;} .col-md-push-9{left:75%;} .col-md-push-8{left:66.66666666666666%;} .col-md-push-7{left:58.333333333333336%;} .col-md-push-6{left:50%;} .col-md-push-5{left:41.66666666666667%;} .col-md-push-4{left:33.33333333333333%;} .col-md-push-3{left:25%;} .col-md-push-2{left:16.666666666666664%;} .col-md-push-1{left:8.333333333333332%;} .col-md-push-0{left:0%;} .col-md-offset-12{margin-left:100%;} .col-md-offset-11{margin-left:91.66666666666666%;} .col-md-offset-10{margin-left:83.33333333333334%;} .col-md-offset-9{margin-left:75%;} .col-md-offset-8{margin-left:66.66666666666666%;} .col-md-offset-7{margin-left:58.333333333333336%;} .col-md-offset-6{margin-left:50%;} .col-md-offset-5{margin-left:41.66666666666667%;} .col-md-offset-4{margin-left:33.33333333333333%;} .col-md-offset-3{margin-left:25%;} .col-md-offset-2{margin-left:16.666666666666664%;} .col-md-offset-1{margin-left:8.333333333333332%;} .col-md-offset-0{margin-left:0%;}}
231
+
232
+ .element-box label img{
233
+ display:block;margin:10px 10px 10px 10px;
234
+ box-shadow:0px 1px 7px 2px rgba(0,0,0,0.18);
235
+ border-radius:5px;
236
+ -moz-border-radius:5px;
237
+ -webkit-border-radius:5px;
238
+ width: 80px;
239
+ }
240
+ .element-box input{
241
+ left:-9999px;position:absolute
242
+ }
243
+ .element-box input[type="radio"]+label{
244
+ opacity:1;margin-left:6px
245
+ }
246
+ .element-box input[type="radio"]:hover+label{
247
+ opacity:1;
248
+ background:#40c4fa;
249
+ border-radius:6px;
250
+ -moz-border-radius:6px;
251
+ -webkit-border-radius:6px;
252
+ box-shadow:0px 1px 7px 2px rgba(0,0,0,0.18) inset
253
+ }
254
+ .element-box input[type="radio"]:checked+label{
255
+ opacity:1;
256
+ background:#00aaef;
257
+ border-radius:6px;
258
+ -moz-border-radius:6px;
259
+ -webkit-border-radius:6px;
260
+ box-shadow:0px 1px 7px 2px rgba(0,0,0,0.18) inset
261
+ }
262
+ .element-box input[type="radio"]:checked+label img{
263
+ display:block;
264
+ margin:10px 10px 10px 10px;
265
+ box-shadow:none;
266
+ border-radius:5px;
267
+ -moz-border-radius:5px;
268
+ -webkit-border-radius:5px;
269
+ box-shadow:0px 1px 0px 0px rgba(0,0,0,0.18)
270
+ }
271
+ .provider-description{
272
+ font-weight:bold;
273
+ float:left;
274
+ cursor:pointer;
275
+ line-height:26px;
276
+ font-size:10pt
277
+ }
278
+ .provider-description .note-s{
279
+ float:right;
280
+ color:#777;
281
+ font-size:13px;
282
+ margin-left:15px;
283
+ text-align:left;
284
+ font-weight:normal;
285
+ width:480px;
286
+ }
287
+
288
+ .label-instructions{
289
+ margin-left: 38px;
290
+ top: 5px;
291
+ position: relative;
292
+ }
293
+
294
+ .logo-success{
295
+ bottom: 12px;
296
+ position: relative;
297
+ display: none;
298
+ }
299
+
300
+ @media print{
301
+ .receipt{
302
+ padding: 5px
303
+ }
304
+ .logo-success{
305
+ top: 10px;
306
+ position: relative;
307
+ display: block;
308
+ }
309
+ .cp-instruction-section{
310
+ width: 100%;
311
+ border: 1px solid #DAE2E7;
312
+ margin: 0px 0px 15px 0px;
313
+ border-radius: 8px;
314
+ float: left;
315
+ background-position: 0px 40px;
316
+ font-size: 11pt;
317
+ background: #FFF !important;
318
+ -webkit-print-color-adjust: exact;
319
+ }
320
+ .cp-warning-box{
321
+ float: left;
322
+ border: 1px solid #DFDB83;
323
+ border-radius: 3px;
324
+ clear: both;
325
+ color: #000;
326
+ padding: 10px 10px;
327
+ margin: 0px 0px 14px 0px !important;
328
+ width: 97%;
329
+ background: #FFFEEC !important;
330
+ -webkit-print-color-adjust: exact;
331
+ }
332
+ .account-number {
333
+ float: left;
334
+ border: 1px solid #11AF17;
335
+ border-radius: 3px;
336
+ clear: both;
337
+ color: #000;
338
+ font-size: 16px;
339
+ padding: 5px 10px;
340
+ font-size: 14px;
341
+ min-width: 250px;
342
+ clear: both;
343
+ margin-left: 17px;
344
+ background: #FFFEEC !important;
345
+ -webkit-print-color-adjust: exact;
346
+ }
347
+ .continue-succes{
348
+ display: none;
349
+ }
350
+ .print-succes{
351
+ display: none;
352
+ }
353
+ }
skin/frontend/base/default/images/compropago/warning.png ADDED
Binary file