Version Notes
Fixed minor Bugs
Download this release
Release Info
Developer | Oswaldo Lopez Garcia |
Extension | Compropago_Payment_Extension |
Version | 1.0.2 |
Comparing to | |
See all releases |
Code changes from version 1.0.1 to 1.0.2
- app/code/community/Compropago/Model/Api.php +2 -2
- app/code/community/Compropago/Model/Standard.php +39 -81
- app/design/frontend/base/default/template/compropago/cash.phtml +4 -4
- app/design/frontend/base/default/template/compropago/onepage_success.phtml +28 -74
- js/compropago/compropago.js +26 -10
- package.xml +4 -4
- skin/frontend/base/default/css/compropago/compropago.css +8 -66
- skin/frontend/base/default/images/compropago/providers.png +0 -0
- skin/frontend/base/default/images/compropago/providers1.png +0 -0
app/code/community/Compropago/Model/Api.php
CHANGED
@@ -11,7 +11,7 @@ class Compropago_Model_Api
|
|
11 |
* URL del servicio de PagoFacil en ambiente de produccion
|
12 |
* @var string
|
13 |
*/
|
14 |
-
protected $_url = '
|
15 |
|
16 |
/**
|
17 |
* respuesta sin parsear del servicio
|
@@ -86,7 +86,7 @@ class Compropago_Model_Api
|
|
86 |
Mage::throwException("El servicio de Compropago no se encuentra disponible.");
|
87 |
}
|
88 |
|
89 |
-
if ($response['type'] == "error")
|
90 |
{
|
91 |
$errorMessage = $response['message'] . "\n";
|
92 |
Mage::throwException($errorMessage);
|
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
|
86 |
Mage::throwException("El servicio de Compropago no se encuentra disponible.");
|
87 |
}
|
88 |
|
89 |
+
if (isset($response['type']) && $response['type'] == "error")
|
90 |
{
|
91 |
$errorMessage = $response['message'] . "\n";
|
92 |
Mage::throwException($errorMessage);
|
app/code/community/Compropago/Model/Standard.php
CHANGED
@@ -22,33 +22,34 @@ class Compropago_Model_Standard extends Mage_Payment_Model_Method_Abstract
|
|
22 |
{
|
23 |
$data = new Varien_Object($data);
|
24 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
25 |
|
26 |
-
|
27 |
-
{
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
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::
|
51 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
52 |
|
53 |
return $this;
|
54 |
}
|
@@ -84,7 +85,7 @@ class Compropago_Model_Standard extends Mage_Payment_Model_Method_Abstract
|
|
84 |
$order1 = Mage::getModel('sales/order')->loadByIncrementId($orderNumber);
|
85 |
|
86 |
foreach ($order1->getAllItems() as $item) {
|
87 |
-
$name
|
88 |
}
|
89 |
|
90 |
// obtener datos del pago en info y asignar monto total
|
@@ -92,7 +93,8 @@ class Compropago_Model_Standard extends Mage_Payment_Model_Method_Abstract
|
|
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 |
|
@@ -109,58 +111,14 @@ class Compropago_Model_Standard extends Mage_Payment_Model_Method_Abstract
|
|
109 |
Mage::throwException($error->getMessage());
|
110 |
}
|
111 |
|
112 |
-
if($response['api_version'] == '1.0'){
|
113 |
-
$
|
114 |
-
|
115 |
-
$
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
$bank_name = $instructions['details']['bank_name'];
|
121 |
-
$note_extra_comition = $instructions['note_extra_comition'];
|
122 |
-
$note_expiration_date = $instructions['note_expiration_date'];
|
123 |
-
$api_version = $response['api_version'];
|
124 |
-
} elseif ($response['api_version'] == '1.1') {
|
125 |
-
$expiration_date = $response['exp_date'];
|
126 |
-
$reference = $response['short_id'];
|
127 |
-
$instructions = $response['instructions'];
|
128 |
-
$step_1 = $instructions['step_1'];
|
129 |
-
$step_2 = $instructions['step_2'];
|
130 |
-
$step_3 = $instructions['step_3'];
|
131 |
-
$bank_number = $instructions['details']['bank_account_number'];
|
132 |
-
$bank_name = $instructions['details']['bank_name'];
|
133 |
-
$note_extra_comition = $instructions['note_extra_comition'];
|
134 |
-
$note_expiration_date = $instructions['note_expiration_date'];
|
135 |
-
$api_version = $response['api_version'];
|
136 |
-
} elseif ($response['api_version'] == '1.2') {
|
137 |
-
$expiration_date = $response['exp_date'];
|
138 |
-
$reference = $response['short_id'];
|
139 |
-
$instructions = $response['instructions'];
|
140 |
-
$step_1 = $instructions['step_1'];
|
141 |
-
$step_2 = $instructions['step_2'];
|
142 |
-
$step_3 = $instructions['step_3'];
|
143 |
-
$bank_number = $instructions['details']['bank_account_number'];
|
144 |
-
$bank_name = $instructions['details']['bank_name'];
|
145 |
-
$note_extra_comition = $instructions['note_extra_comition'];
|
146 |
-
$note_expiration_date = $instructions['note_expiration_date'];
|
147 |
-
$api_version = $response['api_version'];
|
148 |
-
}
|
149 |
-
//$store_image = $response['charge']['store_image'];
|
150 |
-
|
151 |
-
Mage::getSingleton('core/session')->setExpirationDate($expiration_date);
|
152 |
-
Mage::getSingleton('core/session')->setReference($reference);
|
153 |
-
Mage::getSingleton('core/session')->setStep1($step_1);
|
154 |
-
Mage::getSingleton('core/session')->setStep2($step_2);
|
155 |
-
//Mage::getSingleton('core/session')->setStep2($step_2);
|
156 |
-
Mage::getSingleton('core/session')->setStep3($step_3);
|
157 |
-
Mage::getSingleton('core/session')->setBankNumber($bank_number);
|
158 |
-
Mage::getSingleton('core/session')->setBankName($bank_name);
|
159 |
-
Mage::getSingleton('core/session')->setNoteExtraComition($note_extra_comition);
|
160 |
-
Mage::getSingleton('core/session')->setNoteExpirationDate($note_expiration_date);
|
161 |
-
Mage::getSingleton('core/session')->setApiVersion($api_version);
|
162 |
-
Mage::getSingleton('core/session')->setLogoSrc($logo);
|
163 |
-
|
164 |
return $this;
|
165 |
}
|
166 |
|
@@ -172,7 +130,7 @@ class Compropago_Model_Standard extends Mage_Payment_Model_Method_Abstract
|
|
172 |
Mage::throwException("Datos incompletos del servicio, contacte al administrador del sitio");
|
173 |
}
|
174 |
|
175 |
-
$url = '
|
176 |
$url.= 'true';
|
177 |
$username = trim($this->getConfigData('client_secret'));
|
178 |
$password = trim($this->getConfigData('client_id'));
|
@@ -192,7 +150,7 @@ class Compropago_Model_Standard extends Mage_Payment_Model_Method_Abstract
|
|
192 |
$response = json_decode($this->_response,true);
|
193 |
|
194 |
// respuesta del servicio
|
195 |
-
if ($response['type'] == "error")
|
196 |
{
|
197 |
$errorMessage = $response['message'] . "\n";
|
198 |
Mage::throwException($errorMessage);
|
22 |
{
|
23 |
$data = new Varien_Object($data);
|
24 |
}
|
25 |
+
$store_code = $data->getStoreCode();
|
26 |
+
|
27 |
+
//Verificamos si seleccionaron un establecimiento si no les dejamos por default OXXO
|
28 |
+
if (empty($store_code)){
|
29 |
+
$store_code = 'OXXO';
|
30 |
+
}
|
31 |
|
32 |
+
//Verificamos si existe el customer
|
33 |
+
if($customer->getFirstname()){
|
34 |
+
$info = array(
|
35 |
+
"payment_type" => $store_code,
|
36 |
+
"customer_name" => htmlentities($customer->getFirstname()),
|
37 |
+
"customer_email" => htmlentities($customer->getEmail())
|
38 |
+
);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
39 |
} else {
|
40 |
+
$sessionCheckout = Mage::getSingleton('checkout/session');
|
41 |
+
$quote = $sessionCheckout->getQuote();
|
42 |
+
$billingAddress = $quote->getBillingAddress();
|
43 |
+
$billing = $billingAddress->getData();
|
44 |
+
$info = array(
|
45 |
+
"payment_type" => $store_code,
|
46 |
+
"customer_name" => htmlentities($billing['firstname']),
|
47 |
+
"customer_email" => htmlentities($billing['email'])
|
48 |
+
);
|
49 |
+
}
|
50 |
+
|
51 |
+
$infoInstance = $this->getInfoInstance();
|
52 |
+
$infoInstance->setAdditionalData(serialize($info));
|
53 |
|
54 |
return $this;
|
55 |
}
|
85 |
$order1 = Mage::getModel('sales/order')->loadByIncrementId($orderNumber);
|
86 |
|
87 |
foreach ($order1->getAllItems() as $item) {
|
88 |
+
$name += $item->getName();
|
89 |
}
|
90 |
|
91 |
// obtener datos del pago en info y asignar monto total
|
93 |
$info = unserialize($infoIntance->getAdditionalData());
|
94 |
$info['order_id'] = $orderNumber;
|
95 |
$info['order_price'] = $grandTotal;
|
96 |
+
$info['order_name'] = $name;
|
97 |
+
$info['image_url'] = '';
|
98 |
$info['client_secret'] = trim($this->getConfigData('client_secret'));
|
99 |
$info['client_id'] = trim($this->getConfigData('client_id'));
|
100 |
|
111 |
Mage::throwException($error->getMessage());
|
112 |
}
|
113 |
|
114 |
+
if(isset($response['api_version']) && $response['api_version'] == '1.0'){
|
115 |
+
$id = $response['payment_id'];
|
116 |
+
} elseif (isset($response['api_version']) && $response['api_version'] == '1.1') {
|
117 |
+
$id = $response['id'];
|
118 |
+
}
|
119 |
+
|
120 |
+
Mage::getSingleton('core/session')->setCompropagoId($id);
|
121 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
122 |
return $this;
|
123 |
}
|
124 |
|
130 |
Mage::throwException("Datos incompletos del servicio, contacte al administrador del sitio");
|
131 |
}
|
132 |
|
133 |
+
$url = 'https://api.compropago.com/v1/providers/';
|
134 |
$url.= 'true';
|
135 |
$username = trim($this->getConfigData('client_secret'));
|
136 |
$password = trim($this->getConfigData('client_id'));
|
150 |
$response = json_decode($this->_response,true);
|
151 |
|
152 |
// respuesta del servicio
|
153 |
+
if (isset($response['type']) && $response['type'] == "error")
|
154 |
{
|
155 |
$errorMessage = $response['message'] . "\n";
|
156 |
Mage::throwException($errorMessage);
|
app/design/frontend/base/default/template/compropago/cash.phtml
CHANGED
@@ -11,9 +11,9 @@
|
|
11 |
$_model = $this->getMethod();
|
12 |
$_getProviders = $_model->getProviders();
|
13 |
?>
|
14 |
-
<
|
15 |
<ul id="payment_form_<?php echo $_code ?>" style="display:none" >
|
16 |
-
<label class="label-instructions">Selecciona un establecimiento para realizar el pago en efectivo
|
17 |
<?php if (!$_model->showLogoProviders())
|
18 |
{ ?>
|
19 |
<li>
|
@@ -26,11 +26,11 @@
|
|
26 |
</li>
|
27 |
<?php } else { ?>
|
28 |
<li>
|
29 |
-
<div class="row stores-compact" style="padding: 5px 15px; opacity: 1;" id="<?php echo $_code ?>_store">
|
30 |
<?php foreach ($_getProviders as $_provider): ?>
|
31 |
<!--<php if($_provider['internal_name'] == 'OXXO' || $_provider['internal_name'] == 'SEVEN_ELEVEN' || $_provider['internal_name'] == 'EXTRA' || $_provider['internal_name'] == 'CHEDRAUI'): ?>-->
|
32 |
<div class="element-box">
|
33 |
-
<label for="<?php echo $_code ?>_<?php echo $_provider['internal_name'] ?>" class="provider-description " onclick="seleccionar(this,'<?php echo $_provider['internal_name'] ?>');">
|
34 |
<img src="<?php echo $_provider['image_medium'] ?>" class="image_provider">
|
35 |
</label>
|
36 |
</div>
|
11 |
$_model = $this->getMethod();
|
12 |
$_getProviders = $_model->getProviders();
|
13 |
?>
|
14 |
+
<img id="image_providers" onload="loadImage(this);" src="<?php echo $this->getSkinUrl('images/compropago/providers.png') ?>" class="image_providers_compropago">
|
15 |
<ul id="payment_form_<?php echo $_code ?>" style="display:none" >
|
16 |
+
<label class="label-instructions">Selecciona un establecimiento para realizar el pago en efectivo:</label>
|
17 |
<?php if (!$_model->showLogoProviders())
|
18 |
{ ?>
|
19 |
<li>
|
26 |
</li>
|
27 |
<?php } else { ?>
|
28 |
<li>
|
29 |
+
<div class="row stores-compact" style="padding: 5px 15px; opacity: 1; width:100%;" id="<?php echo $_code ?>_store">
|
30 |
<?php foreach ($_getProviders as $_provider): ?>
|
31 |
<!--<php if($_provider['internal_name'] == 'OXXO' || $_provider['internal_name'] == 'SEVEN_ELEVEN' || $_provider['internal_name'] == 'EXTRA' || $_provider['internal_name'] == 'CHEDRAUI'): ?>-->
|
32 |
<div class="element-box">
|
33 |
+
<label for="<?php echo $_code ?>_<?php echo $_provider['internal_name'] ?>" class="provider-description <?php echo $_provider['internal_name'] == 'OXXO' ? 'seleccion_store' : '' ?>" onclick="seleccionar(this,'<?php echo $_provider['internal_name'] ?>');">
|
34 |
<img src="<?php echo $_provider['image_medium'] ?>" class="image_provider">
|
35 |
</label>
|
36 |
</div>
|
app/design/frontend/base/default/template/compropago/onepage_success.phtml
CHANGED
@@ -4,86 +4,20 @@
|
|
4 |
*/
|
5 |
?>
|
6 |
|
7 |
-
<?php echo $this->getMessagesBlock()->getGroupedHtml() ?>
|
8 |
-
<?php $
|
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 |
-
|
33 |
-
|
34 |
-
|
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>
|
@@ -108,6 +42,26 @@
|
|
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
*/
|
5 |
?>
|
6 |
|
7 |
+
<?php echo $this->getMessagesBlock()->getGroupedHtml(); ?>
|
8 |
+
<?php $compropagoId = Mage::getSingleton('core/session')->getCompropagoId(); ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
9 |
|
|
|
|
|
10 |
<div id="receipt" class="receipt">
|
|
|
|
|
11 |
<div class="page-title">
|
12 |
<h3>¡Felicitaciones! Su pedido ha sido generado correctamente.</h3>
|
13 |
</div>
|
14 |
<?php if ($this->getOrderId()):?>
|
15 |
<?php if ($this->getCanViewOrder()) :?>
|
16 |
<p><?php echo $this->__('Your order # is: %s.', sprintf('<a href="%s">%s</a>', $this->escapeHtml($this->getViewOrderUrl()), $this->escapeHtml($this->getOrderId()))) ?></p>
|
17 |
+
<?php else :?>
|
18 |
+
<div id="compropagodContainer" style="width: 100%;">
|
19 |
+
<iframe style="width: 100%; height: 865px;>" id="compropagodFrame" src="https://www.compropago.com/comprobante/?confirmation_id=<?php echo $compropagoId; ?>" frameborder="0" scrolling="yes"> </iframe>
|
20 |
+
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
21 |
<?php endif;?>
|
22 |
<?php if ($this->getCanViewOrder() && $this->getCanPrintOrder()) :?>
|
23 |
<p>
|
42 |
<?php endif;?>
|
43 |
<div class="buttons-set">
|
44 |
<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>
|
|
|
45 |
</div>
|
46 |
+
</div>
|
47 |
+
<script type="text/javascript">
|
48 |
+
function resizeIframe() {
|
49 |
+
var container=document.getElementById("compropagodContainer");
|
50 |
+
var iframe=document.getElementById("compropagodFrame");
|
51 |
+
if(iframe && container){
|
52 |
+
var ratio=585/811;
|
53 |
+
var width=container.offsetWidth;
|
54 |
+
var height=(width/ratio);
|
55 |
+
if(height>937){ height=937;}
|
56 |
+
iframe.style.width=width + 'px';
|
57 |
+
iframe.style.height=height + 'px';
|
58 |
+
}
|
59 |
+
}
|
60 |
+
|
61 |
+
window.onload = function(event) {
|
62 |
+
resizeIframe();
|
63 |
+
};
|
64 |
+
window.onresize = function(event) {
|
65 |
+
resizeIframe();
|
66 |
+
};
|
67 |
+
</script>
|
js/compropago/compropago.js
CHANGED
@@ -1,12 +1,3 @@
|
|
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 |
-
}
|
9 |
-
|
10 |
function seleccionar(t,internal_name){
|
11 |
var class_name = t.className,
|
12 |
seleccionados = document.getElementsByClassName("seleccion_store"),
|
@@ -20,4 +11,29 @@ function seleccionar(t,internal_name){
|
|
20 |
t.className += "seleccion_store";
|
21 |
store_code.value = internal_name;
|
22 |
}
|
23 |
-
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
function seleccionar(t,internal_name){
|
2 |
var class_name = t.className,
|
3 |
seleccionados = document.getElementsByClassName("seleccion_store"),
|
11 |
t.className += "seleccion_store";
|
12 |
store_code.value = internal_name;
|
13 |
}
|
14 |
+
};
|
15 |
+
|
16 |
+
function loadImage (t) {
|
17 |
+
var input = document.getElementById('p_method_compropago');
|
18 |
+
|
19 |
+
if(input.checked){
|
20 |
+
t.hide();
|
21 |
+
} else {
|
22 |
+
t.show();
|
23 |
+
}
|
24 |
+
};
|
25 |
+
|
26 |
+
window.onload = function(){
|
27 |
+
$$("#co-payment-form input[type=radio]").each(function(input){
|
28 |
+
input.observe("click", function(){
|
29 |
+
var input = document.getElementById('p_method_compropago'),
|
30 |
+
image = document.getElementById('image_providers');
|
31 |
+
|
32 |
+
if(input.checked){
|
33 |
+
image.hide();
|
34 |
+
} else {
|
35 |
+
image.show();
|
36 |
+
}
|
37 |
+
})
|
38 |
+
})
|
39 |
+
}
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>ComproPago</name>
|
4 |
-
<version>1.0.
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
|
7 |
<channel>community</channel>
|
@@ -10,9 +10,9 @@
|
|
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>2016-
|
14 |
-
<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="
|
16 |
<compatible/>
|
17 |
<dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies>
|
18 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>ComproPago</name>
|
4 |
+
<version>1.0.2</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
|
7 |
<channel>community</channel>
|
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>2016-02-19</date>
|
14 |
+
<time>16:38:45</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="4401700124b87ff9e362560ab25289a6"/><file name="Standard.php" hash="deebf731fb81d4dd985e58f02bb5387e"/></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="074dabc90c83b44b48e10129f0c08484"/><file name="onepage_success.phtml" hash="85e593fd0fba901d82d80b32527f65f0"/></dir></dir><dir name="layout"><file name="compropago.xml" hash="54959ff0a24d2db5de8060613a1b3231"/></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="6f7c0a747f6b1ba2d667fa0c38f3eaf1"/></dir></dir><dir name="images"><dir name="compropago"><file name="providers.png" hash="bd43bc40840ffa45286b48bd97e13ea3"/><file name="providers1.png" hash="44d36ab2a211de651e0ba98dd5961bea"/><file name="warning.png" hash="e30bf5b88671a415ca7771b3e5dd9c19"/></dir></dir></dir></dir></dir></target><target name="mage"><dir><dir name="js"><dir name="compropago"><file name="compropago.js" hash="0eff4d21b97e7878269ef84186e1b299"/></dir></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
CHANGED
@@ -176,8 +176,8 @@ ul.cp-warning li {
|
|
176 |
float: left;
|
177 |
position: relative;
|
178 |
min-height: 1px;
|
179 |
-
padding-left:
|
180 |
-
padding-right:
|
181 |
}
|
182 |
|
183 |
.row{margin-left:-15px;margin-right:-15px;}
|
@@ -240,7 +240,7 @@ ul.cp-warning li {
|
|
240 |
border-radius:5px;
|
241 |
-moz-border-radius:5px;
|
242 |
-webkit-border-radius:5px;
|
243 |
-
width:
|
244 |
}
|
245 |
.element-box input{
|
246 |
left:-9999px;position:absolute
|
@@ -295,8 +295,7 @@ ul.cp-warning li {
|
|
295 |
|
296 |
.label-instructions{
|
297 |
top: 5px;
|
298 |
-
position: relative;
|
299 |
-
padding: 0 0 0 23px;
|
300 |
}
|
301 |
|
302 |
.logo-success{
|
@@ -304,66 +303,9 @@ ul.cp-warning li {
|
|
304 |
position: relative;
|
305 |
display: none;
|
306 |
}
|
307 |
-
|
308 |
-
|
309 |
-
display: none;
|
310 |
-
}
|
311 |
-
|
312 |
-
.checkout-onepage-success .col-main{
|
313 |
-
text-align: left !important;
|
314 |
}
|
315 |
-
|
316 |
-
|
317 |
-
.receipt{
|
318 |
-
padding: 5px
|
319 |
-
}
|
320 |
-
.logo-success{
|
321 |
-
top: 10px;
|
322 |
-
position: relative;
|
323 |
-
display: block;
|
324 |
-
}
|
325 |
-
.cp-instruction-section{
|
326 |
-
width: 100%;
|
327 |
-
border: 1px solid #DAE2E7;
|
328 |
-
margin: 0px 0px 15px 0px;
|
329 |
-
border-radius: 8px;
|
330 |
-
float: left;
|
331 |
-
background-position: 0px 40px;
|
332 |
-
font-size: 11pt;
|
333 |
-
background: #FFF !important;
|
334 |
-
-webkit-print-color-adjust: exact;
|
335 |
-
}
|
336 |
-
.cp-warning-box{
|
337 |
-
float: left;
|
338 |
-
border: 1px solid #DFDB83;
|
339 |
-
border-radius: 3px;
|
340 |
-
clear: both;
|
341 |
-
color: #000;
|
342 |
-
padding: 10px 10px;
|
343 |
-
margin: 0px 0px 14px 0px !important;
|
344 |
-
width: 97%;
|
345 |
-
background: #FFFEEC !important;
|
346 |
-
-webkit-print-color-adjust: exact;
|
347 |
-
}
|
348 |
-
.account-number {
|
349 |
-
float: left;
|
350 |
-
border: 1px solid #11AF17;
|
351 |
-
border-radius: 3px;
|
352 |
-
clear: both;
|
353 |
-
color: #000;
|
354 |
-
font-size: 16px;
|
355 |
-
padding: 5px 10px;
|
356 |
-
font-size: 14px;
|
357 |
-
min-width: 250px;
|
358 |
-
clear: both;
|
359 |
-
margin-left: 17px;
|
360 |
-
background: #FFFEEC !important;
|
361 |
-
-webkit-print-color-adjust: exact;
|
362 |
-
}
|
363 |
-
.continue-succes{
|
364 |
-
display: none;
|
365 |
-
}
|
366 |
-
.print-succes{
|
367 |
-
display: none;
|
368 |
-
}
|
369 |
}
|
176 |
float: left;
|
177 |
position: relative;
|
178 |
min-height: 1px;
|
179 |
+
padding-left: 1px;
|
180 |
+
padding-right: 1px;
|
181 |
}
|
182 |
|
183 |
.row{margin-left:-15px;margin-right:-15px;}
|
240 |
border-radius:5px;
|
241 |
-moz-border-radius:5px;
|
242 |
-webkit-border-radius:5px;
|
243 |
+
width: 60px;
|
244 |
}
|
245 |
.element-box input{
|
246 |
left:-9999px;position:absolute
|
295 |
|
296 |
.label-instructions{
|
297 |
top: 5px;
|
298 |
+
position: relative;
|
|
|
299 |
}
|
300 |
|
301 |
.logo-success{
|
303 |
position: relative;
|
304 |
display: none;
|
305 |
}
|
306 |
+
.image_providers_compropago{
|
307 |
+
margin-left: 24px;
|
|
|
|
|
|
|
|
|
|
|
308 |
}
|
309 |
+
.checked_compropago{
|
310 |
+
display: block !important;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
311 |
}
|
skin/frontend/base/default/images/compropago/providers.png
ADDED
Binary file
|
skin/frontend/base/default/images/compropago/providers1.png
ADDED
Binary file
|