Version Notes
Alteração no MoiP
Criação de xml para pedidos, restruturação do redirect.phtml, e-mail e info.phtml
Download this release
Release Info
Developer | O2TI |
Extension | o2ti_moip |
Version | 1.0.9 |
Comparing to | |
See all releases |
Code changes from version 1.0.8 to 1.0.9
- app/code/local/O2TI/Moip/Block/Info.php +22 -10
- app/code/local/O2TI/Moip/Block/Standard/Info.php +50 -4
- app/code/local/O2TI/Moip/Block/Standard/Novaforma.php +14 -0
- app/code/local/O2TI/Moip/Block/Standard/Redirect.php +181 -4
- app/code/local/O2TI/Moip/Model/.ftpquota +1 -0
- app/code/local/O2TI/Moip/Model/Api.php +242 -363
- app/code/local/O2TI/Moip/Model/Mysql4/Collection.php +9 -0
- app/code/local/O2TI/Moip/Model/Mysql4/Write.php +9 -0
- app/code/local/O2TI/Moip/Model/Standard.php +38 -38
- app/code/local/O2TI/Moip/Model/Write.php +8 -0
- app/code/local/O2TI/Moip/controllers/IndexController.php +115 -74
- app/code/local/O2TI/Moip/controllers/StandardController.php +285 -317
- app/code/local/O2TI/Moip/etc/config.xml +17 -16
- app/code/local/O2TI/Moip/etc/system.xml +35 -5
- app/code/local/O2TI/Moip/sql/moip_setup/mysql4-upgrade-0.1.0-0.2.0.php +0 -31
- app/code/local/O2TI/Moip/sql/moip_setup/mysql4-upgrade-0.2.1-0.2.4.php +42 -0
- app/code/local/O2TI/Onestepcheckout/controllers/IndexController.php +10 -7
- app/design/adminhtml/default/default/template/O2TI/moip/info.phtml +282 -80
- app/design/frontend/default/default/layout/o2ti_moip.xml +63 -17
- app/design/frontend/default/default/template/O2TI/moip/Novaforma.phtml +1 -0
- app/design/frontend/default/default/template/O2TI/moip/boleto.phtml +81 -0
- app/design/frontend/default/default/template/O2TI/moip/cartao.phtml +192 -0
- app/design/frontend/default/default/template/O2TI/moip/emptyupdate.phtml +26 -0
- app/design/frontend/default/default/template/O2TI/moip/form.phtml +682 -0
- app/design/frontend/default/default/template/O2TI/moip/horizontal_form.phtml +13 -23
- app/design/frontend/default/default/template/O2TI/moip/info.phtml +344 -80
- app/design/frontend/default/default/template/O2TI/moip/layout_boleto.phtml +508 -0
- app/design/frontend/default/default/template/O2TI/moip/refaz.phtml +81 -0
- app/design/frontend/default/default/template/O2TI/moip/transferencia.phtml +66 -0
- app/design/frontend/default/default/template/O2TI/moip/vertical_form.phtml +3 -1
- js/O2TI/moip/jquery_noconflict.js +1 -0
- js/O2TI/moip/novamascara.js +9 -0
- js/O2TI/moip/validacao.js +15 -0
- media/O2TI/all/logo.png +0 -0
- package.xml +6 -5
- skin/adminhtml/default/default/O2TI/moip/css/prettify.css +0 -0
- skin/adminhtml/default/default/O2TI/moip/imagem/codigo-seguranca.png +0 -0
- skin/frontend/default/default/O2TI/moip/css/bootstrap.css +5 -1
- skin/frontend/default/default/O2TI/moip/css/formulario_horizontal.css +2 -2
app/code/local/O2TI/Moip/Block/Info.php
CHANGED
@@ -8,15 +8,11 @@ class O2TI_Moip_Block_Info extends Mage_Payment_Block_Info
|
|
8 |
$this->setTemplate('O2TI/moip/info.phtml');
|
9 |
}
|
10 |
|
11 |
-
|
12 |
-
{
|
13 |
-
$this->_prepareInfo();
|
14 |
-
return parent::_beforeToHtml();
|
15 |
-
}
|
16 |
|
17 |
public function getMoip()
|
18 |
{
|
19 |
-
return Mage::getSingleton('moip/
|
20 |
}
|
21 |
|
22 |
|
@@ -28,7 +24,7 @@ class O2TI_Moip_Block_Info extends Mage_Payment_Block_Info
|
|
28 |
$nome = "Boleto Bancário";
|
29 |
break;
|
30 |
case "DebitoBancario":
|
31 |
-
$nome = "
|
32 |
break;
|
33 |
case "CartaoCredito":
|
34 |
$nome = "Cartão de Crédito";
|
@@ -40,8 +36,24 @@ class O2TI_Moip_Block_Info extends Mage_Payment_Block_Info
|
|
40 |
|
41 |
protected function _prepareInfo()
|
42 |
{
|
43 |
-
|
44 |
-
|
45 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46 |
}
|
47 |
}
|
8 |
$this->setTemplate('O2TI/moip/info.phtml');
|
9 |
}
|
10 |
|
11 |
+
|
|
|
|
|
|
|
|
|
12 |
|
13 |
public function getMoip()
|
14 |
{
|
15 |
+
return Mage::getSingleton('moip/api');
|
16 |
}
|
17 |
|
18 |
|
24 |
$nome = "Boleto Bancário";
|
25 |
break;
|
26 |
case "DebitoBancario":
|
27 |
+
$nome = "Transferência Bancária";
|
28 |
break;
|
29 |
case "CartaoCredito":
|
30 |
$nome = "Cartão de Crédito";
|
36 |
|
37 |
protected function _prepareInfo()
|
38 |
{
|
39 |
+
|
40 |
+
$order_get = Mage::app()->getRequest()->getParam('order_id');
|
41 |
+
$order = $this->getInfo()->getOrder();
|
42 |
+
$order = $order->getIncrementId();
|
43 |
+
$model = Mage::getModel('moip/write');
|
44 |
+
$result = $model->load($order, 'realorder_id');
|
45 |
+
$dados = array();
|
46 |
+
$dados['result_meio'] = $this->getNomePagamento($result->getMeio_pg());
|
47 |
+
$dados['meio_pago'] = $this->getNomePagamento($result->getMeio_pg());
|
48 |
+
$dados['realorder_id'] = $result->getRealorder_id();
|
49 |
+
$dados['order_idmoip'] = $result->getorder_idmoip();
|
50 |
+
$dados['boleto_line'] = $result->getBoleto_line();
|
51 |
+
$dados['brand'] = $result->getBrand();
|
52 |
+
$dados['creditcard_parc'] = $result->getCreditcard_parc();
|
53 |
+
$dados['first6'] = $result->getFirst6();
|
54 |
+
$dados['last4'] = $result->getLast4();
|
55 |
+
$dados['token'] = $result->getToken();
|
56 |
+
$dados['url'] = $result->getUrlcheckout_pg();
|
57 |
+
return $dados;
|
58 |
}
|
59 |
}
|
app/code/local/O2TI/Moip/Block/Standard/Info.php
CHANGED
@@ -1,10 +1,56 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
|
|
|
|
|
|
|
4 |
parent::_construct();
|
5 |
$this->setTemplate('O2TI/moip/info.phtml');
|
6 |
}
|
7 |
-
|
8 |
-
}
|
9 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
<?php
|
2 |
+
|
3 |
+
class O2TI_Moip_Block_Standard_Info extends Mage_Payment_Block_Info_Container
|
4 |
+
{
|
5 |
+
protected function _construct()
|
6 |
+
{
|
7 |
parent::_construct();
|
8 |
$this->setTemplate('O2TI/moip/info.phtml');
|
9 |
}
|
|
|
|
|
10 |
|
11 |
+
|
12 |
+
|
13 |
+
public function getMoip()
|
14 |
+
{
|
15 |
+
return Mage::getSingleton('moip/standard');
|
16 |
+
}
|
17 |
+
|
18 |
+
|
19 |
|
20 |
+
private function getNomePagamento($param) {
|
21 |
+
$nome = "";
|
22 |
+
switch ($param) {
|
23 |
+
case "BoletoBancario":
|
24 |
+
$nome = "Boleto Bancário";
|
25 |
+
break;
|
26 |
+
case "DebitoBancario":
|
27 |
+
$nome = "Débito Bancário";
|
28 |
+
break;
|
29 |
+
case "CartaoDeCredito":
|
30 |
+
$nome = "Cartão de Crédito";
|
31 |
+
break;
|
32 |
+
}
|
33 |
+
return $nome;
|
34 |
+
}
|
35 |
+
|
36 |
+
|
37 |
+
protected function _prepareInfo()
|
38 |
+
{
|
39 |
+
|
40 |
+
$order_get = Mage::app()->getRequest()->getParam('order_id');
|
41 |
+
$order = $this->getInfo()->getOrder();
|
42 |
+
$order = $order->getIncrementId();
|
43 |
+
$model = Mage::getModel('moip/write');
|
44 |
+
$result = $model->load($order, 'realorder_id');
|
45 |
+
$meio_forma = json_decode($result->getbrand_moip());
|
46 |
+
$dados = array();
|
47 |
+
$dados['result_meio'] = $result->getMeio_pg();
|
48 |
+
$dados['realorder_id'] = $result->getRealorder_id();
|
49 |
+
$dados['brand'] = $result->getBrand();
|
50 |
+
$dados['creditcard_parc'] = $result->getCreditcard_parc();
|
51 |
+
$dados['first6'] = $result->getFirst6();
|
52 |
+
$dados['last4'] = $result->getLast4();
|
53 |
+
$dados['url'] = $result->getUrlcheckout_pg();
|
54 |
+
return $dados;
|
55 |
+
}
|
56 |
+
}
|
app/code/local/O2TI/Moip/Block/Standard/Novaforma.php
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class O2TI_Moip_Block_IndexController_Novaforma extends Mage_Core_Block_Template{
|
3 |
+
public function __construct(){
|
4 |
+
parent::__construct();
|
5 |
+
$this->loadLayout();
|
6 |
+
$this->getLayout()->getBlock('content')->append($this->getLayout()->createBlock('O2TI_Moip_Block_Standard_Novaforma'));
|
7 |
+
$this->renderLayout();
|
8 |
+
}
|
9 |
+
public function mostraCartao()
|
10 |
+
{
|
11 |
+
|
12 |
+
}
|
13 |
+
}
|
14 |
+
?>
|
app/code/local/O2TI/Moip/Block/Standard/Redirect.php
CHANGED
@@ -1,7 +1,184 @@
|
|
1 |
<?php
|
2 |
-
class O2TI_Moip_Block_Standard_Redirect extends
|
3 |
-
|
4 |
parent::__construct();
|
5 |
-
$this->setTemplate("O2TI/moip/redirect.phtml");
|
6 |
}
|
7 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
<?php
|
2 |
+
class O2TI_Moip_Block_Standard_Redirect extends Mage_Checkout_Block_Onepage_Success{
|
3 |
+
public function __construct(){
|
4 |
parent::__construct();
|
|
|
5 |
}
|
6 |
+
public function getSaveDate($order, $result_decode, $customerData = null, $pgtoArray, $client_array){
|
7 |
+
|
8 |
+
if (Mage::getSingleton('moip/standard')->getConfigData('ambiente') == "teste") {
|
9 |
+
$url = "https://desenvolvedor.moip.com.br/sandbox/Instrucao.do?token=";
|
10 |
+
}
|
11 |
+
else {
|
12 |
+
$url = "https://www.moip.com.br/Instrucao.do?token=";
|
13 |
+
}
|
14 |
+
|
15 |
+
$model = Mage::getModel('moip/write');
|
16 |
+
$model->load($order, 'realorder_id')->delete();
|
17 |
+
$model = Mage::getModel('moip/write');
|
18 |
+
$model->setRealorder_id($order);
|
19 |
+
$model->setMeio_pg($pgtoArray['forma_pagamento']);
|
20 |
+
$model->setCreditcard_parc($pgtoArray['credito_parcelamento']);
|
21 |
+
if($pgtoArray['forma_pagamento'] == "BoletoBancario"){
|
22 |
+
$brand = "Bradesco";
|
23 |
+
} elseif ($pgtoArray['forma_pagamento'] == "DebitoBancario") {
|
24 |
+
$brand = $pgtoArray['debito_instituicao'];
|
25 |
+
} else {
|
26 |
+
$brand = $pgtoArray['credito_instituicao'];
|
27 |
+
}
|
28 |
+
$model->setbrand_moip($brand);
|
29 |
+
$model->setCreditcard_parc($pgtoArray['credito_parcelamento']);
|
30 |
+
$model->setFirst6(substr($pgtoArray['credito_numero'], 0, 6));
|
31 |
+
$model->setLast4(substr($pgtoArray['credito_numero'],-4));
|
32 |
+
$model->setCustomer_id($customerData->getId());
|
33 |
+
$model->setUrlcheckout_pg($url.$result_decode['token']);
|
34 |
+
$model->setToken($result_decode['token']);
|
35 |
+
$model->setStatus_token($result_decode['status']);
|
36 |
+
$model->save();
|
37 |
+
/*
|
38 |
+
|
39 |
+
|
40 |
+
*/
|
41 |
+
return true;
|
42 |
+
}
|
43 |
+
public function getJson($pgtoArray){
|
44 |
+
|
45 |
+
if($pgtoArray['forma_pagamento'] == "BoletoBancario"){
|
46 |
+
$json = array(
|
47 |
+
'Forma' => $pgtoArray['forma_pagamento'],
|
48 |
+
);
|
49 |
+
} elseif ($pgtoArray['forma_pagamento'] == "DebitoBancario") {
|
50 |
+
$json = array(
|
51 |
+
'Forma' => $pgtoArray['forma_pagamento'],
|
52 |
+
'Instituicao' => $pgtoArray['debito_instituicao'],
|
53 |
+
);
|
54 |
+
|
55 |
+
} else {
|
56 |
+
$expiracao = $pgtoArray['credito_expiracao_mes']."/".$pgtoArray['credito_expiracao_ano'];
|
57 |
+
$DataNascimento = date('d/m/Y', strtotime($pgtoArray['credito_portador_nascimento']));
|
58 |
+
$json = array(
|
59 |
+
'Forma' => $pgtoArray['forma_pagamento'],
|
60 |
+
'Instituicao' => $pgtoArray['credito_instituicao'],
|
61 |
+
'Parcelas' => $pgtoArray['credito_parcelamento'],
|
62 |
+
'CartaoCredito' => array(
|
63 |
+
'Numero' => $pgtoArray['credito_numero'],
|
64 |
+
'Expiracao' => $expiracao,
|
65 |
+
'CodigoSeguranca' => $pgtoArray['credito_codigo_seguranca'],
|
66 |
+
'Portador' => array(
|
67 |
+
'Nome' => $pgtoArray['credito_portador_nome'],
|
68 |
+
'DataNascimento' => $DataNascimento,
|
69 |
+
'Telefone' => $pgtoArray['credito_portador_DDD'].$pgtoArray['credito_portador_telefone'],
|
70 |
+
'Identidade' => $pgtoArray['credito_portador_cpf']),
|
71 |
+
),
|
72 |
+
);
|
73 |
+
|
74 |
+
}
|
75 |
+
$json = Zend_Json::encode($json);
|
76 |
+
return $json;
|
77 |
+
|
78 |
+
}
|
79 |
+
public function getOrder_dados($order_dados){
|
80 |
+
return $order_dados;
|
81 |
+
}
|
82 |
+
|
83 |
+
public function getErroCartao($result_decode)
|
84 |
+
{
|
85 |
+
if(array_key_exists('errors', $result_decode)){
|
86 |
+
$dados_ErroCartao = array();
|
87 |
+
$dados_ErroCartao['errors'] = $result_decode->errors;
|
88 |
+
foreach ($result_decode->errors as $key => $value)
|
89 |
+
{
|
90 |
+
$dados_ErroCartao['code'] = $value->code;
|
91 |
+
$dados_ErroCartao['description'] = $value->description;
|
92 |
+
}
|
93 |
+
$dados_ErroCartao = json_encode($dados_ErroCartao);
|
94 |
+
return $dados_ErroCartao;
|
95 |
+
} else{
|
96 |
+
return false;
|
97 |
+
}
|
98 |
+
}
|
99 |
+
public function getCartao($result_decode, $pagamento)
|
100 |
+
{
|
101 |
+
|
102 |
+
return false;
|
103 |
+
|
104 |
+
}
|
105 |
+
|
106 |
+
public function getTrans_Moip($result_decode, $pagamento)
|
107 |
+
{
|
108 |
+
|
109 |
+
return true;
|
110 |
+
}
|
111 |
+
|
112 |
+
public function getBoleto_Moip($result_decode)
|
113 |
+
{
|
114 |
+
|
115 |
+
return true;
|
116 |
+
}
|
117 |
+
|
118 |
+
private function getBarcode($valor){
|
119 |
+
$fino = 1 ;
|
120 |
+
$largo = 3 ;
|
121 |
+
$altura = 50 ;
|
122 |
+
$barcodes[0] = "00110" ;
|
123 |
+
$barcodes[1] = "10001" ;
|
124 |
+
$barcodes[2] = "01001" ;
|
125 |
+
$barcodes[3] = "11000" ;
|
126 |
+
$barcodes[4] = "00101" ;
|
127 |
+
$barcodes[5] = "10100" ;
|
128 |
+
$barcodes[6] = "01100" ;
|
129 |
+
$barcodes[7] = "00011" ;
|
130 |
+
$barcodes[8] = "10010" ;
|
131 |
+
$barcodes[9] = "01010" ;
|
132 |
+
for($f1=9;$f1>=0;$f1--)
|
133 |
+
{
|
134 |
+
for($f2=9;$f2>=0;$f2--){
|
135 |
+
$f = ($f1 * 10) + $f2;
|
136 |
+
$texto = "";
|
137 |
+
for($i=1;$i<6;$i++){
|
138 |
+
$texto .= substr($barcodes[$f1],($i-1),1) . substr($barcodes[$f2],($i-1),1);
|
139 |
+
}
|
140 |
+
$barcodes[$f] = $texto;
|
141 |
+
}
|
142 |
+
}
|
143 |
+
$image_p = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_SKIN).'O2TI/moip/imagem/boleto/p.png';
|
144 |
+
$image_b = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_SKIN).'O2TI/moip/imagem/boleto/b.png';
|
145 |
+
$image_boleto = "<img src='{$image_p}' width='{$fino}' height='{$altura}' border='0'>
|
146 |
+
<img src='{$image_b}' width='{$fino}' height='{$altura}' border='0'>
|
147 |
+
<img src='{$image_p}' width='{$fino}' height='{$altura}' border='0'>
|
148 |
+
<img src='{$image_b}' width='{$fino}' height='{$altura}' border='0'>";
|
149 |
+
$texto = $valor ;
|
150 |
+
if((strlen($texto) % 2) <> 0){
|
151 |
+
$texto = "0" . $texto;
|
152 |
+
}
|
153 |
+
while (strlen($texto) > 0) {
|
154 |
+
$i = round($this->esquerda($texto,2));
|
155 |
+
$texto = $this->direita($texto,strlen($texto)-2);
|
156 |
+
$f = $barcodes[$i];
|
157 |
+
for($i=1;$i<11;$i+=2){
|
158 |
+
if(substr($f,($i-1),1) == "0"){
|
159 |
+
$f1 = $fino;
|
160 |
+
} else {
|
161 |
+
$f1 = $largo;
|
162 |
+
}
|
163 |
+
$image_boleto .= "<img src='{$image_p}' width='{$f1}' height='{$altura}' border='0'>";
|
164 |
+
if(substr($f,$i,1) == "0") {
|
165 |
+
$f2 = $fino;
|
166 |
+
}else{
|
167 |
+
$f2 = $largo;
|
168 |
+
}
|
169 |
+
$image_boleto .= "<img src='{$image_b}' width='{$f2}' height='{$altura}' border='0'>";
|
170 |
+
}
|
171 |
+
}
|
172 |
+
$image_boleto .= "<img src='{$image_p}' width='{$largo}' height='{$altura}' border='0'>
|
173 |
+
<img src='{$image_b}' width='{$fino}' height='{$altura}' border='0'>
|
174 |
+
<img src='{$image_p}' width='1' height='{$altura}' border='0'> ";
|
175 |
+
return $image_boleto;
|
176 |
+
}
|
177 |
+
|
178 |
+
private function esquerda($entra,$comp){
|
179 |
+
return substr($entra,0,$comp);
|
180 |
+
}
|
181 |
+
private function direita($entra,$comp){
|
182 |
+
return substr($entra,strlen($entra)-$comp,$comp);
|
183 |
+
}
|
184 |
+
}
|
app/code/local/O2TI/Moip/Model/.ftpquota
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
12 33136
|
app/code/local/O2TI/Moip/Model/Api.php
CHANGED
@@ -1,230 +1,207 @@
|
|
1 |
<?php
|
2 |
class O2TI_Moip_Model_Api {
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
|
|
8 |
private $conta_moip = null;
|
|
|
9 |
public function getContaMoip() {
|
10 |
return $this->conta_moip;
|
11 |
}
|
|
|
12 |
public function setContaMoip($conta_moip) {
|
13 |
$this->conta_moip = $conta_moip;
|
14 |
}
|
|
|
15 |
public function getAmbiente() {
|
16 |
return $this->ambiente;
|
17 |
}
|
|
|
18 |
public function setAmbiente($ambiente) {
|
19 |
$this->ambiente = $ambiente;
|
20 |
}
|
21 |
-
public function generateformapg($data, $pgto) {
|
22 |
-
$formapg[0] = $pgto['forma_pagamento'];
|
23 |
-
$formapg[1] = $pgto['debito_instituicao'];
|
24 |
-
$formapg[2] = $pgto['credito_instituicao'];
|
25 |
-
return $formapg;
|
26 |
-
}
|
27 |
-
public function generateforma($data, $pgto) {
|
28 |
-
$formapgto = "";
|
29 |
-
$standard = Mage::getModel('moip/standard');
|
30 |
-
if ($pgto['forma_pagamento'] == "DebitoBancario"):
|
31 |
-
$formapgto .= "\"Forma\": \"DebitoBancario\",\"Instituicao\":";
|
32 |
-
$formapgto .= "\"".$pgto['debito_instituicao']."\"";
|
33 |
-
endif;
|
34 |
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
$valorcompra = $valorcompra - $valorcompra * Mage::getStoreConfig('o2tiall/pagamento_avancado/boleto_desc3')/100;
|
146 |
-
endif;
|
147 |
-
endif;
|
148 |
-
endif;
|
149 |
-
if($this->getAmbiente() == "teste"):
|
150 |
-
$alterapedido = rand(999,9999);
|
151 |
-
else:
|
152 |
-
$alterapedido = "";
|
153 |
-
endif;
|
154 |
-
if(Mage::getStoreConfig('o2tiall/mktplace/comissionamento') == 1):
|
155 |
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
$comissionamento = "<Comissoes>
|
174 |
-
<Comissionamento>
|
175 |
-
<Razao>Pagamento do pedido #".$vcmeto." a ".$pgto['apelido']."</Razao>
|
176 |
-
<Comissionado>
|
177 |
-
<LoginMoIP>".Mage::getStoreConfig('o2tiall/mktplace/logincomissionamento')."</LoginMoIP>
|
178 |
-
</Comissionado>
|
179 |
|
180 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
181 |
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
$Complemento = utf8_encode($data['pagador_complemento']);
|
190 |
-
$Bairro = utf8_encode($data['pagador_bairro']);
|
191 |
-
$Cidade = utf8_encode($data['pagador_cidade']);
|
192 |
-
$validacao_nasp = $standard->getConfigData('validador_retorno');
|
193 |
-
$xml = "<EnviarInstrucao>
|
194 |
-
<InstrucaoUnica TipoValidacao=\"Transparente\">
|
195 |
-
<Razao>Pagamento do pedido #".$data['id_transacao']." a ". $pgto['apelido'] ."</Razao>
|
196 |
-
<Recebedor>
|
197 |
-
<LoginMoIP>".$pgto['conta_moip']."</LoginMoIP>
|
198 |
-
<Apelido>".$pgto['apelido']."</Apelido>
|
199 |
-
</Recebedor>
|
200 |
-
".$comissionamento."
|
201 |
-
".$xmlvcmeto."
|
202 |
-
<Valores>
|
203 |
-
<Valor Moeda=\"BRL\">".$valorcompra."</Valor>
|
204 |
-
</Valores>
|
205 |
-
<IdProprio>".$alterapedido."".$pgto['conta_moip']."".$data['id_transacao']."</IdProprio>
|
206 |
-
<Pagador>
|
207 |
-
<Nome>".$data['pagador_nome']."</Nome>
|
208 |
-
<Email>".$data['pagador_email']."</Email>
|
209 |
-
<IdPagador>".$data['pagador_email']."</IdPagador>
|
210 |
-
<EnderecoCobranca>
|
211 |
-
<Logradouro>".$data['pagador_logradouro']."</Logradouro>
|
212 |
-
<Numero>0".$data['pagador_complemento']."</Numero>
|
213 |
-
<Complemento>".$data['pagador_complemento']."</Complemento>
|
214 |
-
<Bairro>-".$data['pagador_bairro']."</Bairro>
|
215 |
-
<Cidade>".$data['pagador_cidade']."</Cidade>
|
216 |
-
<Estado>".$data['pagador_estado']."</Estado>
|
217 |
-
<Pais>BRA</Pais>
|
218 |
-
<CEP>".$data['pagador_cep']."</CEP>
|
219 |
-
<TelefoneFixo>".$data['pagador_telefone']."</TelefoneFixo>
|
220 |
-
</EnderecoCobranca>
|
221 |
-
</Pagador>
|
222 |
-
<Parcelamentos>".$parcelamento2."".$parcelamento1."</Parcelamentos>
|
223 |
-
<URLNotificacao>".$urldosite."index.php/Moip/standard/success/validacao/".$validacao_nasp."/</URLNotificacao>
|
224 |
-
</InstrucaoUnica>
|
225 |
-
</EnviarInstrucao>
|
226 |
-
";
|
227 |
-
return utf8_encode($xml);
|
228 |
}
|
229 |
|
230 |
public function getParcelamento($valor) {
|
@@ -247,167 +224,69 @@ class O2TI_Moip_Model_Api {
|
|
247 |
}
|
248 |
return $result;
|
249 |
}
|
250 |
-
|
251 |
-
public function getToken($xml) {
|
252 |
-
|
253 |
-
if ($this->getAmbiente() == "teste") {
|
254 |
-
$url = "https://desenvolvedor.moip.com.br/sandbox/ws/alpha/EnviarInstrucao/Unica";
|
255 |
-
$header = "Authorization: Basic " . base64_encode(O2TI_Moip_Model_Api::TOKEN_TEST . ":" . O2TI_Moip_Model_Api::KEY_TEST);
|
256 |
-
}
|
257 |
-
else {
|
258 |
-
$url = "https://www.moip.com.br/ws/alpha/EnviarInstrucao/Unica";
|
259 |
-
$header = "Authorization: Basic " . base64_encode(O2TI_Moip_Model_Api::TOKEN_PROD . ":" . O2TI_Moip_Model_Api::KEY_PROD);
|
260 |
-
}
|
261 |
-
$httpClient = new Zend_Http_Client($url);
|
262 |
-
$httpClient->setHeaders($header);
|
263 |
-
$httpClient->setRawData($xml);
|
264 |
-
$responseMoIP = $httpClient->request('POST');
|
265 |
-
$res = simplexml_load_string($responseMoIP->getBody());
|
266 |
-
Mage::log($res, null, 'O2TI_Moip.log', true);
|
267 |
-
Mage::log($xml, null, 'O2TI_Moip.log', true);
|
268 |
-
$pgdireto_status = "";
|
269 |
-
$pgdireto_mensagem = "";
|
270 |
-
$status = "";
|
271 |
-
$moipToken = "";
|
272 |
-
$pgdireto_codigoretorno = "";
|
273 |
-
$erro = "";
|
274 |
-
if ($res) {
|
275 |
-
if($res->Resposta->Erro)
|
276 |
-
$erro = $res->Resposta->Erro;
|
277 |
-
foreach ($res->children() as $child) {
|
278 |
-
foreach ($child as $c) {
|
279 |
-
if ($c->getName() == 'Token')
|
280 |
-
$moipToken = $c;
|
281 |
-
|
282 |
-
if ($c->getName() == "Status")
|
283 |
-
$status = $c;
|
284 |
-
|
285 |
-
foreach ($c as $pgdireto) {
|
286 |
-
if ($pgdireto->getName() == "Status")
|
287 |
-
$pgdireto_status = $pgdireto;
|
288 |
|
289 |
-
|
290 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
291 |
|
292 |
-
|
293 |
-
|
294 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
295 |
}
|
296 |
}
|
297 |
}
|
298 |
-
|
299 |
-
$result = array();
|
300 |
-
$result['erro'] = $erro;
|
301 |
-
|
302 |
-
|
303 |
-
if ($status == "Sucesso") {
|
304 |
-
$result['status'] = $status;
|
305 |
-
$result['token'] = $moipToken;
|
306 |
-
$result['pgdireto_status'] = $pgdireto_status;
|
307 |
-
$result['pgdireto_mensagem'] = $pgdireto_mensagem;
|
308 |
-
$result['pgdireto_codigoretorno'] = $pgdireto_codigoretorno;
|
309 |
-
|
310 |
-
}
|
311 |
-
else {
|
312 |
-
$result['status'] = $status;
|
313 |
-
$result['token'] = "";
|
314 |
-
$result['pgdireto_status'] = "";
|
315 |
-
$result['pgdireto_mensagem'] = "";
|
316 |
-
$result['pgdireto_codigoretorno'] = "";
|
317 |
-
}
|
318 |
return $result;
|
319 |
}
|
320 |
-
public function generateUrl($token) {
|
321 |
-
if ($this->getAmbiente() == "teste")
|
322 |
-
$url = $token;
|
323 |
-
else
|
324 |
-
$url = $token;
|
325 |
-
return $url;
|
326 |
-
}
|
327 |
|
328 |
-
public function generatemeip($formapgto) {
|
329 |
-
$meiopg2 = $formapgto;
|
330 |
-
return $meiopg2 ;
|
331 |
-
}
|
332 |
-
|
333 |
-
public function generatemeiopago($formapg) {
|
334 |
-
$standard = Mage::getSingleton('moip/standard');
|
335 |
-
$vcmentoboleto = $standard->getConfigData('vcmentoboleto');
|
336 |
-
$vcmeto = date('c', strtotime("+".$vcmentoboleto." days"));
|
337 |
-
$meiopgpg['forma_pagamento'] = $formapg[0];
|
338 |
-
$meiopgpg['debito_instituicao'] = $formapg[1];
|
339 |
-
$meiopgpg['credito_instituicao'] = $formapg[2];
|
340 |
-
$meiopgpg['timevencimentoboleto'] = $vcmeto;
|
341 |
-
return $meiopgpg;
|
342 |
-
}
|
343 |
-
public function getJurosComposto($valor, $juros, $parcelasR) {
|
344 |
-
$parc1 = "";
|
345 |
-
$parc = "";
|
346 |
-
$juros = $juros/100;
|
347 |
-
$valParcela = $valor * pow((1 + $juros), $parcelasR);
|
348 |
-
$valParcela = $valParcela/$parcelasR;
|
349 |
-
if($juros<=0 || empty($juros)):
|
350 |
-
$valor = $valor;
|
351 |
-
else:
|
352 |
-
$valor = (($valor/100)*$juros)+$valor;
|
353 |
-
endif;
|
354 |
-
$j ='';
|
355 |
-
if($valor >= 5){
|
356 |
-
$splitss = (int) ($valor/5);
|
357 |
-
}
|
358 |
-
if($splitss<=12):
|
359 |
-
$div = $splitss;
|
360 |
-
else:
|
361 |
-
$div = 12;
|
362 |
-
endif;
|
363 |
-
if($valor<=5):
|
364 |
-
$div = 1;
|
365 |
-
endif;
|
366 |
-
$standard = Mage::getModel('moip/standard');
|
367 |
-
$nummaxparcelamax = $standard->getConfigData('nummaxparcelamax');
|
368 |
-
$valorminimo = $standard->getConfigData('valorminimoparcela');
|
369 |
-
$parc1 .= '<ValorDaParcela Total="'.number_format($valor, 2).'" Juros="0" Valor="'.number_format($valor, 2).'">1</ValorDaParcela>';
|
370 |
-
for($j=2; $j<=$parcelasR;$j++) {
|
371 |
-
$cf = pow((1 + $juros), $j);
|
372 |
-
$cf = (1 / $cf);
|
373 |
-
$cf = (1 - $cf);
|
374 |
-
if($juros > 0){
|
375 |
-
$cf = ($juros / $cf);
|
376 |
-
}
|
377 |
-
else {
|
378 |
-
$cf = 1;
|
379 |
-
}
|
380 |
-
$parcelas = ($valor*$cf);
|
381 |
-
$valors = $valor;
|
382 |
-
if ($juros != 0 && $parcelas >= $valorminimo && $j <= $nummaxparcelamax ):
|
383 |
-
$parc .= '<ValorDaParcela Total="'.number_format(($parcelas * $j), 2).'" Juros="'.($juros * 100).'" Valor="'.number_format($parcelas, 2).'">'.$j.'</ValorDaParcela>';
|
384 |
-
endif;
|
385 |
-
|
386 |
-
if ($juros == 0 && $j <= $parcelasR && ($valor/$j) >= $valorminimo ):
|
387 |
-
$parc .= '<ValorDaParcela Total="'.number_format($valor, 2).'" Juros="0" Valor="'.number_format(($valor/$j), 2).'">'.$j.'</ValorDaParcela>';
|
388 |
-
endif;
|
389 |
-
}
|
390 |
-
$responseMoIP = '<ns1:ChecarValoresParcelamentoResponse xmlns:ns1="http://www.moip.com.br/ws/alpha/">
|
391 |
-
<Resposta>
|
392 |
-
'.$parc1.'
|
393 |
-
'.$parc.'
|
394 |
-
</Resposta>
|
395 |
-
</ns1:ChecarValoresParcelamentoResponse>';
|
396 |
-
$res = simplexml_load_string($responseMoIP);
|
397 |
-
$result = array();
|
398 |
-
$i = 1;
|
399 |
-
foreach ($res as $resposta) {
|
400 |
-
foreach ($resposta as $data) {
|
401 |
-
if ($data->getName() == "ValorDaParcela") {
|
402 |
-
$result[$i]['total'] = $data->attributes()->Total;
|
403 |
-
$result[$i]['valor'] = $data->attributes()->Valor;
|
404 |
-
$result[$i]['juros'] = $data->attributes()->Juros;
|
405 |
-
$i++;
|
406 |
-
}
|
407 |
-
}
|
408 |
-
}
|
409 |
-
return $result;
|
410 |
-
}
|
411 |
-
|
412 |
}
|
413 |
-
|
1 |
<?php
|
2 |
class O2TI_Moip_Model_Api {
|
3 |
+
|
4 |
+
const TOKEN_TEST = "3UNGHOJCLVXZVOYF85JGILKALZSROU2O";
|
5 |
+
const KEY_TEST = "VX2MOP4AEXFQYHBYIWT0GINNVXFZO9TJCKJ6AWDR";
|
6 |
+
const TOKEN_PROD = "FEE5P78NA6RZAHBNH3GLMWZFWRE7IU3D";
|
7 |
+
const KEY_PROD = "Y8DIATTADUNVOSXKDN0JVDAQ1KU7UPJHEGPM7SBA";
|
8 |
+
|
9 |
private $conta_moip = null;
|
10 |
+
|
11 |
public function getContaMoip() {
|
12 |
return $this->conta_moip;
|
13 |
}
|
14 |
+
|
15 |
public function setContaMoip($conta_moip) {
|
16 |
$this->conta_moip = $conta_moip;
|
17 |
}
|
18 |
+
|
19 |
public function getAmbiente() {
|
20 |
return $this->ambiente;
|
21 |
}
|
22 |
+
|
23 |
public function setAmbiente($ambiente) {
|
24 |
$this->ambiente = $ambiente;
|
25 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
|
27 |
+
public function generateXml($data, $rootNodeName = 'ENVIARINSTRUCAO', $xml = null) {
|
28 |
+
|
29 |
+
if (ini_get('zend.ze1_compatibility_mode') == 1)
|
30 |
+
{
|
31 |
+
ini_set ('zend.ze1_compatibility_mode', 0);
|
32 |
+
}
|
33 |
+
// turn off compatibility mode as simple xml throws a wobbly if you don't.
|
34 |
+
|
35 |
+
if ($xml == null) {
|
36 |
+
$xml = new SimpleXmlElement('<?xml version="1.0" encoding="utf-8" ?><EnviarInstrucao></EnviarInstrucao>');
|
37 |
+
}
|
38 |
+
|
39 |
+
// loop through the data passed in.
|
40 |
+
foreach ($data as $key => $value) {
|
41 |
+
|
42 |
+
if (is_array($value)) {
|
43 |
+
$node = $xml->addChild($key);
|
44 |
+
$this->generateXml($value, $rootNodeName, $node);
|
45 |
+
} else {
|
46 |
+
$value = $this->decode($value);
|
47 |
+
$xml->addChild($key, $value);
|
48 |
+
}
|
49 |
+
}
|
50 |
+
$return = $this->convert_encoding($xml->asXML(), true);
|
51 |
+
|
52 |
+
return str_ireplace("\n", "", $return);
|
53 |
+
}
|
54 |
+
|
55 |
+
private function convert_encoding($text, $post = false) {
|
56 |
+
if ($post) {
|
57 |
+
return mb_convert_encoding($text, 'UTF-8');
|
58 |
+
} else {
|
59 |
+
/* No need to convert if its already in utf-8 */
|
60 |
+
if ($this->encoding === 'UTF-8') {
|
61 |
+
return $text;
|
62 |
+
}
|
63 |
+
$texto = mb_convert_encoding($text, $this->encoding, 'UTF-8');
|
64 |
+
return strtoupper($texto);
|
65 |
+
}
|
66 |
+
}
|
67 |
+
|
68 |
+
public function decode($string) {
|
69 |
+
|
70 |
+
$find = array('Á', 'á', 'Â', 'â', 'À', 'à', 'Å', 'å', 'Ã', 'ã', 'Ä', 'ä', 'Æ', 'æ', 'É', 'é', 'Ê', 'ê', 'È', 'è', 'Ë', 'ë', 'Ð', 'ð', 'Í', 'í', 'Î', 'î', 'Ì', 'ì', 'Ï', 'ï', 'Ó', 'ó', 'Ô', 'ô', 'Ç', 'Ò', 'ç', 'ò', 'Ø', 'Ñ', 'ø', 'ñ', 'Õ', 'õ', 'Ý', 'Ö', 'ý', 'ö', '"', 'Ú', '<', 'ú', '>', 'Û', '&', 'û', 'Ù', '®', 'ù', '©', 'Ó', 'Ü', 'Þ', 'ó', 'ü', 'þ', 'Ô', 'ß');
|
71 |
+
$replace = array('Á', 'á', 'Â', 'â', 'À', 'à', 'Å', 'å', 'Ã', 'ã', 'Ä', 'ä', 'Æ', 'æ', 'É', 'é', 'Ê', 'ê', 'È', 'è', 'Ë', 'ë', 'Ð', 'ð', 'Í', 'í', 'Î', 'î', 'Ì', 'ì', 'Ï', 'ï', 'Ó', 'ó', 'Ô', 'ô', 'Ç', 'Ò', 'ç', 'ò', 'Ø', 'Ñ', 'ø', 'ñ', 'Õ', 'õ', 'Ý', 'Ö', 'ý', 'ö', '"', 'Ú', '<', 'ú', '>', 'Û', '&', 'û', 'Ù', '®', 'ù', '©', 'Ó', 'Ü', 'Þ', 'ó', 'ü', 'þ', 'Ô', 'ß');
|
72 |
+
|
73 |
+
$decodedstring = str_replace($find, $replace, $string);
|
74 |
+
return $decodedstring;
|
75 |
+
}
|
76 |
+
|
77 |
+
public function generatePedido($data, $pgto) {
|
78 |
+
|
79 |
+
$standard = Mage::getSingleton('moip/standard');
|
80 |
+
$parcelamento = $standard->getInfoParcelamento();
|
81 |
+
$meio = $pgto["forma_pagamento"];
|
82 |
+
$vcmentoboleto = $pgto["vcmentoboleto"];
|
83 |
+
$forma_pgto = "";
|
84 |
+
$validacao_nasp = $standard->getConfigData('validador_retorno');
|
85 |
+
$url_retorno = Mage::getBaseUrl()."/Moip/standard/success/validacao/".$validacao_nasp."/";
|
86 |
+
$valorcompra = $data['valor'];
|
87 |
+
$vcmentoboleto = $standard->getConfigData('vcmentoboleto');
|
88 |
+
$vcmento = date('c', strtotime("+" . $vcmentoboleto . " days"));
|
89 |
+
$forma_boleto = array('DiasExpiracao' => $vcmento);
|
90 |
+
if($pgto['tipoderecebimento'] =="0"):
|
91 |
+
$tipoderecebimento = "Parcelado";
|
92 |
+
else:
|
93 |
+
$tipoderecebimento = "";
|
94 |
+
endif;
|
95 |
+
$parcelamento = $standard->getInfoParcelamento();
|
96 |
+
$max_parcelas = $parcelamento['ate1'];
|
97 |
+
$min_parcelas = $parcelamento['de1'];
|
98 |
+
$juros = $parcelamento['juros1'];
|
99 |
+
if($max_parcelas == 12){
|
100 |
+
$pacelamento_xml = array(
|
101 |
+
'Parcelamento' => array(
|
102 |
+
'MinimoParcelas' => $min_parcelas,
|
103 |
+
'MaximoParcelas' => $max_parcelas,
|
104 |
+
'Juros' => $juros,
|
105 |
+
),
|
106 |
+
);
|
107 |
+
} else{
|
108 |
+
$pacelamento_xml = array(
|
109 |
+
'Parcelamento' => array(
|
110 |
+
'MinimoParcelas' => $min_parcelas,
|
111 |
+
'MaximoParcelas' => $max_parcelas,
|
112 |
+
'Juros' => $juros,
|
113 |
+
),
|
114 |
+
'Parcelamento' => array(
|
115 |
+
'MinimoParcelas' => $max_parcelas+1,
|
116 |
+
'MaximoParcelas' => '12',
|
117 |
+
'Juros' => '1.99',
|
118 |
+
),
|
119 |
+
);
|
120 |
+
}
|
121 |
+
if ($meio == "BoletoBancario"):
|
122 |
+
if (Mage::getStoreConfig('o2tiall/pagamento_avancado/pagamento_boleto')):
|
123 |
+
if ($valorcompra >= Mage::getStoreConfig('o2tiall/pagamento_avancado/boleto_valor')):
|
124 |
+
$valorcompra = $data['valor'];
|
125 |
+
$valorcompra = $valorcompra - $valorcompra * Mage::getStoreConfig('o2tiall/pagamento_avancado/boleto_desc') / 100;
|
126 |
+
endif;
|
127 |
+
if (Mage::getStoreConfig('o2tiall/pagamento_avancado/boleto_valor2') != "" && $valorcompra >= Mage::getStoreConfig('o2tiall/pagamento_avancado/boleto_valor2') && $valorcompra < Mage::getStoreConfig('o2tiall/pagamento_avancado/boleto_valor3')):
|
128 |
+
$valorcompra = $data['valor'];
|
129 |
+
$valorcompra = $valorcompra - $valorcompra * Mage::getStoreConfig('o2tiall/pagamento_avancado/boleto_desc2') / 100;
|
130 |
+
endif;
|
131 |
+
if ($valorcompra >= Mage::getStoreConfig('o2tiall/pagamento_avancado/boleto_valor3')):
|
132 |
+
$valorcompra = $data['valor'];
|
133 |
+
$valorcompra = $valorcompra - $valorcompra * Mage::getStoreConfig('o2tiall/pagamento_avancado/boleto_desc3') / 100;
|
134 |
+
endif;
|
135 |
+
endif;
|
136 |
+
endif;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
137 |
|
138 |
+
if ($pgto['forma_pagamento'] == "DebitoBancario"):
|
139 |
+
$valorcompra = $data['valor'];
|
140 |
+
if (Mage::getStoreConfig('o2tiall/pagamento_avancado/transf_desc')):
|
141 |
+
if ($valorcompra >= Mage::getStoreConfig('o2tiall/pagamento_avancado/boleto_valor')):
|
142 |
+
$valorcompra = $data['valor'];
|
143 |
+
$valorcompra = $valorcompra - $valorcompra * Mage::getStoreConfig('o2tiall/pagamento_avancado/boleto_desc') / 100;
|
144 |
+
endif;
|
145 |
+
if (Mage::getStoreConfig('o2tiall/pagamento_avancado/boleto_valor2') != "" && $valorcompra >= Mage::getStoreConfig('o2tiall/pagamento_avancado/boleto_valor2') && $valorcompra < Mage::getStoreConfig('o2tiall/pagamento_avancado/boleto_valor3')):
|
146 |
+
$valorcompra = $data['valor'];
|
147 |
+
$valorcompra = $valorcompra - $valorcompra * Mage::getStoreConfig('o2tiall/pagamento_avancado/boleto_desc2') / 100;
|
148 |
+
endif;
|
149 |
+
if ($valorcompra >= Mage::getStoreConfig('o2tiall/pagamento_avancado/boleto_valor3')):
|
150 |
+
$valorcompra = $data['valor'];
|
151 |
+
$valorcompra = $valorcompra - $valorcompra * Mage::getStoreConfig('o2tiall/pagamento_avancado/boleto_desc3') / 100;
|
152 |
+
endif;
|
153 |
+
endif;
|
154 |
+
endif;
|
|
|
|
|
|
|
|
|
|
|
|
|
155 |
|
156 |
+
if ($this->getAmbiente() == "teste")
|
157 |
+
$alterapedido = rand(999999, 99999999);
|
158 |
+
else
|
159 |
+
$alterapedido = "";
|
160 |
+
$recebedor = array(
|
161 |
+
'LoginMoIP' => $pgto['conta_moip'],
|
162 |
+
'Apelido' => $pgto['apelido'],
|
163 |
+
);
|
164 |
+
$addresses = array(
|
165 |
+
"Logradouro" => $data['pagador_logradouro'],
|
166 |
+
"Numero" => $data['pagador_complemento'],
|
167 |
+
"Complemento" => $data['pagador_complemento'],
|
168 |
+
"Bairro" => $data['pagador_bairro'],
|
169 |
+
"Cidade" => $data['pagador_cidade'],
|
170 |
+
"Estado" => 'SP',
|
171 |
+
"Pais" => 'BRA',
|
172 |
+
"CEP" => $data['pagador_cep'],
|
173 |
+
"TelefoneFixo" => $data['pagador_ddd'] . $data['pagador_telefone']
|
174 |
+
);
|
175 |
+
$dados = array(
|
176 |
+
"Razao" => "Pagamento do pedido #" . $data['id_transacao'],
|
177 |
+
"Valores" => array('Valor' => number_format($valorcompra, 2, '.', '')),
|
178 |
+
"Recebedor" => $recebedor,
|
179 |
+
"IdProprio" => $alterapedido . $data['id_transacao'],
|
180 |
+
"Pagador" => array(
|
181 |
+
"Nome" => $data['pagador_nome'],
|
182 |
+
"Email" => $data['pagador_email'],
|
183 |
+
"IdPagador" => $data['pagador_email'],
|
184 |
+
"EnderecoCobranca" => $addresses,
|
185 |
+
),
|
186 |
+
"Parcelamentos" => $pacelamento_xml,
|
187 |
+
"Boleto" => $forma_boleto,
|
188 |
+
"URLNotificacao" => $url_retorno,
|
189 |
+
#"mensagem" => $standard->getListaProdutos(),
|
190 |
+
);
|
191 |
+
$json = array('InstrucaoUnica' => $dados);
|
192 |
+
$xml = $this->generateXml($json);
|
193 |
+
return $xml;
|
194 |
+
}
|
195 |
+
|
196 |
+
|
197 |
|
198 |
+
|
199 |
+
public function generateUrl($token) {
|
200 |
+
if ($this->getAmbiente() == "teste")
|
201 |
+
$url = $token;
|
202 |
+
else
|
203 |
+
$url = $token;
|
204 |
+
return $url;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
205 |
}
|
206 |
|
207 |
public function getParcelamento($valor) {
|
224 |
}
|
225 |
return $result;
|
226 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
227 |
|
228 |
+
public function getJurosComposto($valor, $juros, $parcelasR) {
|
229 |
+
$parc1 = "";
|
230 |
+
$parc = "";
|
231 |
+
$juros = $juros / 100;
|
232 |
+
$valParcela = $valor * pow((1 + $juros), $parcelasR);
|
233 |
+
$valParcela = $valParcela / $parcelasR;
|
234 |
+
if ($juros <= 0 || empty($juros)):
|
235 |
+
$valor = $valor;
|
236 |
+
else:
|
237 |
+
$valor = (($valor / 100) * $juros) + $valor;
|
238 |
+
endif;
|
239 |
+
$j = '';
|
240 |
+
$splitss = (int) ($valor / 5);
|
241 |
+
if ($splitss <= 12):
|
242 |
+
$div = $splitss;
|
243 |
+
else:
|
244 |
+
$div = 12;
|
245 |
+
endif;
|
246 |
+
if ($valor <= 5):
|
247 |
+
$div = 1;
|
248 |
+
endif;
|
249 |
+
$standard = Mage::getModel('moip/standard');
|
250 |
+
$nummaxparcelamax = $standard->getConfigData('nummaxparcelamax');
|
251 |
+
$valorminimo = $standard->getConfigData('valorminimoparcela');
|
252 |
+
$parc1 .= '<ValorDaParcela Total="' . number_format($valor, 2) . '" Juros="0" Valor="' . number_format($valor, 2) . '">1</ValorDaParcela>';
|
253 |
+
for ($j = 2; $j <= $parcelasR; $j++) {
|
254 |
+
$cf = pow((1 + $juros), $j);
|
255 |
+
$cf = (1 / $cf);
|
256 |
+
$cf = (1 - $cf);
|
257 |
+
if($cf > 0)
|
258 |
+
$cf = ($juros / $cf);
|
259 |
+
$parcelas = ($valor * $cf);
|
260 |
+
$parcelas = $parcelas;
|
261 |
+
$valors = $valor;
|
262 |
+
if ($juros != 0 && $parcelas >= $valorminimo && $j <= $nummaxparcelamax):
|
263 |
+
$parc .= '<ValorDaParcela Total="' . number_format(($parcelas * $j), 2) . '" Juros="' . ($juros * 100) . '" Valor="' . number_format($parcelas, 2) . '">' . $j . '</ValorDaParcela>';
|
264 |
+
endif;
|
265 |
|
266 |
+
if ($juros == 0 && $j <= $parcelasR && ($valor / $j) >= $valorminimo):
|
267 |
+
$parc .= '<ValorDaParcela Total="' . number_format($valor, 2) . '" Juros="0" Valor="' . number_format(($valor / $j), 2) . '">' . $j . '</ValorDaParcela>';
|
268 |
+
endif;
|
269 |
+
}
|
270 |
+
$responseMoIP = '<ns1:ChecarValoresParcelamentoResponse xmlns:ns1="http://www.moip.com.br/ws/alpha/">
|
271 |
+
<Resposta>
|
272 |
+
' . $parc1 . '
|
273 |
+
' . $parc . '
|
274 |
+
</Resposta>
|
275 |
+
</ns1:ChecarValoresParcelamentoResponse>';
|
276 |
+
$res = simplexml_load_string($responseMoIP);
|
277 |
+
$result = array();
|
278 |
+
$i = 1;
|
279 |
+
foreach ($res as $resposta) {
|
280 |
+
foreach ($resposta as $data) {
|
281 |
+
if ($data->getName() == "ValorDaParcela") {
|
282 |
+
$result[$i]['total'] = $data->attributes()->Total;
|
283 |
+
$result[$i]['valor'] = $data->attributes()->Valor;
|
284 |
+
$result[$i]['juros'] = $data->attributes()->Juros;
|
285 |
+
$i++;
|
286 |
}
|
287 |
}
|
288 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
289 |
return $result;
|
290 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
291 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
292 |
}
|
|
app/code/local/O2TI/Moip/Model/Mysql4/Collection.php
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class O2TI_Moip_Model_Mysql4_Write_Collection extends Mage_Core_Model_Mysql4_Collection_Abstract
|
3 |
+
{
|
4 |
+
public function _construct()
|
5 |
+
{
|
6 |
+
parent::_construct();
|
7 |
+
$this->_init('moip/write');
|
8 |
+
}
|
9 |
+
}
|
app/code/local/O2TI/Moip/Model/Mysql4/Write.php
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class O2TI_Moip_Model_Mysql4_Write extends Mage_Core_Model_Mysql4_Abstract
|
3 |
+
{
|
4 |
+
public function _construct()
|
5 |
+
{
|
6 |
+
$this->_init('moip/write', 'order_id');
|
7 |
+
}
|
8 |
+
}
|
9 |
+
?>
|
app/code/local/O2TI/Moip/Model/Standard.php
CHANGED
@@ -63,13 +63,13 @@ class O2TI_Moip_Model_Standard extends Mage_Payment_Model_Method_Abstract {
|
|
63 |
}
|
64 |
return $this;
|
65 |
}
|
|
|
66 |
public function prepare() {
|
67 |
$info = $this->getInfoInstance();
|
68 |
-
|
69 |
$pgtoArray = array();
|
70 |
$pgtoArray['forma_pagamento'] = $info->getFormaPagamento();
|
71 |
$pgtoArray['debito_instituicao'] = $info->getDebitoInstituicao();
|
72 |
-
$pgtoArray['
|
73 |
$pgtoArray['tipoderecebimento'] = $this->getConfigData('tipoderecebimento');
|
74 |
$pgtoArray['parcelamento'] = $this->getConfigData('parcelamento');
|
75 |
$pgtoArray['nummaxparcelamax'] = $this->getConfigData('nummaxparcelamax');
|
@@ -86,9 +86,11 @@ class O2TI_Moip_Model_Standard extends Mage_Payment_Model_Method_Abstract {
|
|
86 |
$pgtoArray['credito_codigo_seguranca'] = $info->getCreditoCodigoSeguranca();
|
87 |
$pgtoArray['credito_parcelamento'] = $info->getCreditoParcelamento();
|
88 |
$pgtoArray['credito_portador_nome'] = $info->getCreditoPortadorNome();
|
89 |
-
$
|
90 |
-
$pgtoArray['
|
91 |
-
$pgtoArray['
|
|
|
|
|
92 |
$api = Mage::getModel('moip/api');
|
93 |
$api->setAmbiente($this->getConfigData('ambiente'));
|
94 |
$session = Mage::getSingleton('checkout/session');
|
@@ -99,11 +101,7 @@ class O2TI_Moip_Model_Standard extends Mage_Payment_Model_Method_Abstract {
|
|
99 |
$this->prepare();
|
100 |
return Mage::getUrl('moip/standard/redirect', array('_secure' => true));
|
101 |
}
|
102 |
-
|
103 |
-
$formas = $this->getConfigData('formas_pagamento');
|
104 |
-
$formas = explode(",", $formas);
|
105 |
-
return $formas;
|
106 |
-
}
|
107 |
public function getStandardCheckoutFormFields() {
|
108 |
if ($this->getQuote()->getIsVirtual()) {
|
109 |
$a = $this->getQuote()->getBillingAddress();
|
@@ -123,9 +121,11 @@ class O2TI_Moip_Model_Standard extends Mage_Payment_Model_Method_Abstract {
|
|
123 |
$totalArr = $a->getTotals();
|
124 |
$cep = substr(preg_replace("/[^0-9]/", "", $a->getPostcode()) . '00000000', 0, 8);
|
125 |
$amount = $a->getGrandTotal();
|
|
|
126 |
$valor = $amount;
|
127 |
-
$dob = Mage::app()->getLocale()->date($this->getQuote()->getCustomerDob(), null, null, false)->toString('
|
128 |
$taxvat = $this->getQuote()->getCustomerTaxvat();
|
|
|
129 |
$website_id = Mage::app()->getWebsite()->getId();
|
130 |
$website_name = Mage::app()->getWebsite()->getName();
|
131 |
$store_name = Mage::app()->getStore()->getName();
|
@@ -134,12 +134,13 @@ class O2TI_Moip_Model_Standard extends Mage_Payment_Model_Method_Abstract {
|
|
134 |
'valor' => $valor,
|
135 |
'nome' => 'Pagamento a ' . $website_name,
|
136 |
'descricao' => $this->getListaProdutos(),
|
137 |
-
'
|
138 |
'peso_compra' => $this->getPesoProdutosPedido(),
|
139 |
'pagador_nome' => $a->getFirstname() . ' ' . $a->getLastname(),
|
140 |
//'pagador_email' => Mage::getSingleton('customer/session')->getCustomer()->getEmail(),// this is original code of Moip
|
141 |
-
'pagador_email' =>
|
142 |
-
'
|
|
|
143 |
'pagador_logradouro' => $a->getStreet(1),
|
144 |
'pagador_numero' => $this->getNumEndereco($a->getStreet(1)),
|
145 |
'pagador_complemento' => $a->getStreet(2),
|
@@ -176,6 +177,28 @@ class O2TI_Moip_Model_Standard extends Mage_Payment_Model_Method_Abstract {
|
|
176 |
$config['ate3'] = $max;
|
177 |
return $config;
|
178 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
179 |
private function getNumEndereco($endereco) {
|
180 |
$numEndereco = '';
|
181 |
|
@@ -219,30 +242,7 @@ class O2TI_Moip_Model_Standard extends Mage_Payment_Model_Method_Abstract {
|
|
219 |
|
220 |
return $retorno;
|
221 |
}
|
222 |
-
|
223 |
-
$items = $this->getQuote()->getAllVisibleItems();
|
224 |
-
$lista = array();
|
225 |
-
|
226 |
-
foreach ($items as $item) {
|
227 |
-
$valor_item = ($item->getBaseCalculationPrice() - $item->getBaseDiscountAmount());
|
228 |
-
$valor_item = Mage::helper('core')->currency($valor_item, true, false);
|
229 |
-
|
230 |
-
$lista[] = $item->getName() . ' - ' . (int) $item->getQty() . ' - ' . $valor_item;
|
231 |
-
}
|
232 |
-
if ($this->getQuote()->getIsVirtual()) {
|
233 |
-
$a = $this->getQuote()->getBillingAddress();
|
234 |
-
$b = $this->getQuote()->getShippingAddress();
|
235 |
-
} else {
|
236 |
-
$a = $this->getQuote()->getShippingAddress();
|
237 |
-
$b = $this->getQuote()->getBillingAddress();
|
238 |
-
}
|
239 |
-
$totalArr = $a->getTotals();
|
240 |
-
if ($totalArr['shipping']) {
|
241 |
-
$valor_frete = $totalArr['shipping']->getValue();
|
242 |
-
$lista[] = 'Frete: R$ ' . number_format($valor_frete, 2, ",", ".");
|
243 |
-
}
|
244 |
-
return $lista;
|
245 |
-
}
|
246 |
function getPesoProdutosPedido() {
|
247 |
$items = $this->getQuote()->getAllVisibleItems();
|
248 |
if ($items) {
|
63 |
}
|
64 |
return $this;
|
65 |
}
|
66 |
+
|
67 |
public function prepare() {
|
68 |
$info = $this->getInfoInstance();
|
|
|
69 |
$pgtoArray = array();
|
70 |
$pgtoArray['forma_pagamento'] = $info->getFormaPagamento();
|
71 |
$pgtoArray['debito_instituicao'] = $info->getDebitoInstituicao();
|
72 |
+
$pgtoArray['vcmentoboleto'] = $this->getConfigData('vcmentoboleto');
|
73 |
$pgtoArray['tipoderecebimento'] = $this->getConfigData('tipoderecebimento');
|
74 |
$pgtoArray['parcelamento'] = $this->getConfigData('parcelamento');
|
75 |
$pgtoArray['nummaxparcelamax'] = $this->getConfigData('nummaxparcelamax');
|
86 |
$pgtoArray['credito_codigo_seguranca'] = $info->getCreditoCodigoSeguranca();
|
87 |
$pgtoArray['credito_parcelamento'] = $info->getCreditoParcelamento();
|
88 |
$pgtoArray['credito_portador_nome'] = $info->getCreditoPortadorNome();
|
89 |
+
$cpf = $info->getCreditoPortadorCpf();
|
90 |
+
$pgtoArray['credito_portador_cpf'] = preg_replace("/[^0-9]/", "", $cpf);
|
91 |
+
$pgtoArray['credito_portador_DDD'] = $this->getNumberOrDDD($info->getCreditoPortadorTelefone(), true);
|
92 |
+
$pgtoArray['credito_portador_telefone'] = $this->getNumberOrDDD($info->getCreditoPortadorTelefone());
|
93 |
+
$pgtoArray['credito_portador_nascimento'] = date('Y-m-d', strtotime($info->getCreditoPortadorNascimento()));
|
94 |
$api = Mage::getModel('moip/api');
|
95 |
$api->setAmbiente($this->getConfigData('ambiente'));
|
96 |
$session = Mage::getSingleton('checkout/session');
|
101 |
$this->prepare();
|
102 |
return Mage::getUrl('moip/standard/redirect', array('_secure' => true));
|
103 |
}
|
104 |
+
|
|
|
|
|
|
|
|
|
105 |
public function getStandardCheckoutFormFields() {
|
106 |
if ($this->getQuote()->getIsVirtual()) {
|
107 |
$a = $this->getQuote()->getBillingAddress();
|
121 |
$totalArr = $a->getTotals();
|
122 |
$cep = substr(preg_replace("/[^0-9]/", "", $a->getPostcode()) . '00000000', 0, 8);
|
123 |
$amount = $a->getGrandTotal();
|
124 |
+
$shipping = $a->getShippingAmount();
|
125 |
$valor = $amount;
|
126 |
+
$dob = Mage::app()->getLocale()->date($this->getQuote()->getCustomerDob(), null, null, false)->toString('Y-MM-dd');
|
127 |
$taxvat = $this->getQuote()->getCustomerTaxvat();
|
128 |
+
$taxvat = preg_replace("/[^0-9]/", "", $taxvat);
|
129 |
$website_id = Mage::app()->getWebsite()->getId();
|
130 |
$website_name = Mage::app()->getWebsite()->getName();
|
131 |
$store_name = Mage::app()->getStore()->getName();
|
134 |
'valor' => $valor,
|
135 |
'nome' => 'Pagamento a ' . $website_name,
|
136 |
'descricao' => $this->getListaProdutos(),
|
137 |
+
'shipping' => $shipping,
|
138 |
'peso_compra' => $this->getPesoProdutosPedido(),
|
139 |
'pagador_nome' => $a->getFirstname() . ' ' . $a->getLastname(),
|
140 |
//'pagador_email' => Mage::getSingleton('customer/session')->getCustomer()->getEmail(),// this is original code of Moip
|
141 |
+
'pagador_email' => $a->getEmail(),
|
142 |
+
'pagador_ddd' => $this->getNumberOrDDD($a->getTelephone(), true),
|
143 |
+
'pagador_telefone' => $this->getNumberOrDDD($a->getTelephone()),
|
144 |
'pagador_logradouro' => $a->getStreet(1),
|
145 |
'pagador_numero' => $this->getNumEndereco($a->getStreet(1)),
|
146 |
'pagador_complemento' => $a->getStreet(2),
|
177 |
$config['ate3'] = $max;
|
178 |
return $config;
|
179 |
}
|
180 |
+
function getListaProdutos() {
|
181 |
+
$lastOrderId = Mage::getSingleton('checkout/session')->getLastRealOrderId();
|
182 |
+
$orderId = Mage::getModel('sales/order')
|
183 |
+
->loadByIncrementId($lastOrderId)
|
184 |
+
->getEntityId();
|
185 |
+
$_order = Mage::getModel('sales/order')->load($orderId);
|
186 |
+
$items = $_order->getAllItems();
|
187 |
+
$itemcount=count($items);
|
188 |
+
$produtos=array();
|
189 |
+
|
190 |
+
foreach ($items as $itemId => $item)
|
191 |
+
{
|
192 |
+
$produtos[] = array (
|
193 |
+
'product' => $item->getName(),
|
194 |
+
'quantity' =>$item->getQtyToInvoice(),
|
195 |
+
'detail' => $item->getSku(),
|
196 |
+
'price' => number_format($item->getPrice(),2,'','')
|
197 |
+
);
|
198 |
+
}
|
199 |
+
|
200 |
+
return $produtos;
|
201 |
+
}
|
202 |
private function getNumEndereco($endereco) {
|
203 |
$numEndereco = '';
|
204 |
|
242 |
|
243 |
return $retorno;
|
244 |
}
|
245 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
246 |
function getPesoProdutosPedido() {
|
247 |
$items = $this->getQuote()->getAllVisibleItems();
|
248 |
if ($items) {
|
app/code/local/O2TI/Moip/Model/Write.php
ADDED
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
class O2TI_Moip_Model_Write extends Mage_Core_Model_Abstract
|
3 |
+
{
|
4 |
+
public function _construct()
|
5 |
+
{
|
6 |
+
$this->_init('moip/write');
|
7 |
+
}
|
8 |
+
}
|
app/code/local/O2TI/Moip/controllers/IndexController.php
CHANGED
@@ -1,83 +1,124 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
|
4 |
-
protected function
|
5 |
-
$this
|
|
|
|
|
6 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
|
8 |
-
|
9 |
-
echo "test";
|
10 |
-
$orderIds = $this -> getRequest() -> getPost('order_ids');
|
11 |
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
$counter++;
|
29 |
-
} catch (Exception $e) {
|
30 |
-
$order -> addStatusHistoryComment('Exception occurred during automaticallyInvoiceShipCompleteOrder action. Exception message: ' . $e -> getMessage(), false);
|
31 |
-
$order -> save();
|
32 |
-
$this->_getSession()->addError($this->__('Não foi possivel autorizados o pedido %s ', $currentOrderId));
|
33 |
}
|
|
|
34 |
}
|
35 |
-
if($done){
|
36 |
-
$this->_getSession()->addSuccess($this->__('%s pedidos autorizados com sucesso', $counter));
|
37 |
-
}
|
38 |
-
$this -> _redirect('adminhtml/sales_order/', array());
|
39 |
}
|
40 |
-
|
41 |
-
$
|
42 |
-
|
43 |
-
|
44 |
-
$
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
52 |
}
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
$status = "";
|
57 |
-
switch ($param) {
|
58 |
-
case 1:
|
59 |
-
$status = "Autorizado";
|
60 |
-
break;
|
61 |
-
case 2:
|
62 |
-
$status = "Iniciado";
|
63 |
-
break;
|
64 |
-
case 3:
|
65 |
-
$status = "Boleto Impresso";
|
66 |
-
break;
|
67 |
-
case 4:
|
68 |
-
$status = "Concluido";
|
69 |
-
break;
|
70 |
-
case 5:
|
71 |
-
$status = "Cancelado";
|
72 |
-
break;
|
73 |
-
case 6:
|
74 |
-
$status = "Em análise";
|
75 |
-
break;
|
76 |
-
case 7:
|
77 |
-
$status = "Estornado";
|
78 |
-
break;
|
79 |
-
}
|
80 |
-
return $status;
|
81 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
82 |
|
83 |
-
|
|
|
|
1 |
+
<?php
|
2 |
+
class O2TI_Moip_IndexController extends Mage_Core_Controller_Front_Action
|
3 |
+
{
|
4 |
+
protected function indexAction() {
|
5 |
+
$this->loadLayout();
|
6 |
+
$this->renderLayout();
|
7 |
+
return true;
|
8 |
}
|
9 |
+
public function NovaformaAction() {
|
10 |
+
if($this->getRequest()->getParams()){
|
11 |
+
$model = Mage::getModel('moip/write');
|
12 |
+
$api = Mage::getModel('moip/api');
|
13 |
+
$post = $this->getRequest()->getPost();
|
14 |
+
$model->load($post['order_id'], 'realorder_id');
|
15 |
+
$model->getDate();
|
16 |
+
$pgtoArray = array();
|
17 |
+
$pgtoArray['forma_pagamento'] = $post['forma_de_pagamento'];
|
18 |
+
$pgtoArray['credito_instituicao'] = $post['bandeira'];
|
19 |
+
$pgtoArray['credito_numero'] = $post['Numero'];
|
20 |
+
$pgtoArray['credito_expiracao_mes'] = $post['Expiracao_mes'];
|
21 |
+
$pgtoArray['credito_expiracao_ano'] = $post['Expiracao_ano'];
|
22 |
+
$pgtoArray['credito_codigo_seguranca'] = $post['CodigoSeguranca'];
|
23 |
+
$pgtoArray['credito_parcelamento'] = $post['parcelas'];
|
24 |
+
$pgtoArray['credito_portador_nome'] = $post['Portador'];
|
25 |
+
$pgtoArray["vcmentoboleto"] = "3";
|
26 |
+
$cpf = $post['CPF'];
|
27 |
+
$pgtoArray['credito_portador_cpf'] = preg_replace("/[^0-9]/", "", $cpf);
|
28 |
+
$pgtoArray['credito_portador_DDD'] = $this->getNumberOrDDD($post['Telefone'], true);
|
29 |
+
$pgtoArray['credito_portador_telefone'] = $this->getNumberOrDDD($post['Telefone']);
|
30 |
+
$pgtoArray['credito_portador_nascimento'] = date('Y-m-d', strtotime($post['DataNascimento']));
|
31 |
+
$model->setMeio_pg($post['forma_de_pagamento']);
|
32 |
+
if($post['forma_de_pagamento'] == "BoletoBancario"){
|
33 |
+
$model->setbrand_moip('Bradesco');
|
34 |
+
}
|
35 |
+
if ($post['forma_de_pagamento'] == "CartaoCredito") {
|
36 |
+
$model->setCreditcard_parc($post['parcelas']);
|
37 |
+
$model->setbrand_moip($post['bandeira']);
|
38 |
+
$model->setfirst6(substr($post['Numero'], 0, 6));
|
39 |
+
$model->setLast4(substr($post['Numero'], -4));
|
40 |
+
}
|
41 |
+
if($post['forma_de_pagamento'] == "DebitoBancario")
|
42 |
+
{
|
43 |
+
$model->setbrand_moip((string)$post['instituicao']);
|
44 |
+
|
45 |
+
}
|
46 |
+
|
47 |
+
$model->save();
|
48 |
+
if($post['forma_de_pagamento'] == "BoletoBancario"){
|
49 |
+
$json = array(
|
50 |
+
'Forma' => 'BoletoBancario',
|
51 |
+
);
|
52 |
+
} elseif ($post['forma_de_pagamento'] == "DebitoBancario") {
|
53 |
+
$json = array(
|
54 |
+
'Forma' => 'DebitoBancario',
|
55 |
+
'Instituicao' => $post['instituicao'],
|
56 |
+
);
|
57 |
|
58 |
+
} else {
|
|
|
|
|
59 |
|
60 |
+
$json = array(
|
61 |
+
'Forma' => $post['forma_de_pagamento'],
|
62 |
+
'Instituicao' => $post['bandeira'],
|
63 |
+
'Parcelas' => $post['parcelas'],
|
64 |
+
'CartaoCredito' => array(
|
65 |
+
'Numero' => $post['Numero'],
|
66 |
+
'Expiracao' => $post['Expiracao_mes']."/".$post['Expiracao_ano'],
|
67 |
+
'CodigoSeguranca' => $post['CodigoSeguranca'],
|
68 |
+
'Portador' => array(
|
69 |
+
'Nome' => $post['Portador'],
|
70 |
+
'DataNascimento' => date('Y-m-d', strtotime($post['DataNascimento'])),
|
71 |
+
'Telefone' => $this->getNumberOrDDD($post['Telefone'], true).$this->getNumberOrDDD($post['Telefone']),
|
72 |
+
'Identidade' => $cpf,
|
73 |
+
),
|
74 |
+
),
|
75 |
+
);
|
|
|
|
|
|
|
|
|
|
|
76 |
}
|
77 |
+
echo json_encode($json);
|
78 |
}
|
|
|
|
|
|
|
|
|
79 |
}
|
80 |
+
public function RepagAction() {
|
81 |
+
if($this->getRequest()->getParams()){
|
82 |
+
$post = $this->getRequest()->getPost();
|
83 |
+
$cpf = preg_replace("/[^0-9]/", "", $post['CPF']);
|
84 |
+
$api = Mage::getModel('moip/api');
|
85 |
+
$json = array(
|
86 |
+
'Forma' => "CartaoCredito",
|
87 |
+
'Instituicao' => $post['bandeira'],
|
88 |
+
'Parcelas' => $post['parcelas'],
|
89 |
+
'CartaoCredito' => array(
|
90 |
+
'Numero' => $post['Numero'],
|
91 |
+
'Expiracao' => $post['Expiracao_mes']."/".$post['Expiracao_ano'],
|
92 |
+
'CodigoSeguranca' => $post['CodigoSeguranca'],
|
93 |
+
'Portador' => array(
|
94 |
+
'Nome' => $post['Portador'],
|
95 |
+
'DataNascimento' => date('Y-m-d', strtotime($post['DataNascimento'])),
|
96 |
+
'Telefone' => $this->getNumberOrDDD($post['Telefone'], true).$this->getNumberOrDDD($post['Telefone']),
|
97 |
+
'Identidade' => $cpf,
|
98 |
+
),
|
99 |
+
),
|
100 |
+
);
|
101 |
}
|
102 |
+
echo json_encode($json);
|
103 |
+
var_dump($json);
|
104 |
+
return true;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
105 |
}
|
106 |
+
function getNumberOrDDD($param_telefone, $param_ddd = false) {
|
107 |
+
|
108 |
+
$cust_ddd = '00';
|
109 |
+
$cust_telephone = preg_replace("/[^0-9]/", "", $param_telefone);
|
110 |
+
$st = strlen($cust_telephone) - 8;
|
111 |
+
if ($st > 0) { //No caso essa seqüência é mais de 8 caracteres
|
112 |
+
$cust_ddd = substr($cust_telephone, 0, 2);
|
113 |
+
$cust_telephone = substr($cust_telephone, $st, 8);
|
114 |
+
}
|
115 |
+
|
116 |
+
if ($param_ddd === false) {
|
117 |
+
$retorno = $cust_telephone;
|
118 |
+
} else {
|
119 |
+
$retorno = $cust_ddd;
|
120 |
+
}
|
121 |
|
122 |
+
return $retorno;
|
123 |
+
}
|
124 |
+
}
|
app/code/local/O2TI/Moip/controllers/StandardController.php
CHANGED
@@ -10,45 +10,82 @@
|
|
10 |
* @license Autorizado o uso por tempo indeterminado
|
11 |
*/
|
12 |
class O2TI_Moip_StandardController extends Mage_Core_Controller_Front_Action {
|
13 |
-
public function getOrder() {
|
14 |
-
if ($this->_order == null) {}
|
15 |
-
return $this->_order;
|
16 |
-
}
|
17 |
public function getStandard() {
|
18 |
return Mage::getSingleton('moip/standard');
|
19 |
}
|
|
|
20 |
protected function _expireAjax() {
|
21 |
if (!Mage::getSingleton('checkout/session')->getQuote()->hasItems()) {
|
22 |
$this->getResponse()->setHeader('HTTP/1.1', '403 Session Expired');
|
23 |
exit;
|
24 |
}
|
25 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
26 |
public function redirectAction() {
|
27 |
$session = Mage::getSingleton('checkout/session');
|
|
|
28 |
$standard = $this->getStandard();
|
29 |
$fields = $session->getMoIPFields();
|
30 |
$fields['id_transacao'] = Mage::getSingleton('checkout/session')->getLastRealOrderId();
|
31 |
$pgtoArray = $session->getPgtoArray();
|
32 |
$api = Mage::getModel('moip/api');
|
33 |
$api->setAmbiente($standard->getConfigData('ambiente'));
|
34 |
-
$
|
35 |
-
|
36 |
-
$
|
37 |
-
|
38 |
-
$
|
39 |
-
Mage::register('formapg', $formapg);
|
40 |
-
$token = $api->getToken($xml);
|
41 |
-
$session->setMoipStandardQuoteId($session->getQuoteId());
|
42 |
-
Mage::register('token', $token['token']);
|
43 |
-
Mage::register('erro', $token['erro']);
|
44 |
-
Mage::register('StatusPgdireto', $token['pgdireto_status']);
|
45 |
-
Mage::register('current_order', Mage::getModel('sales/order')->load(Mage::getSingleton('checkout/session')->getLastOrderId()));
|
46 |
$this->loadLayout();
|
47 |
$this->getLayout()->getBlock('content')->append($this->getLayout()->createBlock('O2TI_Moip_Block_Standard_Redirect'));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
48 |
$this->renderLayout();
|
49 |
-
|
50 |
-
$session->unsQuoteId();
|
51 |
}
|
|
|
52 |
|
53 |
public function cancelAction() {
|
54 |
$session = Mage::getSingleton('checkout/session');
|
@@ -65,135 +102,106 @@ class O2TI_Moip_StandardController extends Mage_Core_Controller_Front_Action {
|
|
65 |
|
66 |
public function successAction() {
|
67 |
$standard = $this->getStandard();
|
68 |
-
$
|
69 |
-
$
|
70 |
-
if
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
106 |
}
|
107 |
-
$order2 = Mage::getModel('sales/order')->load($orderId);
|
108 |
-
$order2->getState() == Mage_Sales_Model_Order::STATE_HOLDED;
|
109 |
}
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
139 |
}
|
140 |
-
|
141 |
-
$state =
|
142 |
-
$
|
143 |
-
|
144 |
-
|
145 |
-
$order->cancel();
|
146 |
}
|
147 |
-
break;
|
148 |
-
case 2:
|
149 |
-
$state = Mage_Sales_Model_Order::STATE_HOLDED;
|
150 |
-
$status = 'iniciado';
|
151 |
-
$comment = $this->getStatusPagamentoMoip($data['status_pagamento']);
|
152 |
-
$comment = $comment ." Pagamento realizado por: ". $this->getNomePagamento($Formadepagamento);
|
153 |
-
$comment = $comment ."\n Via instuição: ". $bandeira;
|
154 |
-
|
155 |
-
Mage::dispatchEvent('moip_order_canceled_fraud', array("order" => $order));
|
156 |
-
break;
|
157 |
-
case 3:
|
158 |
-
$state = Mage_Sales_Model_Order::STATE_HOLDED;
|
159 |
-
$status = 'boleto_impresso';
|
160 |
-
$comment = $this->getStatusPagamentoMoip($data['status_pagamento']);
|
161 |
-
$comment = $comment. "\n ID MOIP " .$data['cod_moip'];
|
162 |
-
Mage::dispatchEvent('moip_order_hold_printed', array("order" => $order));
|
163 |
-
break;
|
164 |
-
case 4:
|
165 |
-
return false;
|
166 |
-
break;
|
167 |
-
case 5:
|
168 |
-
$state = Mage_Sales_Model_Order::STATE_CANCELED;
|
169 |
-
$status = 'canceled';
|
170 |
-
$comment = $this->getStatusPagamentoMoip($data['status_pagamento']);
|
171 |
-
$comment = $comment ." Pagamento realizado por: ". $this->getNomePagamento($Formadepagamento);
|
172 |
-
$comment = $comment ."\n Via instuição: ". $bandeira;
|
173 |
-
$comment = $comment . "\n ID MOIP " .$data['cod_moip']. "\n Motivo: ".utf8_encode($data['classificacao']);
|
174 |
-
Mage::dispatchEvent('moip_order_canceled', array("order" => $order));
|
175 |
-
$this->_sendStatusMail($order, $tokenpagamento);
|
176 |
-
$order->cancel();
|
177 |
-
break;
|
178 |
-
case 6:
|
179 |
-
$state = Mage_Sales_Model_Order::STATE_HOLDED;
|
180 |
-
$status = 'payment_review';
|
181 |
-
$comment = $this->getStatusPagamentoMoip($data['status_pagamento']);
|
182 |
-
$comment = $comment ." Pagamento realizado por: ". $this->getNomePagamento($Formadepagamento);
|
183 |
-
$comment = $comment ."\n Via instuição: ". $bandeira;
|
184 |
-
$comment = $comment. "\n ID MOIP " .$data['cod_moip'];
|
185 |
-
Mage::dispatchEvent('moip_order_holded_review', array("order" => $order));
|
186 |
-
break;
|
187 |
-
}
|
188 |
-
$order->setState($state, $status, $comment, $notified = true, $includeComment = true);
|
189 |
-
$order->save();
|
190 |
-
$order->load(Mage::getSingleton('checkout/session')->getLastOrderId());
|
191 |
-
if ($order->getId()) {}
|
192 |
-
|
193 |
-
if($status == 'authorized'){
|
194 |
-
Mage::dispatchEvent('moip_order_authorize', array("order" => $order));
|
195 |
-
}
|
196 |
-
echo 'Processo de retorno concluido para o pedido #'.$data['id_transacao'].$data_validacao;
|
197 |
}
|
198 |
}
|
199 |
|
@@ -209,39 +217,48 @@ class O2TI_Moip_StandardController extends Mage_Core_Controller_Front_Action {
|
|
209 |
case "CartaoCredito":
|
210 |
$nome = "Cartão de Crédito";
|
211 |
break;
|
|
|
|
|
|
|
212 |
}
|
213 |
return $nome;
|
214 |
}
|
|
|
215 |
private function getStatusPagamentoMoip($param) {
|
216 |
-
$status = "";
|
217 |
switch ($param) {
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
239 |
}
|
240 |
-
return $
|
241 |
}
|
242 |
|
243 |
private function _sendStatusMail($order, $tokenpagamento)
|
244 |
-
|
245 |
$emailTemplate = Mage::getModel('core/email_template');
|
246 |
$emailTemplate->loadDefault('o2ti_ordem_tpl');
|
247 |
$emailTemplate->setTemplateSubject('Pedido Cancelado');
|
@@ -255,17 +272,19 @@ class O2TI_Moip_StandardController extends Mage_Core_Controller_Front_Action {
|
|
255 |
$emailTemplateVariables['store_name'] = $order->getStoreName();
|
256 |
$emailTemplateVariables['store_url'] = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB);
|
257 |
$emailTemplate->send($order->getCustomerEmail(), $order->getStoreName(), $emailTemplateVariables);
|
258 |
-
|
259 |
-
public function email_erro_pgtoAction() {
|
260 |
-
if ($_GET['erro'] != "true"):
|
261 |
-
$erro = $_GET['erro'];
|
262 |
-
$pedido = $_GET['pedido'];
|
263 |
-
$navegador = $_GET['navegador'];
|
264 |
-
Mage::log("Cliente do pedido ".$pedido. " - Erro - " .$erro. " navegador ". $navegador, null, 'O2TI_Moip.log', true);
|
265 |
-
endif;
|
266 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
267 |
}
|
|
|
268 |
public function buscaCepAction() {
|
|
|
269 |
if ($_GET['meio'] == "buscaend") {
|
270 |
function simple_curl($url, $post=array(), $get=array()) {
|
271 |
$url = explode('?', $url, 2);
|
@@ -296,6 +315,7 @@ class O2TI_Moip_StandardController extends Mage_Core_Controller_Front_Action {
|
|
296 |
$html = $html;
|
297 |
echo $html;
|
298 |
}
|
|
|
299 |
if ($_GET['meio'] == "cep") {
|
300 |
function simple_curl($url, $post=array(), $get=array()) {
|
301 |
$url = explode('?', $url, 2);
|
@@ -313,151 +333,99 @@ class O2TI_Moip_StandardController extends Mage_Core_Controller_Front_Action {
|
|
313 |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
314 |
Mage::log(curl_exec($ch));
|
315 |
return curl_exec($ch);
|
316 |
-
|
317 |
}
|
318 |
$cep = $_GET['cep'];
|
319 |
-
$
|
320 |
-
$
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
'
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
$
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
354 |
break;
|
355 |
-
}
|
356 |
-
$counter++;
|
357 |
-
}
|
358 |
-
$dados =
|
359 |
-
array(
|
360 |
-
"logradouro"=> $logradouro,
|
361 |
-
"bairro"=> $bairro,
|
362 |
-
"cidade" => $cidade,
|
363 |
-
"uf"=> $estado,
|
364 |
-
"cep"=> $cep
|
365 |
-
);
|
366 |
-
|
367 |
-
switch ($dados['uf']) {
|
368 |
-
case "AC":
|
369 |
-
$estado = "485";
|
370 |
-
break;
|
371 |
-
case "AL":
|
372 |
-
$estado = "486";
|
373 |
-
break;
|
374 |
-
case "AP":
|
375 |
-
$estado = "487";
|
376 |
-
break;
|
377 |
-
case "AM":
|
378 |
-
$estado = "488";
|
379 |
-
break;
|
380 |
-
case "BA":
|
381 |
-
$estado = "489";
|
382 |
-
break;
|
383 |
-
case "CE":
|
384 |
-
$estado = "490";
|
385 |
-
break;
|
386 |
-
case "DF":
|
387 |
-
$estado = "491";
|
388 |
-
break;
|
389 |
-
case "ES":
|
390 |
-
$estado = "492";
|
391 |
-
break;
|
392 |
-
case "GO":
|
393 |
-
$estado = "493";
|
394 |
-
break;
|
395 |
-
case "MA":
|
396 |
-
$estado = "494";
|
397 |
-
break;
|
398 |
-
case "MT":
|
399 |
-
$estado = "495";
|
400 |
-
break;
|
401 |
-
case "MS":
|
402 |
-
$estado = "496";
|
403 |
-
break;
|
404 |
-
case "MG":
|
405 |
-
$estado = "497";
|
406 |
-
break;
|
407 |
-
case "PA":
|
408 |
-
$estado = "498";
|
409 |
-
break;
|
410 |
-
case "PB":
|
411 |
-
$estado = "499";
|
412 |
-
break;
|
413 |
-
case "PR":
|
414 |
-
$estado = "500";
|
415 |
-
break;
|
416 |
-
case "PE":
|
417 |
-
$estado = "501";
|
418 |
-
break;
|
419 |
-
case "PI":
|
420 |
-
$estado = "502";
|
421 |
-
break;
|
422 |
-
case "RJ":
|
423 |
-
$estado = "503";
|
424 |
-
break;
|
425 |
-
case "RN":
|
426 |
-
$estado = "504";
|
427 |
-
break;
|
428 |
-
case "RS":
|
429 |
-
$estado = "505";
|
430 |
-
break;
|
431 |
-
case "RO":
|
432 |
-
$estado = "506";
|
433 |
-
break;
|
434 |
-
case "RR":
|
435 |
-
$estado = "507";
|
436 |
-
break;
|
437 |
-
case "SC":
|
438 |
-
$estado = "508";
|
439 |
-
break;
|
440 |
-
case "SP":
|
441 |
-
$estado = "509";
|
442 |
-
break;
|
443 |
-
case "SE":
|
444 |
-
$estado = "510";
|
445 |
-
break;
|
446 |
-
case "TO":;
|
447 |
-
$estado = "511";
|
448 |
-
break;
|
449 |
}
|
450 |
-
$
|
451 |
-
/*if ($estado != "") {
|
452 |
-
$separa_end = explode('- ', $dados['logradouro']);
|
453 |
-
if ($dados['uf'] != ""):
|
454 |
-
$texto = array('logradouro'=>$logradouro, 'bairro'=>$bairro, 'estado' => $cidade, 'estado'=>$estado);
|
455 |
-
//$texto = utf8_decode($separa_end[0]).":".utf8_decode($dados['bairro']).":".utf8_decode($dados['cidade']).":".$estado.";";
|
456 |
-
else:
|
457 |
-
$texto = $dados['tipo_d']." :".$dados['d'].":".utf8_decode($dados['logradouro']).":".$estado.";";
|
458 |
-
endif;
|
459 |
-
}*/
|
460 |
-
echo json_encode($dados);
|
461 |
}
|
462 |
}
|
463 |
-
}
|
10 |
* @license Autorizado o uso por tempo indeterminado
|
11 |
*/
|
12 |
class O2TI_Moip_StandardController extends Mage_Core_Controller_Front_Action {
|
|
|
|
|
|
|
|
|
13 |
public function getStandard() {
|
14 |
return Mage::getSingleton('moip/standard');
|
15 |
}
|
16 |
+
|
17 |
protected function _expireAjax() {
|
18 |
if (!Mage::getSingleton('checkout/session')->getQuote()->hasItems()) {
|
19 |
$this->getResponse()->setHeader('HTTP/1.1', '403 Session Expired');
|
20 |
exit;
|
21 |
}
|
22 |
}
|
23 |
+
|
24 |
+
public function generateToken($xml) {
|
25 |
+
$session = Mage::getSingleton('checkout/session');
|
26 |
+
|
27 |
+
$documento = 'Content-Type: application/xml; charset=utf-8';
|
28 |
+
if (Mage::getSingleton('moip/standard')->getConfigData('ambiente') == "teste") {
|
29 |
+
$url = "https://desenvolvedor.moip.com.br/sandbox/ws/alpha/EnviarInstrucao/Unica";
|
30 |
+
$header = "Authorization: Basic " . base64_encode(O2TI_Moip_Model_Api::TOKEN_TEST . ":" . O2TI_Moip_Model_Api::KEY_TEST);
|
31 |
+
}
|
32 |
+
else {
|
33 |
+
$url = "https://www.moip.com.br/ws/alpha/EnviarInstrucao/Unica";
|
34 |
+
$header = "Authorization: Basic " . base64_encode(O2TI_Moip_Model_Api::TOKEN_PROD . ":" . O2TI_Moip_Model_Api::KEY_PROD);
|
35 |
+
}
|
36 |
+
$result = array();
|
37 |
+
$ch = curl_init();
|
38 |
+
curl_setopt($ch, CURLOPT_URL,$url);
|
39 |
+
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
40 |
+
curl_setopt($ch, CURLOPT_TIMEOUT, 10);
|
41 |
+
curl_setopt($ch, CURLOPT_POST, true);
|
42 |
+
curl_setopt($ch, CURLOPT_POSTFIELDS, $xml);
|
43 |
+
curl_setopt($ch, CURLOPT_HTTPHEADER, array($header, $documento));
|
44 |
+
$res = curl_exec($ch);
|
45 |
+
curl_close($ch);
|
46 |
+
|
47 |
+
$res = simplexml_load_string($res);
|
48 |
+
if($res->Resposta->Status == "Sucesso"){
|
49 |
+
$result['status'] = $res->Resposta->Status->__toString();
|
50 |
+
$result['token'] = $res->Resposta->Token->__toString();
|
51 |
+
$session->setResult_decode($result);
|
52 |
+
return $result;
|
53 |
+
}
|
54 |
+
else {
|
55 |
+
$result['status'] = $res->Resposta->Status->__toString();
|
56 |
+
$result['erro'] = $res->Resposta->Erro->__toString();
|
57 |
+
return $result;
|
58 |
+
}
|
59 |
+
|
60 |
+
}
|
61 |
public function redirectAction() {
|
62 |
$session = Mage::getSingleton('checkout/session');
|
63 |
+
$getSaltes = Mage::getModel('sales/order');
|
64 |
$standard = $this->getStandard();
|
65 |
$fields = $session->getMoIPFields();
|
66 |
$fields['id_transacao'] = Mage::getSingleton('checkout/session')->getLastRealOrderId();
|
67 |
$pgtoArray = $session->getPgtoArray();
|
68 |
$api = Mage::getModel('moip/api');
|
69 |
$api->setAmbiente($standard->getConfigData('ambiente'));
|
70 |
+
$pedido_send = $api->generatePedido($fields, $pgtoArray);
|
71 |
+
$gettoken = $this->generateToken($pedido_send);
|
72 |
+
$session->setCurrent_order($getSaltes->load($session->getLastOrderId()));
|
73 |
+
$session->setPgtoarry($pgtoArray);
|
74 |
+
$session->setClient_array($fields);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
75 |
$this->loadLayout();
|
76 |
$this->getLayout()->getBlock('content')->append($this->getLayout()->createBlock('O2TI_Moip_Block_Standard_Redirect'));
|
77 |
+
if($pgtoArray['forma_pagamento'] == "BoletoBancario"){
|
78 |
+
$this->getLayout()->getBlock('content')->append('moip.boleto');
|
79 |
+
}
|
80 |
+
elseif ($pgtoArray['forma_pagamento'] == "DebitoBancario") {
|
81 |
+
$this->getLayout()->getBlock('content')->append('moip.transferencia');
|
82 |
+
}
|
83 |
+
elseif ($pgtoArray['forma_pagamento'] == "CartaoCredito") {
|
84 |
+
$this->getLayout()->getBlock('content')->append('moip.cartao');
|
85 |
+
}
|
86 |
$this->renderLayout();
|
|
|
|
|
87 |
}
|
88 |
+
|
89 |
|
90 |
public function cancelAction() {
|
91 |
$session = Mage::getSingleton('checkout/session');
|
102 |
|
103 |
public function successAction() {
|
104 |
$standard = $this->getStandard();
|
105 |
+
$naexecuta = "";
|
106 |
+
$validacao = $this->getRequest()->getParams();
|
107 |
+
if($validacao['validacao'] == "elisei13"){
|
108 |
+
$data = $this->getRequest()->getPost();
|
109 |
+
$login = $standard->getConfigData('conta_moip');
|
110 |
+
$data_moip = trim($data['id_transacao']);
|
111 |
+
$order_magento = str_replace($login, "", $data_moip);
|
112 |
+
$model = Mage::getModel('moip/write');
|
113 |
+
$model->load($order_magento, 'key_payment');
|
114 |
+
$order = Mage::getModel('sales/order')->load($order_magento, 'increment_id');
|
115 |
+
$id_order = $order->getId();
|
116 |
+
$states_atual = $order->getStatus();
|
117 |
+
if ($order->isCanceled() && $data['status_pagamento'] != "5") {
|
118 |
+
if (Mage::helper('sales/reorder')->canReorder($order)) {
|
119 |
+
$order->setState(Mage_Sales_Model_Order::STATE_NEW);
|
120 |
+
$produtos = array();
|
121 |
+
foreach ($order->getAllItems() as $item) {
|
122 |
+
$item->setQtyCanceled(1);
|
123 |
+
$item->save();
|
124 |
+
$stockItem = Mage::getModel('cataloginventory/stock_item')->loadByProduct($item->getProductId());
|
125 |
+
$stockItem->subtractQty($item->getQtyOrdered());
|
126 |
+
$stockItem->setIsInStock(true)->setStockStatusChangedAutomaticallyFlag(true);
|
127 |
+
$stockItem->save();
|
128 |
+
$produtos = $item->getProductId();
|
129 |
+
$product = Mage::getModel('catalog/product')->loadByAttribute('sku', $produtos);
|
130 |
+
$qty = $item->getQtyOrdered();
|
131 |
+
$rowTotal = $item->getPrice();
|
132 |
+
$orderItem = Mage::getModel('sales/order_item')
|
133 |
+
->setStoreId($order->getStore()->getStoreId())
|
134 |
+
->setQuoteItemId(NULL)
|
135 |
+
->setQuoteParentItemId(NULL)
|
136 |
+
->setProductId($item->getId())
|
137 |
+
->setProductType($item->getTypeId())
|
138 |
+
->setQtyBackordered(NULL)
|
139 |
+
->setTotalQtyOrdered($qty)
|
140 |
+
->setQtyOrdered($qty)
|
141 |
+
->setName($item->getName())
|
142 |
+
->setSku($item->getSku())
|
143 |
+
->setPrice($item->getPrice())
|
144 |
+
->setBasePrice($item->getPrice())
|
145 |
+
->setOriginalPrice($item->getPrice())
|
146 |
+
->setRowTotal($rowTotal)
|
147 |
+
->setBaseRowTotal($rowTotal)
|
148 |
+
->setOrder($order);
|
149 |
+
$orderItem->save();
|
150 |
+
}
|
151 |
+
$order->save();
|
152 |
}
|
|
|
|
|
153 |
}
|
154 |
+
switch ($data['status_pagamento']) {
|
155 |
+
case "1":
|
156 |
+
if($states_atual != 'processing'){
|
157 |
+
$state = Mage_Sales_Model_Order::STATE_PROCESSING;
|
158 |
+
$status = 'processing';
|
159 |
+
$comment = $this->getStatusPagamentoMoip($status);
|
160 |
+
$invoice = $order->prepareInvoice();
|
161 |
+
if ($this->getStandard()->canCapture())
|
162 |
+
{
|
163 |
+
$invoice->register()->capture();
|
164 |
+
}
|
165 |
+
Mage::getModel('core/resource_transaction')->addObject($invoice)->addObject($invoice->getOrder())->save();
|
166 |
+
$invoice->sendEmail();
|
167 |
+
$invoice->setEmailSent(true);
|
168 |
+
$invoice->save();
|
169 |
+
} else {
|
170 |
+
$naexecuta = 1;
|
171 |
+
}
|
172 |
+
break;
|
173 |
+
case "2":
|
174 |
+
$state = Mage_Sales_Model_Order::STATE_HOLDED;
|
175 |
+
$status = 'holded';
|
176 |
+
$comment = $this->getStatusPagamentoMoip($data['status_pagamento']);
|
177 |
+
break;
|
178 |
+
case "3":
|
179 |
+
if($states_atual != 'processing' && $states_atual != 'holded'){
|
180 |
+
$state = Mage_Sales_Model_Order::STATE_HOLDED;
|
181 |
+
$status = 'holded';
|
182 |
+
$comment = $this->getStatusPagamentoMoip($data['status_pagamento']);
|
183 |
+
} else {
|
184 |
+
$naexecuta = 1;
|
185 |
+
}
|
186 |
+
break;
|
187 |
+
case "4":
|
188 |
+
$state = Mage_Sales_Model_Order::STATE_HOLDED;
|
189 |
+
$status = 'boleto_impresso';
|
190 |
+
$comment = $this->getStatusPagamentoMoip($data['status_pagamento']);
|
191 |
+
break;
|
192 |
+
case "5":
|
193 |
+
$state = Mage_Sales_Model_Order::STATE_CANCELED;
|
194 |
+
$status = 'canceled';
|
195 |
+
$comment = $this->getStatusPagamentoMoip($data['status_pagamento']);
|
196 |
+
$order->cancel();
|
197 |
+
break;
|
198 |
}
|
199 |
+
if($naexecuta != 1){
|
200 |
+
$order->setState($state, $status, $comment, $notified = true, $includeComment = true);
|
201 |
+
$order->save();
|
202 |
+
echo 'Processo de retorno concluido para o pedido #'.$id_order.' Status '.$status;
|
203 |
+
Mage::log("Cliente do pedido ".$id_order. " - Status - " .$status, null, 'O2TI_Moip.log', true);
|
|
|
204 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
205 |
}
|
206 |
}
|
207 |
|
217 |
case "CartaoCredito":
|
218 |
$nome = "Cartão de Crédito";
|
219 |
break;
|
220 |
+
default:
|
221 |
+
$nome ="meio";
|
222 |
+
break;
|
223 |
}
|
224 |
return $nome;
|
225 |
}
|
226 |
+
|
227 |
private function getStatusPagamentoMoip($param) {
|
|
|
228 |
switch ($param) {
|
229 |
+
case "1":
|
230 |
+
$param = "Pagamento Autorizado";
|
231 |
+
break;
|
232 |
+
case "2":
|
233 |
+
$param = "Pagamento Iniciado";
|
234 |
+
break;
|
235 |
+
case "3":
|
236 |
+
$param = "Boleto Impresso";
|
237 |
+
break;
|
238 |
+
case "4":
|
239 |
+
$param = "Pagamento Concluido";
|
240 |
+
break;
|
241 |
+
case "5":
|
242 |
+
$param = "Pagamento Cancelado";
|
243 |
+
break;
|
244 |
+
case "6":
|
245 |
+
$param = "Pagamento em análise";
|
246 |
+
break;
|
247 |
+
case "7":
|
248 |
+
$param = "Pagamento Reembolsado";
|
249 |
+
break;
|
250 |
+
case "8":
|
251 |
+
$param = "Pagamento Revertido pela Operadora";
|
252 |
+
break;
|
253 |
+
default:
|
254 |
+
$param = "nao criado";
|
255 |
+
break;
|
256 |
}
|
257 |
+
return $param;
|
258 |
}
|
259 |
|
260 |
private function _sendStatusMail($order, $tokenpagamento)
|
261 |
+
{
|
262 |
$emailTemplate = Mage::getModel('core/email_template');
|
263 |
$emailTemplate->loadDefault('o2ti_ordem_tpl');
|
264 |
$emailTemplate->setTemplateSubject('Pedido Cancelado');
|
272 |
$emailTemplateVariables['store_name'] = $order->getStoreName();
|
273 |
$emailTemplateVariables['store_url'] = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB);
|
274 |
$emailTemplate->send($order->getCustomerEmail(), $order->getStoreName(), $emailTemplateVariables);
|
275 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
276 |
|
277 |
+
public function email_erro_pgtoAction() {
|
278 |
+
if ($_GET['erro'] != "true"){
|
279 |
+
$erro = $_GET['erro'];
|
280 |
+
$pedido = $_GET['pedido'];
|
281 |
+
$navegador = $_GET['navegador'];
|
282 |
+
Mage::log("Cliente do pedido ".$pedido. " - Erro - " .$erro. " navegador ". $navegador, null, 'O2TI_Moip.log', true);
|
283 |
+
}
|
284 |
}
|
285 |
+
|
286 |
public function buscaCepAction() {
|
287 |
+
|
288 |
if ($_GET['meio'] == "buscaend") {
|
289 |
function simple_curl($url, $post=array(), $get=array()) {
|
290 |
$url = explode('?', $url, 2);
|
315 |
$html = $html;
|
316 |
echo $html;
|
317 |
}
|
318 |
+
|
319 |
if ($_GET['meio'] == "cep") {
|
320 |
function simple_curl($url, $post=array(), $get=array()) {
|
321 |
$url = explode('?', $url, 2);
|
333 |
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
|
334 |
Mage::log(curl_exec($ch));
|
335 |
return curl_exec($ch);
|
|
|
336 |
}
|
337 |
$cep = $_GET['cep'];
|
338 |
+
$cep = $_GET['cep'];
|
339 |
+
$cep = substr(preg_replace("/[^0-9]/", "", $cep) . '00000000', 0, 8);
|
340 |
+
$url_end = "http://endereco.ecorreios.com.br/getAddress.php?cep={$cep}";
|
341 |
+
$config = array('adapter' => 'Zend_Http_Client_Adapter_Socket');
|
342 |
+
$client = new Zend_Http_Client($url_end, $config);
|
343 |
+
$response = $client->request();
|
344 |
+
$endereco = Zend_Json::decode($response->getBody());
|
345 |
+
switch ($endereco['uf']) {
|
346 |
+
case "AC":
|
347 |
+
$endereco['ufid'] = 485;
|
348 |
+
break;
|
349 |
+
case "AL":
|
350 |
+
$endereco['ufid'] = 486;
|
351 |
+
break;
|
352 |
+
case "AP":
|
353 |
+
$endereco['ufid'] = 487;
|
354 |
+
break;
|
355 |
+
case "AM":
|
356 |
+
$endereco['ufid'] = 488;
|
357 |
+
break;
|
358 |
+
case "BA":
|
359 |
+
$endereco['ufid'] = 489;
|
360 |
+
break;
|
361 |
+
case "CE":
|
362 |
+
$endereco['ufid'] = 490;
|
363 |
+
break;
|
364 |
+
case "DF":
|
365 |
+
$endereco['ufid'] = 491;
|
366 |
+
break;
|
367 |
+
case "ES":
|
368 |
+
$endereco['ufid'] = 492;
|
369 |
+
break;
|
370 |
+
case "GO":
|
371 |
+
$endereco['ufid'] = 493;
|
372 |
+
break;
|
373 |
+
case "MA":
|
374 |
+
$endereco['ufid'] = 494;
|
375 |
+
break;
|
376 |
+
case "MT":
|
377 |
+
$endereco['ufid'] = 495;
|
378 |
+
break;
|
379 |
+
case "MS":
|
380 |
+
$endereco['ufid'] = 496;
|
381 |
+
break;
|
382 |
+
case "MG":
|
383 |
+
$endereco['ufid'] = 497;
|
384 |
+
break;
|
385 |
+
case "PA":
|
386 |
+
$endereco['ufid'] = 498;
|
387 |
+
break;
|
388 |
+
case "PB":
|
389 |
+
$endereco['ufid'] = 499;
|
390 |
+
break;
|
391 |
+
case "PR":
|
392 |
+
$endereco['ufid'] = 500;
|
393 |
+
break;
|
394 |
+
case "PE":
|
395 |
+
$endereco['ufid'] = 501;
|
396 |
+
break;
|
397 |
+
case "PI":
|
398 |
+
$endereco['ufid'] = 502;
|
399 |
+
break;
|
400 |
+
case "RJ":
|
401 |
+
$endereco['ufid'] = 503;
|
402 |
+
break;
|
403 |
+
case "RN":
|
404 |
+
$endereco['ufid'] = 504;
|
405 |
+
break;
|
406 |
+
case "RS":
|
407 |
+
$endereco['ufid'] = 505;
|
408 |
+
break;
|
409 |
+
case "RO":
|
410 |
+
$endereco['ufid'] = 506;
|
411 |
+
break;
|
412 |
+
case "RR":
|
413 |
+
$endereco['ufid'] = 507;
|
414 |
+
break;
|
415 |
+
case "SC":
|
416 |
+
$endereco['ufid'] = 508;
|
417 |
+
break;
|
418 |
+
case "SP":
|
419 |
+
$endereco['ufid'] = 509;
|
420 |
+
break;
|
421 |
+
case "SE":
|
422 |
+
$endereco['ufid'] = 510;
|
423 |
+
break;
|
424 |
+
case "TO":
|
425 |
+
$endereco['ufid'] = 511;
|
426 |
break;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
427 |
}
|
428 |
+
$this->getResponse()->setBody(Zend_Json::encode($endereco));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
429 |
}
|
430 |
}
|
431 |
+
}
|
app/code/local/O2TI/Moip/etc/config.xml
CHANGED
@@ -2,14 +2,23 @@
|
|
2 |
<config>
|
3 |
<modules>
|
4 |
<O2TI_Moip>
|
5 |
-
<version>0.2.
|
6 |
</O2TI_Moip>
|
7 |
</modules>
|
8 |
<global>
|
9 |
<models>
|
10 |
<moip>
|
11 |
-
|
12 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
13 |
</models>
|
14 |
<resources>
|
15 |
<moip_setup>
|
@@ -27,8 +36,8 @@
|
|
27 |
</moip_write>
|
28 |
<moip_read>
|
29 |
<connection>
|
30 |
-
|
31 |
-
|
32 |
</moip_read>
|
33 |
</resources>
|
34 |
<blocks>
|
@@ -50,16 +59,7 @@
|
|
50 |
</o2ti_ordem_tpl>
|
51 |
</email>
|
52 |
</template>
|
53 |
-
|
54 |
-
<moip_order_authorize>
|
55 |
-
<observers>
|
56 |
-
<moip_order_create_invoice>
|
57 |
-
<class>moip/observer</class>
|
58 |
-
<method>generateInvoice</method>
|
59 |
-
</moip_order_create_invoice>
|
60 |
-
</observers>
|
61 |
-
</moip_order_authorize>
|
62 |
-
</events>
|
63 |
</global>
|
64 |
<frontend>
|
65 |
<routers>
|
@@ -116,6 +116,7 @@
|
|
116 |
</moip>
|
117 |
</updates>
|
118 |
</layout>
|
|
|
119 |
</adminhtml>
|
120 |
<crontab>
|
121 |
<jobs>
|
@@ -145,7 +146,7 @@
|
|
145 |
<tipoderecebimento>1</tipoderecebimento>
|
146 |
<pagamento_direto>1</pagamento_direto>
|
147 |
<parcelamento>1</parcelamento>
|
148 |
-
<parcelamento_de1>
|
149 |
<parcelamento_ate1>12</parcelamento_ate1>
|
150 |
<parcelamento_juros1>1.99</parcelamento_juros1>
|
151 |
<nummaxparcelamax>12</nummaxparcelamax>
|
2 |
<config>
|
3 |
<modules>
|
4 |
<O2TI_Moip>
|
5 |
+
<version>0.2.4</version>
|
6 |
</O2TI_Moip>
|
7 |
</modules>
|
8 |
<global>
|
9 |
<models>
|
10 |
<moip>
|
11 |
+
<class>O2TI_Moip_Model</class>
|
12 |
+
<resourceModel>moip_mysql4</resourceModel>
|
13 |
+
</moip>
|
14 |
+
<moip_mysql4>
|
15 |
+
<class>O2TI_Moip_Model_Mysql4</class>
|
16 |
+
<entities>
|
17 |
+
<write>
|
18 |
+
<table>o2ti_moip</table>
|
19 |
+
</write>
|
20 |
+
</entities>
|
21 |
+
</moip_mysql4>
|
22 |
</models>
|
23 |
<resources>
|
24 |
<moip_setup>
|
36 |
</moip_write>
|
37 |
<moip_read>
|
38 |
<connection>
|
39 |
+
<use>core_read</use>
|
40 |
+
</connection>
|
41 |
</moip_read>
|
42 |
</resources>
|
43 |
<blocks>
|
59 |
</o2ti_ordem_tpl>
|
60 |
</email>
|
61 |
</template>
|
62 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
63 |
</global>
|
64 |
<frontend>
|
65 |
<routers>
|
116 |
</moip>
|
117 |
</updates>
|
118 |
</layout>
|
119 |
+
|
120 |
</adminhtml>
|
121 |
<crontab>
|
122 |
<jobs>
|
146 |
<tipoderecebimento>1</tipoderecebimento>
|
147 |
<pagamento_direto>1</pagamento_direto>
|
148 |
<parcelamento>1</parcelamento>
|
149 |
+
<parcelamento_de1>1</parcelamento_de1>
|
150 |
<parcelamento_ate1>12</parcelamento_ate1>
|
151 |
<parcelamento_juros1>1.99</parcelamento_juros1>
|
152 |
<nummaxparcelamax>12</nummaxparcelamax>
|
app/code/local/O2TI/Moip/etc/system.xml
CHANGED
@@ -6,7 +6,23 @@
|
|
6 |
<o2ti_moip_standard translate="label"><!-- fieldset -->
|
7 |
<label><![CDATA[MoIP Transparente - O2ti]]></label>
|
8 |
<comment>
|
9 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
<sort_order>420</sort_order><!-- position between other payment methods -->
|
11 |
<show_in_default>1</show_in_default><!-- do not show this configuration options in store scope -->
|
12 |
<show_in_website>1</show_in_website>
|
@@ -237,7 +253,7 @@
|
|
237 |
</groups>
|
238 |
</payment>
|
239 |
<o2tiall translate="label" module="o2tiall">
|
240 |
-
<label><![CDATA[ <div style="height: 33px; "><img src="
|
241 |
<tab>o2ti</tab>
|
242 |
<frontend_type>text</frontend_type>
|
243 |
<sort_order>200</sort_order>
|
@@ -248,9 +264,23 @@
|
|
248 |
<config translate="label">
|
249 |
<comment>
|
250 |
<![CDATA[
|
251 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
252 |
<div>
|
253 |
-
<a style="float: left;text-decoration:none;width:100%" href="
|
254 |
</a>
|
255 |
<div style="float: left; color:#2f3850">
|
256 |
<label style="font-size: 34px">Versão: <strong>Gratuita!</strong></label>
|
@@ -259,7 +289,7 @@
|
|
259 |
<br style="clear: both;"/>
|
260 |
|
261 |
<p>Essa versão tem o download gratuito desde que mantidos os créditos a O2TI.</p>
|
262 |
-
<p>Criado por: <a href
|
263 |
|
264 |
<hr>
|
265 |
</div>
|
6 |
<o2ti_moip_standard translate="label"><!-- fieldset -->
|
7 |
<label><![CDATA[MoIP Transparente - O2ti]]></label>
|
8 |
<comment>
|
9 |
+
<![CDATA[
|
10 |
+
<script type="text/javascript" src="//assets.zendesk.com/external/zenbox/v2.5/zenbox.js"></script>
|
11 |
+
<style type="text/css" media="screen, projection">
|
12 |
+
@import url(//assets.zendesk.com/external/zenbox/v2.5/zenbox.css);
|
13 |
+
</style>
|
14 |
+
<script type="text/javascript">
|
15 |
+
if (typeof(Zenbox) !== "undefined") {
|
16 |
+
Zenbox.init({
|
17 |
+
dropboxID: "20116862",
|
18 |
+
url: "https://o2ti.zendesk.com",
|
19 |
+
tabID: "Suporte | Especialistas Magento",
|
20 |
+
tabColor: "#2c3996",
|
21 |
+
tabPosition: "Right"
|
22 |
+
});
|
23 |
+
}
|
24 |
+
</script>
|
25 |
+
]]></comment>
|
26 |
<sort_order>420</sort_order><!-- position between other payment methods -->
|
27 |
<show_in_default>1</show_in_default><!-- do not show this configuration options in store scope -->
|
28 |
<show_in_website>1</show_in_website>
|
253 |
</groups>
|
254 |
</payment>
|
255 |
<o2tiall translate="label" module="o2tiall">
|
256 |
+
<label><![CDATA[ <div style="height: 33px; "><img src="//imagem.o2ti.com/moip_o2ti.png" style="float:left; "/><div style="padding-top:8px;color:#2f3850">MoIP Avançado!<sup style="float: right;">v2.0.0</sup></div></div>]]></label>
|
257 |
<tab>o2ti</tab>
|
258 |
<frontend_type>text</frontend_type>
|
259 |
<sort_order>200</sort_order>
|
264 |
<config translate="label">
|
265 |
<comment>
|
266 |
<![CDATA[
|
267 |
+
<script type="text/javascript" src="//assets.zendesk.com/external/zenbox/v2.5/zenbox.js"></script>
|
268 |
+
<style type="text/css" media="screen, projection">
|
269 |
+
@import url(//assets.zendesk.com/external/zenbox/v2.5/zenbox.css);
|
270 |
+
</style>
|
271 |
+
<script type="text/javascript">
|
272 |
+
if (typeof(Zenbox) !== "undefined") {
|
273 |
+
Zenbox.init({
|
274 |
+
dropboxID: "20116862",
|
275 |
+
url: "https://o2ti.zendesk.com",
|
276 |
+
tabID: "Suporte | Especialistas Magento",
|
277 |
+
tabColor: "#2c3996",
|
278 |
+
tabPosition: "Right"
|
279 |
+
});
|
280 |
+
}
|
281 |
+
</script>
|
282 |
<div>
|
283 |
+
<a style="float: left;text-decoration:none;width:100%" href="//www.o2ti.com/magento.php" target="_blank" style="float: left;"><img src="//imagem.o2ti.com/moip_o2ti.png" style="float:left;"/><h1 style="float:left;">MoIP Recursos Avançados!</h1><sup>v2.0.0</sup>
|
284 |
</a>
|
285 |
<div style="float: left; color:#2f3850">
|
286 |
<label style="font-size: 34px">Versão: <strong>Gratuita!</strong></label>
|
289 |
<br style="clear: both;"/>
|
290 |
|
291 |
<p>Essa versão tem o download gratuito desde que mantidos os créditos a O2TI.</p>
|
292 |
+
<p>Criado por: <a href=//www.o2ti.com" target="_blank">O2ti Soluções em Web LTDA</a></p>
|
293 |
|
294 |
<hr>
|
295 |
</div>
|
app/code/local/O2TI/Moip/sql/moip_setup/mysql4-upgrade-0.1.0-0.2.0.php
CHANGED
@@ -9,34 +9,3 @@
|
|
9 |
* @copyright Copyright (c) 2013 O2ti Soluções Web
|
10 |
* @license Licença válida por tempo indeterminado
|
11 |
*/
|
12 |
-
$installer = $this;
|
13 |
-
|
14 |
-
$installer->startSetup();
|
15 |
-
|
16 |
-
$statusTable = $installer->getTable('sales/order_status');
|
17 |
-
$statusStateTable = $installer->getTable('sales/order_status_state');
|
18 |
-
$statusLabelTable = $installer->getTable('sales/order_status_label');
|
19 |
-
|
20 |
-
$statuses = array(
|
21 |
-
array('status' => 'authorized', 'label' => 'Autorizado'),
|
22 |
-
array('status' => 'iniciado', 'label' => 'Iniciado'),
|
23 |
-
array('status' => 'boleto_impresso', 'label' => 'Boleto Impresso'),
|
24 |
-
array('status' => 'concluido', 'label' => 'Concluido')
|
25 |
-
);
|
26 |
-
$states = array(
|
27 |
-
array('status' => 'authorized', 'state' => 'processing', 'is_default' => 1),
|
28 |
-
array('status' => 'boleto_impresso', 'state' => 'holded', 'is_default' => 1),
|
29 |
-
array('status' => 'iniciado', 'state' => 'processing', 'is_default' => 1),
|
30 |
-
array('status' => 'concluido', 'state' => 'processing', 'is_default' => 1)
|
31 |
-
);
|
32 |
-
|
33 |
-
|
34 |
-
$installer->getConnection()->insertArray($statusTable, array('status', 'label'), $statuses);
|
35 |
-
$installer->getConnection()->insertArray($statusStateTable, array('status', 'state', 'is_default'), $states);
|
36 |
-
|
37 |
-
|
38 |
-
$installer = $this;
|
39 |
-
|
40 |
-
$installer->startSetup();
|
41 |
-
|
42 |
-
$installer->endSetup();
|
9 |
* @copyright Copyright (c) 2013 O2ti Soluções Web
|
10 |
* @license Licença válida por tempo indeterminado
|
11 |
*/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
app/code/local/O2TI/Moip/sql/moip_setup/mysql4-upgrade-0.2.1-0.2.4.php
ADDED
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* MoIP - Moip Payment Module
|
4 |
+
*
|
5 |
+
* @title Magento -> Custom Payment Module for Moip (Brazil)
|
6 |
+
* @category Payment Gateway
|
7 |
+
* @package O2TI_Moip
|
8 |
+
* @author MoIP Pagamentos S/a
|
9 |
+
* @copyright Copyright (c) 2013 O2ti Soluções Web
|
10 |
+
* @license Licença válida por tempo indeterminado
|
11 |
+
*/
|
12 |
+
$installer = $this;
|
13 |
+
$installer->startSetup();
|
14 |
+
|
15 |
+
|
16 |
+
$installer->run("
|
17 |
+
CREATE TABLE IF NOT EXISTS `o2ti_moip` (
|
18 |
+
`order_id` int(11) NOT NULL AUTO_INCREMENT,
|
19 |
+
`realorder_id` int(11) DEFAULT NULL,
|
20 |
+
`meio_pg` longtext DEFAULT NULL,
|
21 |
+
`key_payment` char(50) DEFAULT NULL,
|
22 |
+
`order_idmoip` char(50) DEFAULT NULL,
|
23 |
+
`customer_id` int(11) DEFAULT NULL,
|
24 |
+
`customer_idmoip` char(50) DEFAULT NULL,
|
25 |
+
`creditcard_parc` char(50) DEFAULT NULL,
|
26 |
+
`creditcard_idmoip` char(50) DEFAULT NULL,
|
27 |
+
`brand_moip` varchar(250) DEFAULT NULL,
|
28 |
+
`first6` int(11) DEFAULT NULL,
|
29 |
+
`last4` int(11) DEFAULT NULL,
|
30 |
+
`boleto_line` char(100) DEFAULT NULL,
|
31 |
+
`urlcheckout_pg` text DEFAULT NULL,
|
32 |
+
`fees` char(50) DEFAULT NULL,
|
33 |
+
`json_send` longtext DEFAULT NULL,
|
34 |
+
`token` varchar(250) DEFAULT NULL,
|
35 |
+
`status_token` varchar(250) DEFAULT NULL,
|
36 |
+
PRIMARY KEY (`order_id`)
|
37 |
+
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;");
|
38 |
+
|
39 |
+
$installer->startSetup();
|
40 |
+
|
41 |
+
$installer->endSetup();
|
42 |
+
?>
|
app/code/local/O2TI/Onestepcheckout/controllers/IndexController.php
CHANGED
@@ -691,13 +691,15 @@ class O2TI_Onestepcheckout_IndexController extends Mage_Checkout_OnepageControll
|
|
691 |
$data_save_billing = $this->getRequest()->getPost('billing', array());
|
692 |
if ($this->isCustomerLoggedIn()) {
|
693 |
$this->saveAddress('billing', $data_save_billing);
|
694 |
-
|
695 |
-
}
|
696 |
-
$customerAddressId = $this->getRequest()->getPost('billing_address_id', false);
|
697 |
-
if ($this->getRequest()->getPost('billing_address_id') != "" && $data_save_billing['save_in_address_book'] == 0) {
|
698 |
-
$customerAddressId = "";
|
699 |
}
|
700 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
701 |
if (isset($data_save_billing['email'])) {
|
702 |
$data_save_billing['email'] = trim($data_save_billing['email']);
|
703 |
}
|
@@ -1050,9 +1052,10 @@ class O2TI_Onestepcheckout_IndexController extends Mage_Checkout_OnepageControll
|
|
1050 |
$this->loadLayout()->renderLayout();
|
1051 |
}
|
1052 |
public function saveAddress($type, $data) {
|
|
|
1053 |
$save_in_address_book = $data['save_in_address_book'];
|
1054 |
$addressId = $this->getRequest()->getPost($type.'_address_id');
|
1055 |
-
if ($save_in_address_book && $addressId != "") {
|
1056 |
$customer = Mage::getSingleton('customer/session')->getCustomer();
|
1057 |
$address = Mage::getModel('customer/address');
|
1058 |
|
691 |
$data_save_billing = $this->getRequest()->getPost('billing', array());
|
692 |
if ($this->isCustomerLoggedIn()) {
|
693 |
$this->saveAddress('billing', $data_save_billing);
|
|
|
|
|
|
|
|
|
|
|
694 |
}
|
695 |
+
$request_data = Mage::app()->getRequest()->getPost();
|
696 |
+
|
697 |
+
|
698 |
+
|
699 |
+
|
700 |
+
$customerAddressId = "";
|
701 |
+
|
702 |
+
|
703 |
if (isset($data_save_billing['email'])) {
|
704 |
$data_save_billing['email'] = trim($data_save_billing['email']);
|
705 |
}
|
1052 |
$this->loadLayout()->renderLayout();
|
1053 |
}
|
1054 |
public function saveAddress($type, $data) {
|
1055 |
+
if(isset($data['save_in_address_book']))
|
1056 |
$save_in_address_book = $data['save_in_address_book'];
|
1057 |
$addressId = $this->getRequest()->getPost($type.'_address_id');
|
1058 |
+
if (isset($data['save_in_address_book']) && $addressId != "") {
|
1059 |
$customer = Mage::getSingleton('customer/session')->getCustomer();
|
1060 |
$address = Mage::getModel('customer/address');
|
1061 |
|
app/design/adminhtml/default/default/template/O2TI/moip/info.phtml
CHANGED
@@ -1,88 +1,290 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
|
2 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
|
4 |
-
|
5 |
-
$formadepagamento = "";
|
6 |
-
$validopara_moip = $standard->getConfigData('validopara_moip');
|
7 |
-
$html = '';
|
8 |
-
$order = Mage::getModel('sales/order');
|
9 |
-
$titulo = $this->getMethod()->getTitle();
|
10 |
-
$moip = $this->getMoip();
|
11 |
-
$order = (int) $this->getRequest()->getParam('order_id');
|
12 |
-
$sale_id = "";
|
13 |
-
if($order == ""):
|
14 |
-
$order = $this->getInfo()->getOrder()->getquote_id();
|
15 |
-
$sale_id = Mage::getSingleton('checkout/session')->getLastRealOrderId();
|
16 |
-
endif;
|
17 |
-
if ($sale_id != ""){
|
18 |
-
$connR = Mage::getSingleton('core/resource')->getConnection('core_read');
|
19 |
-
$sql = "SELECT *
|
20 |
-
FROM moip
|
21 |
-
WHERE sale_id IN (".$sale_id.") AND status ='Sucesso'";
|
22 |
-
$_venda = $connR->fetchAll($sql);
|
23 |
-
foreach($_venda as $venda)
|
24 |
-
{
|
25 |
-
$tokenpagamento = $venda['xml_return'];
|
26 |
-
$bandeira = $venda['bandeira'];
|
27 |
-
$formadepagamento = $venda['formapg'];
|
28 |
-
$orderid = $venda['sale_id'];
|
29 |
-
}
|
30 |
-
}
|
31 |
-
else
|
32 |
-
{
|
33 |
-
$connR = Mage::getSingleton('core/resource')->getConnection('core_read');
|
34 |
-
$sql = "SELECT *
|
35 |
-
FROM moip
|
36 |
-
WHERE realorder_id IN (".$order.") AND status ='Sucesso'";
|
37 |
-
$_venda = $connR->fetchAll($sql);
|
38 |
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
$
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
}
|
49 |
-
}
|
50 |
-
$imagem = $this->getSkinUrl('O2TI/moip/imagem/'.$bandeira.'.png');
|
51 |
-
if($formadepagamento == "BoletoBancario"){
|
52 |
-
$html = "<b> Pago via </b>". $titulo .", por: </br><b>" . $formadepagamento . "</b></br><img src='" . $imagem . "' style='width:80px;float:left;margin:5px;' border='0'>" . "<div id='repagar'><a href='https://www.moip.com.br/Instrucao.do?token=".$tokenpagamento."' style='background: none repeat scroll 0 0 #337BAA;margin:10px;border-radius:3px;padding:10px 5px;width:140px;float:left; text-align:center;color:#ffffff;font-weight:normal;font-size:13px;display:block;text-decoration:none;font-family:Arial,Helvetica,sans-serif' target='_blank'>Imprimir Boleto</a></div>";
|
53 |
-
}
|
54 |
-
if($formadepagamento == "DebitoBancario"){
|
55 |
-
$html = "<b> Pago via </b>". $titulo .", por: </br><b>" . $formadepagamento . "</b></br><img src='" . $imagem . "' style='width:80px;float:left;margin:5px;' border='0'>" . "<div id='repagar'><a href='https://www.moip.com.br/Instrucao.do?token=".$tokenpagamento."' style='background: none repeat scroll 0 0 #337BAA;margin:10px;border-radius:3px;padding:10px 5px;width:140px;float:left; text-align:center;color:#ffffff;font-weight:normal;font-size:13px;display:block;text-decoration:none;font-family:Arial,Helvetica,sans-serif' target='_blank'>Realizar Transferência</a></div>";
|
56 |
-
}
|
57 |
-
if($formadepagamento == "CartaoCredito"){
|
58 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
59 |
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
$urldosite = Mage::getBaseUrl('web', true);
|
66 |
-
$url = $urldosite."Moip/standard/redirect/";
|
67 |
-
if ($num_parcelas == "")
|
68 |
-
{
|
69 |
-
$num_parcelas = "Acesse seu cadastro";
|
70 |
-
}
|
71 |
-
if ($ult_dig == "")
|
72 |
-
{
|
73 |
-
$ult_dig = "Acesse seu cadastro";
|
74 |
-
}
|
75 |
-
$html = "<div>
|
76 |
-
<b> Pago via </b>{$titulo}, por: </br>
|
77 |
-
<b>{$formadepagamento}</b></br>
|
78 |
-
<img src='{$imagem}' style='width:80px;float:left;margin:5px;' border='0'>" . "
|
79 |
-
<div>Bandeira:<b> {$bandeira}</b></div>
|
80 |
-
<div>Pago em: <b>{$num_parcelas}</b> parcela(s)</div>
|
81 |
-
<div>4 últimos dígitos do cartão: <b>{$ult_dig}</b></div>
|
82 |
-
</div>";
|
83 |
|
84 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
85 |
|
|
|
|
|
|
|
|
|
|
|
86 |
|
87 |
-
|
88 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/* Mage::getModel("sales/order")->getCollection()->getLastItem()->getIncrementId(); */
|
3 |
+
$css_email = "display: block;float: left;clear: both !important;border-radius: 10px;color: #fff;font-size: 16pt;font-weight: bold;text-align: center;text-transform: uppercase;position: relative;margin-left: 70px;margin-top: 10px;margin-bottom: 25px;background: #ff9900;background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJod…EiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+);
|
4 |
+
background: -moz-linear-gradient(top, #ff9900 0%, #ff6600 100%);background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ff9900), color-stop(100%,#ff6600));
|
5 |
+
background: -webkit-linear-gradient(top, #ff9900 0%,#ff6600 100%);background: -o-linear-gradient(top, #ff9900 0%,#ff6600 100%);background: -ms-linear-gradient(top, #ff9900 0%,#ff6600 100%);background: linear-gradient(to bottom, #ff9900 0%,#ff6600 100%);filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ff9900', endColorstr='#ff6600',GradientType=0 );line-height: 20px;position: relative;";
|
6 |
+
$css_boleto = "padding: 15px 20px 15px 55px;border: 0;";
|
7 |
+
$css_trans = "padding: 20px 20px 20px 40px";
|
8 |
+
$css_email_img = "position: absolute !important;left: -70px !important;top: -20px !important;min-height: 100px;width: 115px;";
|
9 |
+
?>
|
10 |
+
<?php $info = $this->_prepareInfo(); ?>
|
11 |
+
<?php if($info['result_meio'] == "Cartão de Crédito"): ?>
|
12 |
+
<div class="cartao" style="width:100%">
|
13 |
+
<h4>Pago em <?php echo $info['creditcard_parc']; ?> parcelas via:</h4>
|
14 |
+
</div>
|
15 |
+
<div class="cartao" style="width:100%">
|
16 |
+
<div class="image" style="width:20%; float:left;">
|
17 |
+
<?php $imagem = $info['brand']; ?>
|
18 |
+
<div class="image" style="padding:5px"><img src="<?php echo $this->getSkinUrl('O2TI/moip/imagem/'); echo "Visa"; echo ".png"; ?>"></div>
|
19 |
+
</div>
|
20 |
+
<div class="dados" style="width:80%; float:left">
|
21 |
+
<label>6 Primeiros dígitos do cartão</label>
|
22 |
+
<div class="input-text"><strong><?php echo $info['first6'] ?></strong></div>
|
23 |
+
<label>4 Últimos dígitos do cartão</label>
|
24 |
+
<div class="input-text"><strong><?php echo $info['last4'] ?></strong></div>
|
25 |
+
</div>
|
26 |
+
</div>
|
27 |
+
<?php endif ?>
|
28 |
|
29 |
+
|
30 |
+
<?php if($info['result_meio'] == "Boleto Bancário"): ?>
|
31 |
+
<div class="metodo title"><h3><?php echo $info['result_meio'] ?></h3></div>
|
32 |
+
<div style="clear:both; width:100%;">
|
33 |
+
<button style="<?php echo $css_email.$css_boleto ?>" onclick="window.location='<?php echo $info['url'] ?>'" ><div style="<?php echo $css_email_img; ?>background:url(<?php echo $this->getSkinUrl('O2TI/moip/imagem/printer.png');echo") no-repeat;"; ?>"/></div>Visualize o boleto aqui</span></button>
|
34 |
+
</div></br>
|
35 |
+
<div class="boleto_line_title"><h4>Ou Cópie o endereço:</h4></div>
|
36 |
+
<div class="boleto_line"><input type="text" class="input-text" value="<?php echo $info['url'] ?>" readonly="true" style="width:350px"></div>
|
37 |
+
<?php endif ?>
|
38 |
|
39 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
|
41 |
+
<?php if($info['result_meio'] == "Transferência Bancária"): ?>
|
42 |
+
<div class="metodo title"><h3><?php echo $info['result_meio'] ?></h3></div>
|
43 |
+
<div class="trans" style="width:100%">
|
44 |
+
<div style="clear:both;width:100%"><button type="button" title="Finalizar compra" style="<?php echo $css_email.$css_trans ?>" onclick="window.location='<?php echo $info['url'] ?>'"><div style="<?php echo $css_email_img; ?>background:url(<?php echo $this->getSkinUrl('O2TI/moip/imagem/bank-icon.png');echo") no-repeat;"; ?>"/></div>Ir ao Banco</button></div>
|
45 |
+
<div class="boleto_line_title" style="clear:both;width:100%"><h4>Ou Cole a Url na Barra do Navegador:</h4></div>
|
46 |
+
<div class="boleto_line" style="clear:both;width:100%"><input type="text" class="input-text" value="<?php echo $info['url'] ?>" readonly="true" style="width:350px"></div>
|
47 |
+
</div>
|
48 |
+
<?php endif ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
49 |
|
50 |
+
<?php if(Mage::app()->getRequest()->getModuleName() == "sales"): ?>
|
51 |
+
<?php
|
52 |
+
$api = Mage::getModel('moip/api');
|
53 |
+
$resposta_moip = $info['token'];
|
54 |
+
if (Mage::getSingleton('moip/standard')->getConfigData('ambiente') == "teste") {
|
55 |
+
$url = "https://desenvolvedor.moip.com.br/sandbox/Instrucao.do?token=";
|
56 |
+
$urljs = "https://desenvolvedor.moip.com.br/sandbox/";
|
57 |
+
}
|
58 |
+
else {
|
59 |
+
$url = "https://www.moip.com.br/Instrucao.do?token=";
|
60 |
+
$urljs = "https://www.moip.com.br/";
|
61 |
+
}
|
62 |
+
?>
|
63 |
+
<script type="text/javascript" charset="ISO-8859-1" src="<?php echo $urljs ?>/transparente/MoipWidget-v2.js" onerror="erro_mail('erro caiu o moip widget')" ></script>
|
64 |
+
<div id="MoipWidget" data-token="<?php echo $info['token'] ?>" callback-method-error="erroValidacao" callback-method-success="sucesso"></div>
|
65 |
+
<div class="refaz_pg" style="clear:both;width:100%">
|
66 |
+
<div>
|
67 |
+
<button type="button" title="Finalizar compra" style="background:none repeat scroll 0 0 #337baa;margin:10px;border-radius:3px;padding:10px 5px;width:250px;float:left;text-align:center;color:#ffffff;font-weight:normal;font-size:13px;display:block;text-decoration:none;font-family:Arial,Helvetica,sans-serif;border: none;margin-top: 10px !important;" onclick="jQuery('#showXml').modal('toggle')">
|
68 |
+
Escolher outra forma de pagamento
|
69 |
+
</button>
|
70 |
+
</div>
|
71 |
+
</div>
|
72 |
+
<div class="modal" id="showXml" style="display:none; width:38%; left:52%; min-width:250px;">
|
73 |
+
<div class="modal-header">
|
74 |
+
<button class="close" data-dismiss="modal">x</button><h3>Escolha a nova forma de pagamento.</h3>
|
75 |
+
</div>
|
76 |
+
<div class="modal-body">
|
77 |
+
<h4>Você poderá escolher uma nova forma de pagamento, selecionando os meios disponíveis a baixo:</h4>
|
78 |
+
<div style="display: none;" id="loading-mask">
|
79 |
+
<p id="loading_mask_loader" class="loader"><img alt="Loading..." src="<?php echo $this->getSkinUrl('O2TI/onestepcheckout/images/ajax-loader-tr.gif')?>"><br>Realizando pagamento, por favor aguarde...</p>
|
80 |
+
</div>
|
81 |
|
82 |
+
<form method="POST" action='<?php echo Mage::getBaseUrl(); ?>moip/index/Novaforma/' id="refaz_pg_forma">
|
83 |
+
<input type="hidden" name="forma_de_pagamento" id="forma_de_pagamento" value="" >
|
84 |
+
<input type="hidden" name="moip_id" value="<?php echo $info['token'] ?>">
|
85 |
+
<input type="hidden" name="order_id" value="<?php echo $info['realorder_id'] ?>">
|
86 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
87 |
|
88 |
+
<div class= "seleciona_meio" style="border-bottom:2px solid #eeeee0;">
|
89 |
+
<ul class="inline input-switcher moip-payment-methods" style="display: inline-flex;">
|
90 |
+
<li data-target="CartaoCredito" class='moip-payment-method-line' style="padding: 10px 15px;background: #EEE;border-radius: 5px 5px 0 0;margin-right: 10px;cursor:pointer;">
|
91 |
+
Cartão de Crédito
|
92 |
+
</li>
|
93 |
+
<li data-target="BoletoBancario" class='moip-payment-method-line' style="padding: 10px 15px;background: #EEE;border-radius: 5px 5px 0 0;margin-right: 10px;cursor:pointer;">
|
94 |
+
Boleto Bancário
|
95 |
+
</li>
|
96 |
+
<li data-target="DebitoBancario" class='moip-payment-method-line' style="padding: 10px 15px;background: #EEE;border-radius: 5px 5px 0 0;margin-right: 10px;cursor:pointer;">
|
97 |
+
Débito Bancário
|
98 |
+
</li>
|
99 |
+
</ul>
|
100 |
+
</div>
|
101 |
+
|
102 |
+
|
103 |
+
<div class="moip-payment-method-content row-fluid" id="DebitoBancario" style="display:none">
|
104 |
+
<h2>Transferência Bancária</h2>
|
105 |
+
<div style="width:100%">É obrigatório ter token do banco para realizar esse processo.</div>
|
106 |
+
<div><h4>Selecione o Banco.</h4></div>
|
107 |
+
<div>
|
108 |
+
<ul>
|
109 |
+
<li><label><input type="radio" name="instituicao" id="instituicao" value="BancodoBrasil" onclick="jQuery('.pagar_trans').show()"> Banco do Brasil</label></li>
|
110 |
+
<li><label><input type="radio" name="instituicao" id="instituicao" value="Bradesco" onclick="jQuery('.pagar_trans').show()"> Bradesco</label></li>
|
111 |
+
<li><label><input type="radio" name="instituicao" id="instituicao" value="Itau" onclick="jQuery('.pagar_trans').show()"> Itaú</label></li>
|
112 |
+
<li><label><input type="radio" name="instituicao" id="instituicao" value="Banrisul" onclick="jQuery('.pagar_trans').show()"> Banrisul</label></li>
|
113 |
+
</ul>
|
114 |
|
115 |
+
</div>
|
116 |
+
<div class="pagar_trans" style="display:none;">
|
117 |
+
<button id="sendToMoip2" style="margin-top: 10px;" class="btn-moip buttonmoip" onclick="jQuery('#loading-mask').show();jQuery('#refaz_pg_form').hide('slow');">Pagar Agora</button>
|
118 |
+
</div>
|
119 |
+
</div>
|
120 |
|
121 |
+
<div class="moip-payment-method-content row-fluid" id="BoletoBancario" style="display:none">
|
122 |
+
<h2>Boleto Bancário</h2>
|
123 |
+
<div>Pagável até a data do vencimento em qualquer Casa lotérica, via internet-bank ou caixa eletrônico do seu banco.</div>
|
124 |
+
<button id="sendToMoip2" style="margin-top: 10px;" class="btn-moip buttonmoip" onclick="jQuery('#loading-mask').show();jQuery('#refaz_pg_form').hide('slow');">Pagar Agora</button>
|
125 |
+
</div>
|
126 |
+
|
127 |
+
<div class="moip-payment-method-content row-fluid" id="CartaoCredito" style="display:none">
|
128 |
+
<div class="well">
|
129 |
+
<ul class="repay-form">
|
130 |
+
<div class="cartao_dados">
|
131 |
+
<li>
|
132 |
+
<h3>Dados do Cartão</h3>
|
133 |
+
</li>
|
134 |
+
<li>
|
135 |
+
<label>Parcelas:</label>
|
136 |
+
<?php $pgtoArray = $this->getOrder_dados(Mage::registry('client_array')); ?>
|
137 |
+
<?php $order = Mage::getModel('sales/order')->loadByIncrementId($info['realorder_id']); ?>
|
138 |
+
<?php $parcelamento = $api->getParcelamento(number_format($order->getGrand_total(), 2, ".", ".")); $z=0;?>
|
139 |
+
<select id="Parcelas" name="parcelas">
|
140 |
+
<?php foreach ($parcelamento as $k => $v):?>
|
141 |
+
<?php if($z=="0"){ ?>
|
142 |
+
<option value="1">Pagamento à vista.</option>
|
143 |
+
<?php } ?>
|
144 |
+
<option value="<?php echo $k ?>"><?php echo $k . "x R$ " . $v['valor'] . " | Total: R$ " .$v['total']."" ?></option>
|
145 |
+
<?php $z++; endforeach; ?>
|
146 |
+
</select>
|
147 |
+
</li>
|
148 |
+
<li>
|
149 |
+
<label>Instituição:</label>
|
150 |
+
<select id="bandeira" name="bandeira">
|
151 |
+
<option value="VISA">Visa</option>
|
152 |
+
<option value="MASTERCARD">Mastercard</option>
|
153 |
+
<option value="AMERICANEXPRESS">AmericanExpress</option>
|
154 |
+
<option value="HIPERCARD">Hipercard</option>
|
155 |
+
<option value="DINERS">Diners</option>
|
156 |
+
</select>
|
157 |
+
</li>
|
158 |
+
<li>
|
159 |
+
<div>
|
160 |
+
<label>Numero do Cartão:</label>
|
161 |
+
<input type="text" id="Numero" name="Numero" class="input-text" >
|
162 |
+
</div>
|
163 |
+
<div>
|
164 |
+
<label>CVV:</label>
|
165 |
+
<input type="text" id="CodigoSeguranca" class="input-text" name="CodigoSeguranca" size="4">
|
166 |
+
</div>
|
167 |
+
</li>
|
168 |
+
<li>
|
169 |
+
<label>Expiração:</label>
|
170 |
+
<input type="text" id="Expiracao" name="Expiracao_mes" onkeypress="return txtBoxFormat(this, '99', event);" maxlength="2" placeholder="Ex. 10/15" size="2" class="input-text" >
|
171 |
+
<input type="text" id="Expiracao" name="Expiracao_ano" onkeypress="return txtBoxFormat(this, '99', event);" maxlength="2" placeholder="Ex. 10/15" size="2" class="input-text" >
|
172 |
+
</li>
|
173 |
+
<li>
|
174 |
+
<button type="button" id="sendToMoip2" class="btn-moip buttonmoip" style="margin-top: 10px !important;" onclick="jQuery('.cartao_dados').hide();jQuery('.pagador_dados_pessoais').show('slow');">Prosseguir</button>
|
175 |
+
</li>
|
176 |
+
</div>
|
177 |
+
<div class="pagador_dados_pessoais" style="display:none">
|
178 |
+
<li>
|
179 |
+
<h3>Dados do Títular do Cartão</h3>
|
180 |
+
</li>
|
181 |
+
<li>
|
182 |
+
<label>Portador:</label>
|
183 |
+
<input type="text" id="Portador" name="Portador" class="input-text" >
|
184 |
+
</li>
|
185 |
+
<li>
|
186 |
+
<label>CPF:</label>
|
187 |
+
<input type="text" id="CPF" name="CPF" class="input-text" onkeypress="return txtBoxFormat(this, '99999999999', event);" maxlength="11">
|
188 |
+
</li>
|
189 |
+
<li>
|
190 |
+
<label>Data Nascimento:</label>
|
191 |
+
<input type="text" id="DataNascimento" name="DataNascimento" onkeypress="return txtBoxFormat(this, '99/99/9999', event);" maxlength="10" placeholder="Ex. 10/10/1985" class="input-text" ><br>
|
192 |
+
</li>
|
193 |
+
<li>
|
194 |
+
<label>Telefone:</label>
|
195 |
+
<input type="text" id="Telefone" name="Telefone" onkeypress="return txtBoxFormat(this, '(99)9999-9999', event);" placeholder="Ex. (11)9999-9999" maxlength="14" class="input-text" ><br>
|
196 |
+
</li>
|
197 |
+
<li>
|
198 |
+
<a href="#" style="margin-top: 10px !important; float:left" onclick="jQuery('.cartao_dados').show('slow');jQuery('.pagador_dados_pessoais').hide();">← Voltar</a>
|
199 |
+
<button id="sendToMoip2" class="btn-moip buttonmoip" style="margin-top: -30px !important; float:left" onclick="jQuery('#loading-mask').show();jQuery('#refaz_pg_form').hide('slow');">Pagar Agora</button>
|
200 |
+
</li>
|
201 |
+
</div>
|
202 |
+
</ul>
|
203 |
+
</div>
|
204 |
+
</div>
|
205 |
+
</form>
|
206 |
+
<div class="resposta_recebida"></div>
|
207 |
+
</div>
|
208 |
+
</div>
|
209 |
+
<script type="text/javascript">
|
210 |
+
jQuery(document).ready(function() {
|
211 |
+
jQuery('.input-switcher > li').bind({
|
212 |
+
click: function() {
|
213 |
+
jQuery(this).parent().children('li').fadeTo(300, 0.4);
|
214 |
+
jQuery('#checkout-payment-bandeira').hide();
|
215 |
+
jQuery('#checkout-payment-banco').hide();
|
216 |
+
jQuery(this).fadeTo(0, 1);
|
217 |
+
jQuery(this).find('input[type="radio"]').attr('checked', true);
|
218 |
+
}
|
219 |
+
});
|
220 |
+
jQuery('.moip-payment-methods > li').bind({
|
221 |
+
click: function() {
|
222 |
+
jQuery('.moip-payment-method-content').not('#' + jQuery(this).attr('data-target')).slideUp();
|
223 |
+
jQuery('#' + jQuery(this).attr('data-target')).slideDown();
|
224 |
+
jQuery('#forma_de_pagamento').val(jQuery(this).attr('data-target'));
|
225 |
+
}
|
226 |
+
});
|
227 |
+
});
|
228 |
+
|
229 |
+
var sucesso = function(data){
|
230 |
+
console.log("ven"+JSON.stringify(data));
|
231 |
+
|
232 |
+
}
|
233 |
+
var erroValidacao = function(data) {
|
234 |
+
console.log("cer"+JSON.stringify(data));
|
235 |
+
}
|
236 |
+
jQuery("#refaz_pg_forma").submit(function(e){
|
237 |
+
var postData = jQuery(this).serializeArray();
|
238 |
+
var formURL = jQuery(this).attr("action");
|
239 |
+
jQuery.ajax(
|
240 |
+
{
|
241 |
+
url : formURL,
|
242 |
+
type: "POST",
|
243 |
+
data : postData,
|
244 |
+
success:function(data, textStatus, jqXHR)
|
245 |
+
{
|
246 |
+
jQuery("#loading-mask").hide();
|
247 |
+
|
248 |
+
if(jQuery("#forma_de_pagamento").val() == "BoletoBancario"){
|
249 |
+
var settings = {
|
250 |
+
"Forma" : "BoletoBancario"
|
251 |
+
};
|
252 |
+
};
|
253 |
+
if(jQuery("#forma_de_pagamento").val() == "DebitoBancario"){
|
254 |
+
var settings = {
|
255 |
+
"Forma" : "DebitoBancario",
|
256 |
+
"Instituicao": "BancoDoBrasil"
|
257 |
+
};
|
258 |
+
};
|
259 |
+
if(jQuery("#forma_de_pagamento").val() == "CartaoCredito")
|
260 |
+
{
|
261 |
+
var settings =
|
262 |
+
{
|
263 |
+
"Forma": "CartaoCredito",
|
264 |
+
"Instituicao": jQuery("#bandeira").val(),
|
265 |
+
"Parcelas": jQuery("#Parcelas").val(),
|
266 |
+
"CartaoCredito":
|
267 |
+
{
|
268 |
+
"Numero": jQuery("input[name=Numero]").val(),
|
269 |
+
"Expiracao": jQuery("input[name=Expiracao_mes]").val()+'/'+jQuery("input[name=Expiracao_ano]").val(),
|
270 |
+
"CodigoSeguranca": jQuery("input[name=CodigoSeguranca]").val(),
|
271 |
+
"Portador": {
|
272 |
+
"Nome" : jQuery("input[name=Portador]").val(),
|
273 |
+
"DataNascimento": jQuery("input[name=DataNascimento]").val(),
|
274 |
+
"Telefone": jQuery("input[name=Telefone]").val(),
|
275 |
+
"Identidade": jQuery("input[name=CPF]").val()
|
276 |
+
}
|
277 |
+
}
|
278 |
+
}
|
279 |
+
};
|
280 |
+
console.log(settings);
|
281 |
+
MoipWidget(settings);
|
282 |
+
},
|
283 |
+
|
284 |
+
});
|
285 |
+
e.preventDefault();
|
286 |
+
});
|
287 |
+
|
288 |
+
|
289 |
+
</script>
|
290 |
+
<?php endif; ?>
|
app/design/frontend/default/default/layout/o2ti_moip.xml
CHANGED
@@ -3,6 +3,14 @@
|
|
3 |
<sales>
|
4 |
<block type="Moip/Standard_Info" name="moip.info" template="O2TI/moip/info.phtml"></block>
|
5 |
</sales>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
<moip_standard_redirect>
|
7 |
<reference name="head">
|
8 |
<action method="addJs"><script>O2TI/jquery.js</script></action>
|
@@ -12,29 +20,67 @@
|
|
12 |
<action method="addJs"><script>O2TI/onestepcheckout/novamascara.js</script></action>
|
13 |
<action method="addJs"><script>O2TI/onestepcheckout/validacao.js</script></action>
|
14 |
<action method="addCss"><stylesheet>O2TI/moip/css/bootstrap.css</stylesheet></action>
|
15 |
-
<!-- estes são exemplos de como remover outros js do site
|
16 |
-
use o <type>skin_js</type> se o js estiver na pasta skin
|
17 |
-
<action method="removeItem"><type>skin_js</type><name>js/jquery.js</name></action>
|
18 |
-
ou use <type>js</type> caso o js da pasta pasta_da_loja/js
|
19 |
-
<action method="removeItem"><type>js</type><name>js/jquery.js</name></action>
|
20 |
-
-->
|
21 |
</reference>
|
22 |
<reference name="root">
|
23 |
<action method="setTemplate"><template>page/1column.phtml</template></action>
|
24 |
</reference>
|
25 |
-
<reference name="
|
26 |
-
<block type="
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
|
|
|
|
|
|
36 |
</block>
|
37 |
</reference>
|
|
|
38 |
</moip_standard_redirect>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
39 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
</layout>
|
3 |
<sales>
|
4 |
<block type="Moip/Standard_Info" name="moip.info" template="O2TI/moip/info.phtml"></block>
|
5 |
</sales>
|
6 |
+
<checkout_onepage_index>
|
7 |
+
<reference name="head">
|
8 |
+
<action method="addJs"><script>O2TI/jquery.js</script></action>
|
9 |
+
<action method="addJs"><script>O2TI/onestepcheckout/noConflict.js</script></action>
|
10 |
+
<action method="addJs"><script>O2TI/onestepcheckout/novamascara.js</script></action>
|
11 |
+
<action method="addJs"><script>O2TI/onestepcheckout/validacao.js</script></action>
|
12 |
+
</reference>
|
13 |
+
</checkout_onepage_index>
|
14 |
<moip_standard_redirect>
|
15 |
<reference name="head">
|
16 |
<action method="addJs"><script>O2TI/jquery.js</script></action>
|
20 |
<action method="addJs"><script>O2TI/onestepcheckout/novamascara.js</script></action>
|
21 |
<action method="addJs"><script>O2TI/onestepcheckout/validacao.js</script></action>
|
22 |
<action method="addCss"><stylesheet>O2TI/moip/css/bootstrap.css</stylesheet></action>
|
23 |
+
<!-- estes são exemplos de como remover outros js do site
|
24 |
+
use o <type>skin_js</type> se o js estiver na pasta skin
|
25 |
+
<action method="removeItem"><type>skin_js</type><name>js/jquery.js</name></action>
|
26 |
+
ou use <type>js</type> caso o js da pasta pasta_da_loja/js
|
27 |
+
<action method="removeItem"><type>js</type><name>js/jquery.js</name></action>
|
28 |
+
-->
|
29 |
</reference>
|
30 |
<reference name="root">
|
31 |
<action method="setTemplate"><template>page/1column.phtml</template></action>
|
32 |
</reference>
|
33 |
+
<reference name="left">
|
34 |
+
<block type="O2TI_Moip_Block_Standard_Redirect" name="moip.comum" template="O2TI/moip/redirect.phtml">
|
35 |
+
</block>
|
36 |
+
<block type="O2TI_Moip_Block_Standard_Redirect" name="moip.transferencia" template="O2TI/moip/transferencia.phtml">
|
37 |
+
</block>
|
38 |
+
<block type="O2TI_Moip_Block_Standard_Redirect" name="moip.boleto" template="O2TI/moip/boleto.phtml">
|
39 |
+
<block type="O2TI_Moip_Block_Standard_Redirect" name="cartao_form" template="O2TI/moip/layout_boleto.phtml">
|
40 |
+
<action method="setBlockId"><block_id>cartao_form</block_id></action>
|
41 |
+
</block>
|
42 |
+
</block>
|
43 |
+
<block type="O2TI_Moip_Block_Standard_Redirect" name="moip.cartao" template="O2TI/moip/cartao.phtml">
|
44 |
+
<block type="O2TI_Moip_Block_Standard_Redirect" name="cartao_form" template="O2TI/moip/refaz.phtml">
|
45 |
+
<action method="setBlockId"><block_id>cartao_form</block_id></action>
|
46 |
+
</block>
|
47 |
</block>
|
48 |
</reference>
|
49 |
+
|
50 |
</moip_standard_redirect>
|
51 |
+
|
52 |
+
<moip_index_index>
|
53 |
+
<reference name="root">
|
54 |
+
<action method="setTemplate"><template>O2TI/moip/emptyupdate.phtml</template></action>
|
55 |
+
</reference>
|
56 |
+
</moip_index_index>
|
57 |
+
|
58 |
+
<moip_index_novaforma>
|
59 |
+
<reference name="root">
|
60 |
+
<action method="setTemplate"><template>page/1column.phtml</template></action>
|
61 |
+
</reference>
|
62 |
+
</moip_index_novaforma>
|
63 |
|
64 |
+
<sales_order_view>
|
65 |
+
<reference name="head">
|
66 |
+
<action method="addJs"><script>O2TI/jquery.js</script></action>
|
67 |
+
<action method="addJs"><script>O2TI/jquery_noconflict.js</script></action>
|
68 |
+
<action method="addJs"><script>O2TI/moip/bootstrap.min.js</script></action>
|
69 |
+
<action method="addJs"><script>O2TI/moip/bootstrap-modal.js</script></action>
|
70 |
+
<action method="addJs"><script>O2TI/onestepcheckout/novamascara.js</script></action>
|
71 |
+
<action method="addJs"><script>O2TI/onestepcheckout/validacao.js</script></action>
|
72 |
+
<action method="addCss"><stylesheet>O2TI/moip/css/bootstrap.css</stylesheet></action>
|
73 |
+
</reference>
|
74 |
+
</sales_order_view>
|
75 |
+
|
76 |
+
<moip_info>
|
77 |
+
<reference name="content">
|
78 |
+
<action method="setTemplate"><template>O2TI/moip/info.phtml</template></action>
|
79 |
+
<block type="O2TI_Moip_Block_Info" name="moip_info" template="O2TI/moip/info.phtml">
|
80 |
+
<block type="O2TI_Moip_Block_Info" name="moip.info" template="O2TI/moip/form.phtml">
|
81 |
+
<action method="setBlockId"><block_id>refaz_forma</block_id></action>
|
82 |
+
</block>
|
83 |
+
</block>
|
84 |
+
</reference>
|
85 |
+
</moip_info>
|
86 |
</layout>
|
app/design/frontend/default/default/template/O2TI/moip/Novaforma.phtml
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
dasdasdsadsa
|
app/design/frontend/default/default/template/O2TI/moip/boleto.phtml
ADDED
@@ -0,0 +1,81 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php $session = Mage::getSingleton('checkout/session'); ?>
|
2 |
+
<?php $result_decode = $session->getResult_decode(); ?>
|
3 |
+
<?php $client_array = $session->getClient_array(); ?>
|
4 |
+
<?php $pgtoArraya = $session->getPgtoarry(); ?>
|
5 |
+
<?php $pgtoArray = $this->getOrder_dados($client_array);
|
6 |
+
$customerData = "";
|
7 |
+
if(Mage::getSingleton('customer/session')->isLoggedIn()) {
|
8 |
+
$customerData = Mage::getSingleton('customer/session')->getCustomer();
|
9 |
+
}
|
10 |
+
if (Mage::getSingleton('moip/standard')->getConfigData('ambiente') == "teste") {
|
11 |
+
$url = "https://desenvolvedor.moip.com.br/sandbox/Instrucao.do?token=";
|
12 |
+
$urljs = "https://desenvolvedor.moip.com.br/sandbox/";
|
13 |
+
}
|
14 |
+
else {
|
15 |
+
$url = "https://www.moip.com.br/Instrucao.do?token=";
|
16 |
+
$urljs = "https://www.moip.com.br/";
|
17 |
+
}
|
18 |
+
?>
|
19 |
+
<?php $order = Mage::getModel('sales/order')->loadByIncrementId($pgtoArray['id_transacao']); ?>
|
20 |
+
<?php $this->getSaveDate($pgtoArray['id_transacao'], $result_decode, $customerData, $pgtoArraya, $client_array); ?>
|
21 |
+
|
22 |
+
<script type="text/javascript" charset="ISO-8859-1" src="<?php echo $urljs ?>/transparente/MoipWidget-v2.js" onerror="erro_mail('erro caiu o moip widget')" ></script>
|
23 |
+
<div id="MoipWidget" data-token="<?php echo $result_decode['token'] ?>" callback-method-error="erroValidacao" callback-method-success="sucesso"></div>
|
24 |
+
<div class="row grid-full">
|
25 |
+
<div class="grid12-12">
|
26 |
+
<h3>Seu pedido foi enviado com sucesso, <strong><?php echo $client_array['pagador_nome'] ?></strong>!</h3>
|
27 |
+
|
28 |
+
<div class="corpo_moip grid12-5 alpha">
|
29 |
+
<div class="method-type boleto-title">
|
30 |
+
<h3>Falta apenas um passo para finalizar sua compra.</h3>
|
31 |
+
<h4>Imprima seu boleto e faça o pagamento em qualquer banco.</h4>
|
32 |
+
</div>
|
33 |
+
<button class="btn-moip btn-boleto buttonmoip" onclick="abre_boleto()" ><img src="<?php echo $this->getSkinUrl('O2TI/moip/imagem/printer.png') ?>" alt="" />Visualize o boleto<span>clique aqui</span></button>
|
34 |
+
<div class="row boleto-can-pay">
|
35 |
+
<strong>
|
36 |
+
<h3>Você sabia que:</h3>
|
37 |
+
</strong>
|
38 |
+
<h3>Pode pagar o seu boleto bancário pelo celular ou pela internet?</h3>
|
39 |
+
<h3></h3>
|
40 |
+
</div>
|
41 |
+
</div>
|
42 |
+
<div class="col-md-6 grid12-6 omega">
|
43 |
+
<div class="order-id-wrapper">
|
44 |
+
<p>O número do seu pedido é:</p>
|
45 |
+
<span class="order-id">#<?php echo $pgtoArray['id_transacao'] ?></span>
|
46 |
+
<h4>Seu pedido será enviado por <?php echo $order->getShippingDescription(); ?></h4>
|
47 |
+
</div>
|
48 |
+
<div class="row">
|
49 |
+
<a href="<?php echo Mage::helper('core/url')->getHomeUrl(); ?>" class="back-to-store">Voltar para a home</a>
|
50 |
+
</div>
|
51 |
+
</div>
|
52 |
+
</div>
|
53 |
+
</div>
|
54 |
+
|
55 |
+
<!-- js importantes não alterem -->
|
56 |
+
<script type="text/javascript">
|
57 |
+
jQuery(document).ready(function(){
|
58 |
+
jQuery('body').append('<div class="modal" id="showXml" ><div class="modal-header"><button class="close" data-dismiss="modal">x</button><h3>Boleto Bancário - Bradesco</h3></div><div class="modal-body"></div></div>');
|
59 |
+
jQuery('#showXml').modal('toggle');
|
60 |
+
});
|
61 |
+
function abre_boleto(){
|
62 |
+
jQuery('#showXml').modal('toggle');
|
63 |
+
};
|
64 |
+
</script>
|
65 |
+
<script type="text/javascript">
|
66 |
+
jQuery(document).ready(function(){
|
67 |
+
jQuery("#token").val("<?php echo $result_decode['token'] ?>");
|
68 |
+
var settings =
|
69 |
+
<?php echo $this->getJson($pgtoArraya); ?>
|
70 |
+
;
|
71 |
+
MoipWidget(settings);
|
72 |
+
|
73 |
+
});
|
74 |
+
var sucesso = function(data){
|
75 |
+
jQuery(".modal-body").append("<iframe hspace=\"0\" vspace=\"0\" width=\"650\" height=\"900\" scrolling= \"no\" frameBorder=\"0\" allowtransparency=\"true\" src=\"<?php echo $urljs ?>/Instrucao.do?token=<?php echo $result_decode['token'] ?>\"> </iframe>");
|
76 |
+
};
|
77 |
+
|
78 |
+
var erroValidacao = function(data){
|
79 |
+
alert(data);
|
80 |
+
};
|
81 |
+
</script>
|
app/design/frontend/default/default/template/O2TI/moip/cartao.phtml
ADDED
@@ -0,0 +1,192 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php $session = Mage::getSingleton('checkout/session'); ?>
|
2 |
+
<?php $result_decode = $session->getResult_decode(); ?>
|
3 |
+
<?php $client_array = $session->getClient_array(); ?>
|
4 |
+
<?php $pgtoArraya = $session->getPgtoarry(); ?>
|
5 |
+
<?php $pgtoArray = $this->getOrder_dados($client_array);
|
6 |
+
$customerData = "";
|
7 |
+
if(Mage::getSingleton('customer/session')->isLoggedIn()) {
|
8 |
+
$customerData = Mage::getSingleton('customer/session')->getCustomer();
|
9 |
+
}
|
10 |
+
if (Mage::getSingleton('moip/standard')->getConfigData('ambiente') == "teste") {
|
11 |
+
$url = "https://desenvolvedor.moip.com.br/sandbox/Instrucao.do?token=";
|
12 |
+
$urljs = "https://desenvolvedor.moip.com.br/sandbox/";
|
13 |
+
}
|
14 |
+
else {
|
15 |
+
$url = "https://www.moip.com.br/Instrucao.do?token=";
|
16 |
+
$urljs = "https://www.moip.com.br/";
|
17 |
+
}
|
18 |
+
?>
|
19 |
+
<?php $order = Mage::getModel('sales/order')->loadByIncrementId($pgtoArray['id_transacao']); ?>
|
20 |
+
<?php $this->getSaveDate($pgtoArray['id_transacao'], $result_decode, $customerData, $pgtoArraya, $client_array); ?>
|
21 |
+
|
22 |
+
<script type="text/javascript" charset="ISO-8859-1" src="<?php echo $urljs ?>/transparente/MoipWidget-v2.js" onerror="erro_mail('erro caiu o moip widget')" ></script>
|
23 |
+
<div id="MoipWidget" data-token="<?php echo $result_decode['token'] ?>" callback-method-error="erroValidacao" callback-method-success="sucesso"></div>
|
24 |
+
<div class="row grid-full">
|
25 |
+
<div class="section clearer grid12-12 ">
|
26 |
+
<h3>Seu pedido foi enviado com sucesso, <strong><?php echo $client_array['pagador_nome'] ?></strong>!</h3>
|
27 |
+
|
28 |
+
<div class="corpo_moip grid12-5 ">
|
29 |
+
<div class="pgcartao">
|
30 |
+
|
31 |
+
<div class="method-type cc-title">
|
32 |
+
<h3>Cartão de Crédito</h3>
|
33 |
+
<div class="loader"/>Por favor, aguarde!</br><img src="<?php echo $this->getSkinUrl('O2TI/moip/imagem/ajax-loader.gif'); ?>" border="0"></div>
|
34 |
+
</div>
|
35 |
+
<div id="pgcartao">
|
36 |
+
<div id="statusmoip"></div>
|
37 |
+
<div id="statusmoipadd"></div>
|
38 |
+
</div>
|
39 |
+
|
40 |
+
<div class="warning-block" style="display:none">
|
41 |
+
<h3>O Pagamento não pode ser realizado</h3>
|
42 |
+
<strong>Erros Apresentados:</strong>
|
43 |
+
<div class="error-msg"><ul class="erros_moip"></ul></div>
|
44 |
+
</div>
|
45 |
+
<div style="display: none;" id="loading-mask">
|
46 |
+
<p id="loading_mask_loader" class="loader"><img alt="Loading..." src="<?php echo $this->getSkinUrl('O2TI/onestepcheckout/images/ajax-loader-tr.gif')?>"><br>Realizando pagamento, por favor aguarde...</p>
|
47 |
+
</div>
|
48 |
+
<div class="repeat_cartao" style="display:none;clear:both;">
|
49 |
+
<div class="title_refaz"><h3>Você poderá refazer o pagamento usando o formulário abaixo</h3></div>
|
50 |
+
<?php echo $this->getChildHtml('cartao_form'); ?>
|
51 |
+
</div>
|
52 |
+
|
53 |
+
</div>
|
54 |
+
</div>
|
55 |
+
|
56 |
+
<div class="col-md-6 grid12-6 omega">
|
57 |
+
<div class="order-id-wrapper">
|
58 |
+
<p>O número do seu pedido é:</p>
|
59 |
+
<span class="order-id">#<?php echo $pgtoArray['id_transacao'] ?></span>
|
60 |
+
<h4>Seu pedido será enviado por <?php echo $order->getShippingDescription(); ?></h4>
|
61 |
+
</div>
|
62 |
+
<div class="warning-block">
|
63 |
+
<strong>Atenção:</strong> Você receberá um e-mail com a confirmação do seu pedido.
|
64 |
+
</div>
|
65 |
+
<div class="row">
|
66 |
+
<a href="<?php echo Mage::helper('core/url')->getHomeUrl(); ?>" class="back-to-store">Voltar para a home</a>
|
67 |
+
</div>
|
68 |
+
</div>
|
69 |
+
</div>
|
70 |
+
</div>
|
71 |
+
|
72 |
+
<script type="text/javascript">
|
73 |
+
var sucesso = function(data){
|
74 |
+
if (data.Status == "Cancelado"){
|
75 |
+
jQuery(".repeat_cartao").show();
|
76 |
+
jQuery(".warning-block").css({display:"block"});
|
77 |
+
jQuery(".loader").css({display:"none"});
|
78 |
+
jQuery("#statusmoip").html("<h3>Pagamento Cancelado</h3>");
|
79 |
+
jQuery("#statusmoipadd").html("Transação não aprovada.");
|
80 |
+
if(data.hasOwnProperty(data.Classificacao)){
|
81 |
+
var motivo = JSON.stringify(data.Classificacao.Descricao);
|
82 |
+
} else{
|
83 |
+
var motivo = "semretorno";
|
84 |
+
}
|
85 |
+
if(motivo == '"Desconhecido"'){
|
86 |
+
jQuery(".erros_moip").html("Seus dados estão incorretos ou não podemos envia-los a operadora de crédito.");
|
87 |
+
}
|
88 |
+
if(motivo == '"Transação não processada"'){
|
89 |
+
jQuery(".erros_moip").html("O pagamento não pode ser processado.</br>Por favor, tente novamente.</br>Caso o erro persista, entre em contato com o nosso atendimento.");
|
90 |
+
}
|
91 |
+
if(motivo == '"Política de segurança do Moip"'){
|
92 |
+
jQuery(".erros_moip").html("Pagamento não autorizado.</br>Entre em contato com o seu banco antes de uma nova tentativa.");
|
93 |
+
}
|
94 |
+
if(motivo == '"Política de segurança do Banco Emissor"'){
|
95 |
+
jQuery(".erros_moip").html("O pagamento não foi autorizado pelo Banco Emissor do seu Cartão.</br>Entre em contato com o Banco para entender o motivo e refazer o pagamento..");
|
96 |
+
}
|
97 |
+
if(motivo == '"Cartão vencido"'){
|
98 |
+
jQuery(".erros_moip").html("A validade do seu Cartão expirou.</br>Escolha outra forma de pagamento para concluir o pagamento.");
|
99 |
+
}
|
100 |
+
if(motivo == '"Dados inválidos"'){
|
101 |
+
jQuery(".erros_moip").html("Dados informados inválidos.</br>Você digitou algo errado durante o preenchimento dos dados do seu Cartão.</br>Certifique-se de que está usando o Cartão correto e faça uma nova tentativa.");
|
102 |
+
}
|
103 |
+
if(motivo =='semretorno' ){
|
104 |
+
jQuery(".erros_moip").html("Verifique os dados e tente pagar novamente.");
|
105 |
+
}
|
106 |
+
}
|
107 |
+
if (data.Status == "EmAnalise"){
|
108 |
+
jQuery(".loader").css({display:"none"});
|
109 |
+
jQuery("#statusmoip").html("<h3>Pagamento Aguardando Aprovação</h3>");
|
110 |
+
jQuery("#statusmoipadd").html("Por favor, aguarde a em análise da transação. Assim que for alterado o status você será informado via e-mail.");
|
111 |
+
|
112 |
+
}
|
113 |
+
if (data.Status == "Autorizado"){
|
114 |
+
jQuery(".loader").css({display:"none"});
|
115 |
+
jQuery("#statusmoip").html("<h3>Pagamento Aprovado</h3>");
|
116 |
+
jQuery("#statusmoipadd").html("Por favor, aguarde o processo de envio.");
|
117 |
+
|
118 |
+
}
|
119 |
+
}
|
120 |
+
var erroValidacao = function(data) {
|
121 |
+
jQuery(".repeat_cartao").show();
|
122 |
+
jQuery(".loading-mask").hide();
|
123 |
+
jQuery(".loader").css({display:"none"});
|
124 |
+
jQuery(".warning-block").show();
|
125 |
+
var infosMoip ="";
|
126 |
+
for (i=0; i<data.length; i++) {
|
127 |
+
Moip = data[i];
|
128 |
+
for(j in Moip)
|
129 |
+
{
|
130 |
+
atributo = j;
|
131 |
+
if(atributo == "Mensagem")
|
132 |
+
{
|
133 |
+
valor = Moip[j];
|
134 |
+
infosMoip = '<li class="erro" style="list-style: none;margin-left: 29px;font-weight: bold;">'+valor+'</li>';
|
135 |
+
}
|
136 |
+
}
|
137 |
+
jQuery(".erros_moip").html("");
|
138 |
+
jQuery(".erros_moip").append(infosMoip);
|
139 |
+
}
|
140 |
+
}
|
141 |
+
jQuery(document).ready(function(){
|
142 |
+
var settings = <?php echo $this->getJson($pgtoArraya); ?>;
|
143 |
+
MoipWidget(settings);
|
144 |
+
});
|
145 |
+
|
146 |
+
jQuery("#refazercartao").submit(function(e){
|
147 |
+
jQuery(".warning-block").hide();
|
148 |
+
jQuery(".title_refaz").hide();
|
149 |
+
jQuery("#pgcartao").hide();
|
150 |
+
jQuery(".loading-mask").show();
|
151 |
+
var postData = jQuery(this).serializeArray();
|
152 |
+
var formURL = jQuery(this).attr("action");
|
153 |
+
jQuery.ajax(
|
154 |
+
{
|
155 |
+
url : formURL,
|
156 |
+
type: "POST",
|
157 |
+
data : postData,
|
158 |
+
success:function(data, textStatus, jqXHR)
|
159 |
+
{
|
160 |
+
jQuery("#loading-mask").hide();
|
161 |
+
var settings =
|
162 |
+
{
|
163 |
+
"Forma": "CartaoCredito",
|
164 |
+
"Instituicao": jQuery("#bandeira").val(),
|
165 |
+
"Parcelas": jQuery("#Parcelas").val(),
|
166 |
+
"CartaoCredito":
|
167 |
+
{
|
168 |
+
"Numero": jQuery("input[name=Numero]").val(),
|
169 |
+
"Expiracao": jQuery("input[name=Expiracao_mes]").val()+'/'+jQuery("input[name=Expiracao_ano]").val(),
|
170 |
+
"CodigoSeguranca": jQuery("input[name=CodigoSeguranca]").val(),
|
171 |
+
"Portador": {
|
172 |
+
"Nome" : jQuery("input[name=Portador]").val(),
|
173 |
+
"DataNascimento": jQuery("input[name=DataNascimento]").val(),
|
174 |
+
"Telefone": jQuery("input[name=Telefone]").val(),
|
175 |
+
"Identidade": jQuery("input[name=CPF]").val()
|
176 |
+
}
|
177 |
+
}
|
178 |
+
}
|
179 |
+
sendToCreditCard2(settings);
|
180 |
+
|
181 |
+
},
|
182 |
+
|
183 |
+
});
|
184 |
+
e.preventDefault();
|
185 |
+
});
|
186 |
+
|
187 |
+
function sendToCreditCard2(valores){
|
188 |
+
var settings = valores
|
189 |
+
MoipWidget(settings);
|
190 |
+
jQuery(".loading-mask").hide();
|
191 |
+
}
|
192 |
+
</script>
|
app/design/frontend/default/default/template/O2TI/moip/emptyupdate.phtml
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php if($this->getRequest()->getParams()){
|
2 |
+
$post = $this->getRequest()->getPost();
|
3 |
+
$moip_id = $post['moip_id'];
|
4 |
+
$pgtoArray = array();
|
5 |
+
$pgtoArray['forma_pagamento'] = $post['forma_de_pagamento'];
|
6 |
+
$pgtoArray['credito_instituicao'] = $post['bandeira'];
|
7 |
+
$pgtoArray['credito_numero'] = $post['Numero'];
|
8 |
+
$pgtoArray['credito_expiracao_mes'] = $post['Expiracao_mes'];
|
9 |
+
$pgtoArray['credito_expiracao_ano'] = $post['Expiracao_ano'];
|
10 |
+
$pgtoArray['credito_codigo_seguranca'] = $post['CodigoSeguranca'];
|
11 |
+
$pgtoArray['credito_parcelamento'] = $post['parcelas'];
|
12 |
+
$pgtoArray['credito_portador_nome'] = $post['Portador'];
|
13 |
+
$pgtoArray["vcmentoboleto"] = "3";
|
14 |
+
$cpf = $post['CPF'];
|
15 |
+
$pgtoArray['credito_portador_cpf'] = preg_replace("/[^0-9]/", "", $cpf);
|
16 |
+
$pgtoArray['credito_portador_DDD'] = $this->getNumberOrDDD($post['Telefone'], true);
|
17 |
+
$pgtoArray['credito_portador_telefone'] = $this->getNumberOrDDD($post['Telefone']);
|
18 |
+
$pgtoArray['credito_portador_nascimento'] = date('Y-m-d', strtotime($post['DataNascimento']));
|
19 |
+
Mage::unregister('result_decode');
|
20 |
+
$api = Mage::getModel('moip/api');
|
21 |
+
$pagar = $api->getRePagar($moip_id, $pgtoArray);
|
22 |
+
Mage::Register('result_decode', $pagar);
|
23 |
+
$refez = json_decode($pagar);
|
24 |
+
}
|
25 |
+
|
26 |
+
echo $refez; ?>
|
app/design/frontend/default/default/template/O2TI/moip/form.phtml
ADDED
@@ -0,0 +1,682 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
$standad = Mage::getSingleton('moip/standard');
|
3 |
+
$api = Mage::getSingleton('moip/api');
|
4 |
+
$api->setContaMoip($standad->getConfigData('conta_moip'));
|
5 |
+
$api->setAmbiente($standad->getConfigData('ambiente'));
|
6 |
+
$parcelas = "";
|
7 |
+
$descontotexto = "";
|
8 |
+
$asterisco = "";
|
9 |
+
$nome = "";
|
10 |
+
$telefone = "";
|
11 |
+
$cpf = "";
|
12 |
+
$dn = "";
|
13 |
+
$icone_cartao = $this->getSkinUrl('O2TI/moip/imagem/abacartao.png');
|
14 |
+
$icone_boleto = $this->getSkinUrl('O2TI/moip/imagem/ababoleto.png');
|
15 |
+
$icone_transf = $this->getSkinUrl('O2TI/moip/imagem/abatransf.png');
|
16 |
+
$cartao_visa = $this->getSkinUrl('O2TI/moip/imagem/Visa.png');
|
17 |
+
$cartao_master = $this->getSkinUrl('O2TI/moip/imagem/Mastercard.png');
|
18 |
+
$cartao_diners = $this->getSkinUrl('O2TI/moip/imagem/Diners.png');
|
19 |
+
$cartao_american = $this->getSkinUrl('O2TI/moip/imagem/AmericanExpress.png');
|
20 |
+
$cartao_hipercard = $this->getSkinUrl('O2TI/moip/imagem/Hipercard.png');
|
21 |
+
$boleto = $this->getSkinUrl('O2TI/moip/imagem/Bradesco.png');
|
22 |
+
$cartao_bb = $this->getSkinUrl('O2TI/moip/imagem/BancoDoBrasil.png');
|
23 |
+
$cartao_bradesco = $this->getSkinUrl('O2TI/moip/imagem/Bradesco.png');
|
24 |
+
$cartao_itau = $this->getSkinUrl('O2TI/moip/imagem/Itau.png');
|
25 |
+
$cartao_banrisul = $this->getSkinUrl('O2TI/moip/imagem/Banrisul.png');
|
26 |
+
if(Mage::getStoreConfig('o2tiall/config/trocar_icone')):
|
27 |
+
$icone_cartao = Mage::getBaseUrl('media') . "o2ti/allmoip/". Mage::getStoreConfig('o2tiall/config/icone_cartao');
|
28 |
+
$icone_boleto = Mage::getBaseUrl('media') . "o2ti/allmoip/". Mage::getStoreConfig('o2tiall/config/icone_boleto');
|
29 |
+
$icone_transf = Mage::getBaseUrl('media') . "o2ti/allmoip/". Mage::getStoreConfig('o2tiall/config/icone_transf');
|
30 |
+
endif;
|
31 |
+
if(Mage::getStoreConfig('o2tiall/config/trocar_bandeira_cartao')):
|
32 |
+
$cartao_visa = Mage::getBaseUrl('media') . "o2ti/allmoip/". Mage::getStoreConfig('o2tiall/config/cartao_visa');
|
33 |
+
$cartao_master = Mage::getBaseUrl('media') . "o2ti/allmoip/". Mage::getStoreConfig('o2tiall/config/cartao_master');
|
34 |
+
$cartao_diners = Mage::getBaseUrl('media') . "o2ti/allmoip/". Mage::getStoreConfig('o2tiall/config/cartao_diners');
|
35 |
+
$cartao_american = Mage::getBaseUrl('media') . "o2ti/allmoip/". Mage::getStoreConfig('o2tiall/config/cartao_american');
|
36 |
+
$cartao_hipercard = Mage::getBaseUrl('media') . "o2ti/allmoip/". Mage::getStoreConfig('o2tiall/config/cartao_hipercard');
|
37 |
+
endif;
|
38 |
+
if(Mage::getStoreConfig('o2tiall/config/trocar_bandeira_cartao')):
|
39 |
+
$cartao_bb = Mage::getBaseUrl('media') . "o2ti/allmoip/". Mage::getStoreConfig('o2tiall/config/cartao_bb');
|
40 |
+
$cartao_bradesco = Mage::getBaseUrl('media') . "o2ti/allmoip/". Mage::getStoreConfig('o2tiall/config/cartao_bradesco');
|
41 |
+
$cartao_itau = Mage::getBaseUrl('media') . "o2ti/allmoip/". Mage::getStoreConfig('o2tiall/config/cartao_itau');
|
42 |
+
$cartao_banrisul = Mage::getBaseUrl('media') . "o2ti/allmoip/". Mage::getStoreConfig('o2tiall/config/cartao_banrisul');
|
43 |
+
endif;
|
44 |
+
if(Mage::getStoreConfig('o2tiall/config/trocar_bandeira_cartao')):
|
45 |
+
$boleto = Mage::getBaseUrl('media') . "o2ti/allmoip/". Mage::getStoreConfig('o2tiall/config/boleto');
|
46 |
+
endif;
|
47 |
+
$mostraboleto = 1;
|
48 |
+
$nivelestoque = $standad->getConfigData('estoqueboleto');
|
49 |
+
$idcount = 0;
|
50 |
+
echo "tokem". Mage::registry('xml');
|
51 |
+
$_Produtos = Mage::getSingleton('checkout/cart')->getQuote()->getAllItems();
|
52 |
+
foreach ($_Produtos as $value)
|
53 |
+
{
|
54 |
+
$item_ID = $value->getProductId();
|
55 |
+
$_Product = Mage::getModel('catalog/product')->load($item_ID);
|
56 |
+
$model = Mage::getModel('catalog/product');
|
57 |
+
$_product = $model->load($item_ID);
|
58 |
+
$stocklevel[$idcount] = (int)Mage::getModel('cataloginventory/stock_item')->loadByProduct($_product)->getQty();
|
59 |
+
$nomeprod[$idcount] = $model->getName();
|
60 |
+
$idcount = $idcount + 1;
|
61 |
+
}
|
62 |
+
$idcount = $idcount - 1;
|
63 |
+
$teste = 0;
|
64 |
+
while($teste <= $idcount )
|
65 |
+
{
|
66 |
+
if ($stocklevel[$teste] <= $nivelestoque){
|
67 |
+
$prodbaixostock = "O Produto <b>". $nomeprod[$teste] . "</b> está com o estoque baixo (<b>menos de ". $stocklevel[$teste] ." unidades</b>) e não poderá ser pago com boleto. </br>A quantidade mínima de um produto em estoque para compra por boleto deverá ser de: <b>". $nivelestoque . " Produtos.</b> ";
|
68 |
+
$mostraboleto = 0;
|
69 |
+
}
|
70 |
+
$teste++;
|
71 |
+
}
|
72 |
+
|
73 |
+
$descont_boleto = Mage::getStoreConfig('parcelamento_de2');
|
74 |
+
$virtual = Mage::helper('onestepcheckout')->onlyProductDownloadable();
|
75 |
+
if ($virtual){
|
76 |
+
$data = $standad->getQuote()->getBillingAddress();
|
77 |
+
}
|
78 |
+
else {
|
79 |
+
$data = $standad->getQuote()->getShippingAddress();
|
80 |
+
}
|
81 |
+
$valor_pedido = $data->getGrandTotal();
|
82 |
+
$valor_parc = $data->getGrandTotal();
|
83 |
+
$valor_parc = number_format($valor_parc,2);
|
84 |
+
|
85 |
+
if($valor_pedido > 5):
|
86 |
+
$parcelamento = $api->getParcelamento($data->getGrandTotal());
|
87 |
+
foreach ($parcelamento as $k => $v):
|
88 |
+
if($v['juros'] == "1.99"):
|
89 |
+
$asterisco = "*";
|
90 |
+
else:
|
91 |
+
$parcelas_sem_juros = $k;
|
92 |
+
endif;
|
93 |
+
|
94 |
+
$parcelas .= "<option value=\"".$k."\"> ".$k."x R$ " . $v['valor'] . "".$asterisco." | Total: R$ " .$v['total']."</option>";
|
95 |
+
endforeach;
|
96 |
+
else:
|
97 |
+
$parcelas .= "<option value=\"1\"> Pagamento à vista </option>";
|
98 |
+
endif;
|
99 |
+
|
100 |
+
|
101 |
+
if (Mage::getStoreConfig('o2tiall/pagamento_avancado/pagamento_boleto')):
|
102 |
+
if ($valor_pedido >= Mage::getStoreConfig('o2tiall/pagamento_avancado/boleto_valor')):
|
103 |
+
$descontotexto = "Com desconto de: ".Mage::getStoreConfig('o2tiall/pagamento_avancado/boleto_desc')."%.";
|
104 |
+
$descontotexto1 = $descontotexto ."<br/>Págavel em qualquer banco, casas lotéricas ou via internet bank.";
|
105 |
+
$desconto = $data->getGrandTotal() - $data->getGrandTotal() * Mage::getStoreConfig('o2tiall/pagamento_avancado/boleto_desc')/100;
|
106 |
+
endif;
|
107 |
+
|
108 |
+
if (Mage::getStoreConfig('o2tiall/pagamento_avancado/boleto_valor2') != "" && $valor_pedido >= Mage::getStoreConfig('o2tiall/pagamento_avancado/boleto_valor2') && $valor_pedido < Mage::getStoreConfig('o2tiall/pagamento_avancado/boleto_valor3') ):
|
109 |
+
$descontotexto = "Com desconto de: ".Mage::getStoreConfig('o2tiall/pagamento_avancado/boleto_desc2')."%.";
|
110 |
+
$descontotexto1 = $descontotexto ."<br/>Págavel em qualquer banco, casas lotéricas ou via internet bank.";
|
111 |
+
$desconto = $data->getGrandTotal() - $data->getGrandTotal() * Mage::getStoreConfig('o2tiall/pagamento_avancado/boleto_desc2')/100;
|
112 |
+
endif;
|
113 |
+
|
114 |
+
if (Mage::getStoreConfig('o2tiall/pagamento_avancado/boleto_valor3') != "" && $valor_pedido >= Mage::getStoreConfig('o2tiall/pagamento_avancado/boleto_valor3') ):
|
115 |
+
$descontotexto = "Com desconto de: ".Mage::getStoreConfig('o2tiall/pagamento_avancado/boleto_desc3')."%.";
|
116 |
+
$descontotexto1 = $descontotexto ."<br/>Págavel em qualquer banco, casas lotéricas ou via internet bank.";
|
117 |
+
$desconto = $data->getGrandTotal() - $data->getGrandTotal() * Mage::getStoreConfig('o2tiall/pagamento_avancado/boleto_desc3')/100;
|
118 |
+
endif;
|
119 |
+
|
120 |
+
|
121 |
+
else:
|
122 |
+
$descontotexto1 = "Págavel em qualquer banco, casas lotéricas ou via internet bank.";
|
123 |
+
$desconto = $data->getGrandTotal();
|
124 |
+
endif;
|
125 |
+
|
126 |
+
|
127 |
+
if (Mage::getStoreConfig('o2tiall/pagamento_avancado/transf_desc')):
|
128 |
+
if ($valor_pedido >= Mage::getStoreConfig('o2tiall/pagamento_avancado/boleto_valor')):
|
129 |
+
$descontotexto = "Com desconto de: ".Mage::getStoreConfig('o2tiall/pagamento_avancado/boleto_desc')."%.";
|
130 |
+
$descontotexto1 = $descontotexto ."<br/>Págavel únicamente através internet bank.";
|
131 |
+
$desconto = $data->getGrandTotal() - $data->getGrandTotal() * Mage::getStoreConfig('o2tiall/pagamento_avancado/boleto_desc')/100;
|
132 |
+
endif;
|
133 |
+
|
134 |
+
if (Mage::getStoreConfig('o2tiall/pagamento_avancado/boleto_valor2') != "" && $valor_pedido >= Mage::getStoreConfig('o2tiall/pagamento_avancado/boleto_valor2') && $valor_pedido < Mage::getStoreConfig('o2tiall/pagamento_avancado/boleto_valor3') ):
|
135 |
+
$descontotexto = "Com desconto de: ".Mage::getStoreConfig('o2tiall/pagamento_avancado/boleto_desc2')."%.";
|
136 |
+
$descontotexto1 = $descontotexto ."<br/>Págavel únicamente através internet bank.";
|
137 |
+
$desconto = $data->getGrandTotal() - $data->getGrandTotal() * Mage::getStoreConfig('o2tiall/pagamento_avancado/boleto_desc2')/100;
|
138 |
+
endif;
|
139 |
+
|
140 |
+
if (Mage::getStoreConfig('o2tiall/pagamento_avancado/boleto_valor3') != "" && $valor_pedido >= Mage::getStoreConfig('o2tiall/pagamento_avancado/boleto_valor3') ):
|
141 |
+
$descontotexto = "Com desconto de: ".Mage::getStoreConfig('o2tiall/pagamento_avancado/boleto_desc3')."%.";
|
142 |
+
$descontotexto1 = $descontotexto ."<br/>Págavel únicamente através internet bank.";
|
143 |
+
$desconto = $data->getGrandTotal() - $data->getGrandTotal() * Mage::getStoreConfig('o2tiall/pagamento_avancado/boleto_desc3')/100;
|
144 |
+
endif;
|
145 |
+
|
146 |
+
|
147 |
+
else:
|
148 |
+
$descontotexto1 = "Págavel em qualquer banco, casas lotéricas ou via internet bank.";
|
149 |
+
$desconto = $data->getGrandTotal();
|
150 |
+
endif;
|
151 |
+
|
152 |
+
if(Mage::getSingleton('customer/session')->isLoggedIn()){
|
153 |
+
$nome = Mage::getSingleton('customer/session')->getCustomer()->getName();
|
154 |
+
$telefone = Mage::getSingleton('customer/session')->getCustomer()->getTelephone();
|
155 |
+
$cpf = Mage::getSingleton('customer/session')->getCustomer()->getTaxvat();
|
156 |
+
$dn = Mage::getSingleton('customer/session')->getCustomer()->getdob();
|
157 |
+
$dn = date("d/m/Y", strtotime($dn));
|
158 |
+
}
|
159 |
+
?>
|
160 |
+
|
161 |
+
<script type="text/javascript">
|
162 |
+
|
163 |
+
jQuery(document).ready(function(){
|
164 |
+
<?php if (!in_array("CartaoCredito", $standad->getFormasPagamento()) ): ?>
|
165 |
+
jQuery('#linhaparcelas').css({display:"none"});
|
166 |
+
<?php endif;?>
|
167 |
+
<?php if (!in_array("BoletoBancario", $standad->getFormasPagamento()) ): ?>
|
168 |
+
jQuery('#linhaboleto').css({display:"none"});
|
169 |
+
<?php endif;?>
|
170 |
+
<?php if (!in_array("DebitoBancario", $standad->getFormasPagamento()) ): ?>
|
171 |
+
jQuery('#linhatransf').css({display:"none"});
|
172 |
+
<?php endif;?>
|
173 |
+
});
|
174 |
+
|
175 |
+
fechar = function(){
|
176 |
+
<?php if (in_array("CartaoCredito", $standad->getFormasPagamento()) ): ?>
|
177 |
+
jQuery('#linhacartao').css({display:"none"});
|
178 |
+
<?php endif;?>
|
179 |
+
<?php if (in_array("BoletoBancario", $standad->getFormasPagamento()) ): ?>
|
180 |
+
jQuery('#conteudoboleto').css({display:"none"});
|
181 |
+
<?php endif;?>
|
182 |
+
<?php if (in_array("DebitoBancario", $standad->getFormasPagamento()) ): ?>
|
183 |
+
jQuery('#conteudotransf').css({display:"none"});
|
184 |
+
<?php endif;?>
|
185 |
+
}
|
186 |
+
parcelas = function(){
|
187 |
+
fechar();
|
188 |
+
jQuery('#linhacartao').hide();
|
189 |
+
jQuery("#linhacartao").slideDown("slow");
|
190 |
+
jQuery('#linhacartao').css({display:"block"});
|
191 |
+
|
192 |
+
}
|
193 |
+
boleto = function(){
|
194 |
+
fechar();
|
195 |
+
jQuery('#conteudoboleto').hide();
|
196 |
+
jQuery("#conteudoboleto").slideDown("slow");
|
197 |
+
jQuery('#conteudoboleto').css({display:"block"});
|
198 |
+
}
|
199 |
+
transf = function(){
|
200 |
+
fechar();
|
201 |
+
jQuery('#conteudotransf').hide();
|
202 |
+
jQuery("#conteudotransf").slideDown("slow");
|
203 |
+
jQuery('#conteudotransf').css({display:"block"});
|
204 |
+
}
|
205 |
+
function countChar(val) {
|
206 |
+
var cvv = val.value.length;
|
207 |
+
if(cvv > 2){
|
208 |
+
jQuery('#formcli').hide();
|
209 |
+
jQuery("#formcli").slideDown("slow");
|
210 |
+
jQuery('#formcli').css({display:"block"});
|
211 |
+
document.getElementById('credito_portador_nome').value = document.getElementById('billing:firstname').value + ' ' + document.getElementById('billing:lastname').value;
|
212 |
+
document.getElementById('credito_portador_telefone').value = document.getElementById('billing:telephone').value;
|
213 |
+
document.getElementById('credito_portador_cpf').value = document.getElementById('billing:taxvat').value;
|
214 |
+
if(document.getElementById('billing:year').value)
|
215 |
+
{
|
216 |
+
document.getElementById('credito_portador_nascimento').value = document.getElementById('billing:day').value + '/' + document.getElementById('billing:month').value + '/' + document.getElementById('billing:year').value
|
217 |
+
}
|
218 |
+
}
|
219 |
+
};
|
220 |
+
//validacao do moip - inicio
|
221 |
+
jQuery('.btn-checkout').on("click",function(e)
|
222 |
+
{
|
223 |
+
if(jQuery('input[name=payment\\[method\\]]:checked').val() == "o2ti_moip_standard"){
|
224 |
+
if(!jQuery("input[name=payment\\[forma_pagamento\\]]:checked").val()){
|
225 |
+
if(!jQuery('#advice-required-o2ti').length)
|
226 |
+
{
|
227 |
+
logic=false;
|
228 |
+
jQuery('#checkout-payment-o2ti').css({display:"block"});
|
229 |
+
jQuery('#checkout-payment-o2ti').html('Selecione a forma de pagamento.');
|
230 |
+
return false;
|
231 |
+
}
|
232 |
+
}
|
233 |
+
else
|
234 |
+
jQuery('#checkout-payment-o2ti').css({display:"none"});
|
235 |
+
jQuery('#advice-required-entry_payment_o2ti').remove();
|
236 |
+
}
|
237 |
+
if(jQuery("input[name=payment\\[forma_pagamento\\]]:checked").val() == "CartaoCredito")
|
238 |
+
{
|
239 |
+
if(!jQuery("input[name=payment\\[credito_instituicao\\]]:checked").val())
|
240 |
+
{
|
241 |
+
if(!jQuery('#advice-required-o2ti').length)
|
242 |
+
{
|
243 |
+
logic=false;
|
244 |
+
jQuery('#checkout-payment-bandeira').css({display:"block"});
|
245 |
+
jQuery('#checkout-payment-bandeira').html('Selecione a bandeira do cartão.');
|
246 |
+
return false;
|
247 |
+
}
|
248 |
+
}
|
249 |
+
else
|
250 |
+
jQuery('#checkout-payment-bandeira').css({display:"none"});
|
251 |
+
jQuery('#advice-required-entry_payment_bandeira').remove();
|
252 |
+
}
|
253 |
+
if(jQuery("input[name=payment\\[forma_pagamento\\]]:checked").val() == "DebitoBancario")
|
254 |
+
{
|
255 |
+
if(!jQuery("input[name=payment\\[debito_instituicao\\]]:checked").val())
|
256 |
+
{
|
257 |
+
if(!jQuery('#advice-required-o2ti').length)
|
258 |
+
{
|
259 |
+
logic=false;
|
260 |
+
jQuery('#checkout-payment-banco').css({display:"block"});
|
261 |
+
jQuery('#checkout-payment-banco').html('Selecione o seu banco.');
|
262 |
+
return false;
|
263 |
+
}
|
264 |
+
|
265 |
+
}
|
266 |
+
else
|
267 |
+
jQuery('#checkout-payment-banco').css({display:"none"});
|
268 |
+
}
|
269 |
+
});
|
270 |
+
|
271 |
+
//validacao do moip - fim
|
272 |
+
bb = function(){
|
273 |
+
document.getElementById('checkout-payment-o2ti-deb').style.display='none';
|
274 |
+
document.getElementById('debbb').style.opacity='1';
|
275 |
+
document.getElementById('debbradesco').style.opacity='0.4';
|
276 |
+
document.getElementById('debitau').style.opacity='0.4';
|
277 |
+
document.getElementById('Banrisul').style.opacity='0.4';
|
278 |
+
document.getElementById('pagdebito').style.display='block';
|
279 |
+
document.getElementById('checkout-payment-banco').style.display='none';
|
280 |
+
};
|
281 |
+
bradesco = function(){
|
282 |
+
document.getElementById('checkout-payment-o2ti-deb').style.display='none';
|
283 |
+
document.getElementById('debbb').style.opacity='0.4';
|
284 |
+
document.getElementById('debbradesco').style.opacity='1';
|
285 |
+
document.getElementById('debitau').style.opacity='0.4';
|
286 |
+
document.getElementById('Banrisul').style.opacity='0.4';
|
287 |
+
document.getElementById('pagdebito').style.display='block';
|
288 |
+
document.getElementById('checkout-payment-banco').style.display='none';
|
289 |
+
};
|
290 |
+
itau = function(){
|
291 |
+
document.getElementById('checkout-payment-o2ti-deb').style.display='none';
|
292 |
+
document.getElementById('debbb').style.opacity='0.4';
|
293 |
+
document.getElementById('debbradesco').style.opacity='0.4';
|
294 |
+
document.getElementById('debitau').style.opacity='1';
|
295 |
+
document.getElementById('Banrisul').style.opacity='0.4';
|
296 |
+
document.getElementById('pagdebito').style.display='block';
|
297 |
+
document.getElementById('checkout-payment-banco').style.display='none';
|
298 |
+
};
|
299 |
+
banrisul = function(){
|
300 |
+
document.getElementById('checkout-payment-o2ti-deb').style.display='none';
|
301 |
+
document.getElementById('debbb').style.opacity='0.4';
|
302 |
+
document.getElementById('debbradesco').style.opacity='0.4';
|
303 |
+
document.getElementById('debitau').style.opacity='0.4';
|
304 |
+
document.getElementById('Banrisul').style.opacity='1';
|
305 |
+
document.getElementById('pagdebito').style.display='block';
|
306 |
+
document.getElementById('checkout-payment-banco').style.display='none';
|
307 |
+
};
|
308 |
+
visa = function(){
|
309 |
+
document.getElementById('Visa').style.opacity='1';
|
310 |
+
document.getElementById('Mastercard').style.opacity='0.4';
|
311 |
+
document.getElementById('Diners').style.opacity='0.4';
|
312 |
+
document.getElementById('AmericanExpress').style.opacity='0.4';
|
313 |
+
document.getElementById('Hipercard').style.opacity='0.4';
|
314 |
+
document.getElementById('checkout-payment-bandeira').style.display='none';
|
315 |
+
};
|
316 |
+
mastercard = function(){
|
317 |
+
document.getElementById('Visa').style.opacity='0.4';
|
318 |
+
document.getElementById('Mastercard').style.opacity='1';
|
319 |
+
document.getElementById('Diners').style.opacity='0.4';
|
320 |
+
document.getElementById('AmericanExpress').style.opacity='0.4';
|
321 |
+
document.getElementById('Hipercard').style.opacity='0.4';
|
322 |
+
document.getElementById('checkout-payment-bandeira').style.display='none';
|
323 |
+
};
|
324 |
+
americanexpress = function(){
|
325 |
+
document.getElementById('Visa').style.opacity='0.4';
|
326 |
+
document.getElementById('Mastercard').style.opacity='0.4';
|
327 |
+
document.getElementById('Diners').style.opacity='0.4';
|
328 |
+
document.getElementById('AmericanExpress').style.opacity='1';
|
329 |
+
document.getElementById('Hipercard').style.opacity='0.4';
|
330 |
+
document.getElementById('checkout-payment-bandeira').style.display='none';
|
331 |
+
};
|
332 |
+
diners = function(){
|
333 |
+
document.getElementById('Visa').style.opacity='0.4';
|
334 |
+
document.getElementById('Mastercard').style.opacity='0.4';
|
335 |
+
document.getElementById('Diners').style.opacity='1';
|
336 |
+
document.getElementById('AmericanExpress').style.opacity='0.4';
|
337 |
+
document.getElementById('Hipercard').style.opacity='0.4';
|
338 |
+
document.getElementById('checkout-payment-bandeira').style.display='none';
|
339 |
+
};
|
340 |
+
hipercard = function(){
|
341 |
+
document.getElementById('Visa').style.opacity='0.4';
|
342 |
+
document.getElementById('Mastercard').style.opacity='0.4';
|
343 |
+
document.getElementById('Diners').style.opacity='0.4';
|
344 |
+
document.getElementById('AmericanExpress').style.opacity='0.4';
|
345 |
+
document.getElementById('Hipercard').style.opacity='1';
|
346 |
+
document.getElementById('checkout-payment-bandeira').style.display='none';
|
347 |
+
};
|
348 |
+
</script>
|
349 |
+
|
350 |
+
<link rel="stylesheet" type="text/css" href="<?php echo $this->getSkinUrl('O2TI/moip/css/formulario.css'); ?> "media="all">
|
351 |
+
<div id="checkouto2ti">
|
352 |
+
<ul id="payment_form_<?php echo $this->getMethodCode() ?>">
|
353 |
+
|
354 |
+
|
355 |
+
|
356 |
+
|
357 |
+
<?php if ($mostraboleto != "1"): ?>
|
358 |
+
<label>
|
359 |
+
|
360 |
+
<?php if (in_array("BoletoBancario", $standad->getFormasPagamento()) ): ?>
|
361 |
+
<input onclick="boleto();" type="radio" name="payment[forma_pagamento]" title="Boleto" value="" class="forma_pg">
|
362 |
+
|
363 |
+
<div id="linhaboleto" onclick="boleto();">
|
364 |
+
<div id="icone">
|
365 |
+
<img alt="Boleto Bancário" id="imageboleto" src="<?php echo $icone_boleto; ?>">
|
366 |
+
</div>
|
367 |
+
<div id="desc">
|
368 |
+
<h3>Boleto</h3>
|
369 |
+
<span class="desc">
|
370 |
+
Indisponível
|
371 |
+
</span>
|
372 |
+
</div>
|
373 |
+
<div id="valor">
|
374 |
+
<h3>Valor</h3>
|
375 |
+
R$ <?php echo number_format($desconto,2) ?>
|
376 |
+
</div>
|
377 |
+
</div>
|
378 |
+
</label>
|
379 |
+
<div style="clear:both;"></div>
|
380 |
+
<div id="conteudoboleto">
|
381 |
+
<h3>Boleto Bancário</h3>
|
382 |
+
<div id="icone">
|
383 |
+
<img alt="Boleto Bancário" id="imageboleto" src="<?php echo $boleto; ?>">
|
384 |
+
</div>
|
385 |
+
<div id="desc2">
|
386 |
+
<?php echo $prodbaixostock; ?>
|
387 |
+
</div>
|
388 |
+
</div>
|
389 |
+
|
390 |
+
<?php endif;?>
|
391 |
+
<?php endif; ?>
|
392 |
+
|
393 |
+
|
394 |
+
<div style="clear:both;"></div>
|
395 |
+
|
396 |
+
<?php if ($mostraboleto == "1"): ?>
|
397 |
+
<label>
|
398 |
+
<?php if (in_array("BoletoBancario", $standad->getFormasPagamento()) ): ?>
|
399 |
+
<input onclick="boleto();" type="radio" name="payment[forma_pagamento]" title="Boleto" value="BoletoBancario" class="forma_pg">
|
400 |
+
|
401 |
+
<div id="linhaboleto" onclick="boleto();">
|
402 |
+
<div id="icone">
|
403 |
+
<img alt="Boleto Bancário" id="imageboleto" src="<?php echo $icone_boleto; ?>">
|
404 |
+
</div>
|
405 |
+
<div id="desc">
|
406 |
+
<h3>Boleto</h3>
|
407 |
+
<span class="desc">
|
408 |
+
<?php echo $descontotexto; ?>
|
409 |
+
</span>
|
410 |
+
</div>
|
411 |
+
<div id="valor">
|
412 |
+
<h3>Valor</h3>
|
413 |
+
R$ <?php echo number_format($desconto,2) ?>
|
414 |
+
</div>
|
415 |
+
</div>
|
416 |
+
</label>
|
417 |
+
<div style="clear:both;"></div>
|
418 |
+
<div id="conteudoboleto">
|
419 |
+
<h3>Boleto Bancário</h3>
|
420 |
+
<div id="icone">
|
421 |
+
<img alt="Boleto Bancário" id="imageboleto" src="<?php echo $boleto; ?>">
|
422 |
+
</div>
|
423 |
+
<div id="desc2">
|
424 |
+
<?php echo $descontotexto1; ?>
|
425 |
+
</div>
|
426 |
+
</div>
|
427 |
+
<?php endif; ?>
|
428 |
+
<?php endif; ?>
|
429 |
+
|
430 |
+
|
431 |
+
|
432 |
+
|
433 |
+
|
434 |
+
<div style="clear:both;"></div>
|
435 |
+
|
436 |
+
|
437 |
+
|
438 |
+
|
439 |
+
|
440 |
+
<label onclick="parcelas();">
|
441 |
+
|
442 |
+
|
443 |
+
<?php if (in_array("CartaoCredito", $standad->getFormasPagamento()) ): ?>
|
444 |
+
<input onclick="parcelas();" id="cartao_radio" type="radio" name="payment[forma_pagamento]" title="Cartão de Crédito" value="CartaoCredito" class="forma_pg">
|
445 |
+
|
446 |
+
|
447 |
+
<div id="linhaparcelas">
|
448 |
+
<div id="icone">
|
449 |
+
<img alt="Cartão de Crédito" id="imageboleto" src="<?php echo $icone_cartao; ?>">
|
450 |
+
</div>
|
451 |
+
<div id="desc">
|
452 |
+
<h3>Cartão de Crédito</h3>
|
453 |
+
<span class="desc">
|
454 |
+
Pague em até <?php echo $k; ?>x
|
455 |
+
</span>
|
456 |
+
</div>
|
457 |
+
<div id="valor">
|
458 |
+
Parcelas <?php echo $k; ?>x de
|
459 |
+
R$ <?php echo $v['valor']; ?>
|
460 |
+
</div>
|
461 |
+
</div>
|
462 |
+
<?php endif;?>
|
463 |
+
</label>
|
464 |
+
<div style="clear:both;"></div>
|
465 |
+
<div id="linhacartao">
|
466 |
+
<h3>Cartão de Crédito</h3>
|
467 |
+
<li class="wide">
|
468 |
+
<label class="required" for="credito_bandeira" >Selecione a Bandeira:</label>
|
469 |
+
<div class="input-box" style="text-align:center;">
|
470 |
+
|
471 |
+
<label id="band">
|
472 |
+
<input id="bandeiramoip" type="radio" name="payment[credito_instituicao]" onclick="visa();" value="Visa"><img src="<?php echo $cartao_visa; ?>" onclick=";" id="Visa" alt="Visa" border="0">
|
473 |
+
</label>
|
474 |
+
|
475 |
+
<label id="band">
|
476 |
+
<input id="bandeiramoip" type="radio" name="payment[credito_instituicao]" onclick="mastercard();" value="Mastercard"><img src="<?php echo $cartao_master; ?>" onclick="" id="Mastercard" alt="Mastercard" border="0">
|
477 |
+
</label>
|
478 |
+
|
479 |
+
|
480 |
+
<label id="band">
|
481 |
+
<input id="bandeiramoip" type="radio" name="payment[credito_instituicao]" onclick="americanexpress();" value="AmericanExpress"><img src="<?php echo $cartao_american; ?>" onclick="" id="AmericanExpress" alt="AmericanExpress" border="0">
|
482 |
+
</label>
|
483 |
+
</div>
|
484 |
+
<div class="input-box" style="text-align:center;">
|
485 |
+
<label id="band">
|
486 |
+
<input id="bandeiramoip" type="radio" name="payment[credito_instituicao]" onclick="diners();" value="Diners"> <img onclick="" src="<?php echo $cartao_diners; ?>" id="Diners" alt="Diners" border="0">
|
487 |
+
</label>
|
488 |
+
|
489 |
+
|
490 |
+
<label id="band">
|
491 |
+
<input id="bandeiramoip" type="radio" name="payment[credito_instituicao]" onclick="hipercard();" value="Hipercard"><img onclick="" src="<?php echo $cartao_hipercard; ?>" id="Hipercard" alt="Hipercard" border="0">
|
492 |
+
</label>
|
493 |
+
|
494 |
+
</div>
|
495 |
+
</li>
|
496 |
+
|
497 |
+
<div id="checkout-payment-bandeira" class="validation-advice" style="display:none;position:relative;" ></div>
|
498 |
+
|
499 |
+
<li class="wide">
|
500 |
+
<label class="required" for="credito_numero">Número:</label>
|
501 |
+
<div class="input-box">
|
502 |
+
<input type="text" name="payment[credito_numero]" id="credito_numero" class="input-text required-entry validate-cc-number" >
|
503 |
+
</div>
|
504 |
+
</li>
|
505 |
+
|
506 |
+
|
507 |
+
<li class="wide">
|
508 |
+
<label class="required" for="Validade">Validade:</label>
|
509 |
+
<div class="input-box">
|
510 |
+
<select name="payment[credito_expiracao_mes]" id="credito_expiracao_mes" class="input-text required-entry" >
|
511 |
+
<option value="">Mês</option>
|
512 |
+
<option value="01">01</option>
|
513 |
+
<option value="02">02</option>
|
514 |
+
<option value="03">03</option>
|
515 |
+
<option value="04">04</option>
|
516 |
+
<option value="05">05</option>
|
517 |
+
<option value="06">06</option>
|
518 |
+
<option value="07">07</option>
|
519 |
+
<option value="08">08</option>
|
520 |
+
<option value="09">09</option>
|
521 |
+
<option value="10">10</option>
|
522 |
+
<option value="11">11</option>
|
523 |
+
<option value="12">12</option>
|
524 |
+
</select>
|
525 |
+
<select name="payment[credito_expiracao_ano]" id="credito_expiracao_ano" class="input-text required-entry" >
|
526 |
+
<option value="">Ano</option>
|
527 |
+
<option value="13">13</option>
|
528 |
+
<option value="14">14</option>
|
529 |
+
<option value="15">15</option>
|
530 |
+
<option value="16">16</option>
|
531 |
+
<option value="17">17</option>
|
532 |
+
<option value="18">18</option>
|
533 |
+
<option value="19">19</option>
|
534 |
+
<option value="20">20</option>
|
535 |
+
<option value="21">21</option>
|
536 |
+
<option value="22">22</option>
|
537 |
+
<option value="23">23</option>
|
538 |
+
<option value="24">24</option>
|
539 |
+
<option value="25">25</option>
|
540 |
+
</select>
|
541 |
+
</div>
|
542 |
+
</li>
|
543 |
+
<li class="wide">
|
544 |
+
<label class="required" for="cvv">Código de segurança:</label>
|
545 |
+
<div class="input-box">
|
546 |
+
<span class="tooltip">
|
547 |
+
<input type="text" name="payment[credito_codigo_seguranca]" onkeyup="countChar(this)" class="input-text required-entry" id="credito_codigo_seguranca" >
|
548 |
+
<span class="custom help" style=" width:260px;"><em>Código de segurança:</em>Veja no verso do seu cartão.<img src="<?php echo $this->getSkinUrl('O2TI/moip/imagem/codigo-seguranca.png'); ?>" id="imageseguramoip" border="0"></span></span>
|
549 |
+
</div>
|
550 |
+
</li>
|
551 |
+
<?php
|
552 |
+
$data = $standad->getQuote()->getShippingAddress();
|
553 |
+
$data->getGrandTotal();
|
554 |
+
?>
|
555 |
+
|
556 |
+
<li class="wide">
|
557 |
+
<label class="required" for="credito_parcela">Opções de pagamento:</label>
|
558 |
+
<div class="input-box">
|
559 |
+
<select name="payment[credito_parcelamento]" id="credito_parcelamento" class="input-text required-entry" >
|
560 |
+
<?php echo $parcelas; ?>
|
561 |
+
</select>
|
562 |
+
|
563 |
+
<div id="addparcelas">
|
564 |
+
<?php
|
565 |
+
|
566 |
+
if ($parcelas_sem_juros >= 1)
|
567 |
+
{
|
568 |
+
echo "<div id=\"addparcelasdesc\"> Sem juros até ".$parcelas_sem_juros." parcelas";
|
569 |
+
if ($parcelas_sem_juros < $k)
|
570 |
+
{
|
571 |
+
echo ", após juros de ". $v['juros'] ." a.m.</div>";
|
572 |
+
}
|
573 |
+
}
|
574 |
+
if ($parcelas_sem_juros == "12")
|
575 |
+
{
|
576 |
+
echo "<div id=\"addparcelasdesc\"> Com juros de ".$v['juros'] ." a.m.</div>";
|
577 |
+
}
|
578 |
+
?>
|
579 |
+
</div>
|
580 |
+
</div>
|
581 |
+
</li>
|
582 |
+
|
583 |
+
<div id="formcli" style="display:none;">
|
584 |
+
<h3>Dados do Titular</h3>
|
585 |
+
<div id="pjmoip" style="display:none;width:80%; float:left;color:red;">Atenção para Pessoa Júridica você deverá informar os dados do seu cartão empresarial, não os dados da empresa.</div>
|
586 |
+
|
587 |
+
<li class="wide">
|
588 |
+
<label class="required" for="credito_parcela">Nome no Cartão:</label>
|
589 |
+
<div class="input-box">
|
590 |
+
<span class="tooltip" >
|
591 |
+
<input type="text" name="payment[credito_portador_nome]" value="<?php echo $nome; ?>" class="required-entry" id="credito_portador_nome" >
|
592 |
+
<span class="custom help"><em>Nome do titular</em>deverá ser obrigatoriamente como descrito no cartão.</span></span>
|
593 |
+
</div>
|
594 |
+
</li>
|
595 |
+
<li class="wide">
|
596 |
+
<label class="required" for="credito_parcela">CPF:</label>
|
597 |
+
<div class="input-box">
|
598 |
+
<input type="text" name="payment[credito_portador_cpf]" class="required-entry validar_cpf" placeholder="Ex. 111.111.111-11" onkeypress="return txtBoxFormat(this, '999.999.999-99', event);" maxlength="14" id="credito_portador_cpf" value="<?php echo $cpf; ?>" >
|
599 |
+
</div>
|
600 |
+
</li>
|
601 |
+
<li class="wide">
|
602 |
+
<label class="required" for="credito_parcela">Telefone:</label>
|
603 |
+
<div class="input-box">
|
604 |
+
<span class="tooltip" >
|
605 |
+
<input type="text" name="payment[credito_portador_telefone]" id="credito_portador_telefone" onkeypress="return txtBoxFormat(this, '(99)9999-9999', event);" maxlength="14" value="<?php echo $telefone; ?>" placeholder="Ex. (19)9999-9999" class="input-text required-entry">
|
606 |
+
<span class="custom help"><em>Telefone de contato</em>Muitas vezes é necessária a confirmação manual de seus dados por nossa equipe de crédito, por favor informe um telefone em que seja fácil te localizar.</span></span>
|
607 |
+
</div>
|
608 |
+
</li>
|
609 |
+
<li class="wide">
|
610 |
+
<label class="required" for="credito_parcela">Data nascimento:</label>
|
611 |
+
<div class="input-box">
|
612 |
+
<input type="text" name="payment[credito_portador_nascimento]" id="credito_portador_nascimento" onkeypress="return txtBoxFormat(this, '99/99/9999', event);" maxlength="10" value="<?php if ($dn !='') { echo $dn; } ?>" placeholder="Ex. 10/10/1985" class="input-text required-entry" >
|
613 |
+
</div>
|
614 |
+
</li>
|
615 |
+
</div>
|
616 |
+
</div>
|
617 |
+
|
618 |
+
|
619 |
+
<div style="clear:both;"></div>
|
620 |
+
|
621 |
+
|
622 |
+
|
623 |
+
|
624 |
+
|
625 |
+
<label>
|
626 |
+
|
627 |
+
<?php if (in_array("DebitoBancario", $standad->getFormasPagamento()) ): ?>
|
628 |
+
<input onclick="transf();" type="radio" class="forma_pg" name="payment[forma_pagamento]" value="DebitoBancario" >
|
629 |
+
|
630 |
+
<div id="linhatransf" onclick="transf();">
|
631 |
+
<div id="icone">
|
632 |
+
<img alt="Transferência Bancária" id="imageboleto" src="<?php echo $icone_transf; ?>">
|
633 |
+
</div>
|
634 |
+
<div id="desc">
|
635 |
+
<h3>Transferência Bancária</h3>
|
636 |
+
<span class="desc">
|
637 |
+
<?php echo $descontotexto; ?>
|
638 |
+
</span>
|
639 |
+
</div>
|
640 |
+
<div id="valor">
|
641 |
+
<h3>Valor</h3>
|
642 |
+
R$ <?php echo number_format($desconto,2) ?>
|
643 |
+
</div>
|
644 |
+
</div>
|
645 |
+
<?php endif;?>
|
646 |
+
</label>
|
647 |
+
<div style="clear:both;"></div>
|
648 |
+
<div id="conteudotransf">
|
649 |
+
<h3>Transferência Online</h3>
|
650 |
+
<div id="pagdebito">
|
651 |
+
Após finalizar o pedido você será redirecionado ao site do seu banco...</br>
|
652 |
+
<?php echo $descontotexto1; ?>
|
653 |
+
</br>
|
654 |
+
</div>
|
655 |
+
<div id="moip_debito_bandeiras">
|
656 |
+
<label>
|
657 |
+
<input type="radio" id="debito_instituicao" name="payment[debito_instituicao]" onclick="bb();" value="BancoDoBrasil">
|
658 |
+
<img src="<?php echo $cartao_bb; ?>" alt="Banco do Brasil" id="debbb" >
|
659 |
+
</label>
|
660 |
+
<label>
|
661 |
+
<input type="radio" id="debito_instituicao" name="payment[debito_instituicao]" onclick="bradesco();" value="Bradesco">
|
662 |
+
<img src="<?php echo $cartao_bradesco; ?>" id="debbradesco" alt="Bradesco">
|
663 |
+
</label>
|
664 |
+
<label>
|
665 |
+
<input type="radio" id="debito_instituicao" name="payment[debito_instituicao]" onclick="itau();" value="Itau" >
|
666 |
+
<img src="<?php echo $cartao_itau; ?>" id="debitau" alt="Itaú" >
|
667 |
+
</label>
|
668 |
+
<label>
|
669 |
+
<input type="radio" id="debito_instituicao" name="payment[debito_instituicao]" onclick="banrisul();" value="Banrisul">
|
670 |
+
<img src="<?php echo $cartao_banrisul; ?>" id="Banrisul" alt="Banrisul" >
|
671 |
+
</label>
|
672 |
+
</div>
|
673 |
+
<div id="checkout-payment-banco" class="validation-advice" style="position:relative;display:none;"></div>
|
674 |
+
<div id="checkout-payment-o2ti-deb" class="validation-advice" style="position:relative;display:none;" >
|
675 |
+
Por favor, selecione o banco!
|
676 |
+
</div>
|
677 |
+
</div>
|
678 |
+
<div style="clear:both;"></div>
|
679 |
+
|
680 |
+
</ul>
|
681 |
+
</div>
|
682 |
+
<div id="checkout-payment-o2ti" class="validation-advice" style="position:relative;display:none;"></div>
|
app/design/frontend/default/default/template/O2TI/moip/horizontal_form.phtml
CHANGED
@@ -5,6 +5,7 @@
|
|
5 |
$selector = "";
|
6 |
$dn = "";
|
7 |
?>
|
|
|
8 |
<script type="text/javascript">
|
9 |
fechar = function(){
|
10 |
jQuery('.moip-payment-method-content').slideUp();
|
@@ -60,7 +61,7 @@ jQuery(document).ready(function() {
|
|
60 |
|
61 |
<link rel="stylesheet" type="text/css" href="<?php echo $this->getSkinUrl('O2TI/moip/css/formulario_horizontal.css'); ?>"media="all">
|
62 |
<div id="checkouto2ti">
|
63 |
-
<div id="payment_form_<?php echo $this->getMethodCode() ?>">
|
64 |
<ul class="inline input-switcher moip-payment-methods">
|
65 |
<?php if($this->mostraCartao()): ?>
|
66 |
<li data-target="moip-cartao" class='moip-payment-method-line'>
|
@@ -78,28 +79,17 @@ jQuery(document).ready(function() {
|
|
78 |
<li class="moip-payment-method-content row-fluid" id="moip-cartao" style="display:none">
|
79 |
<h3>Cartão de Crédito</h3>
|
80 |
<label class="required" for="credito_bandeira" >Selecione a Bandeira:<em>*</em></label>
|
81 |
-
<
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
<input id="bandeiramoip" type="radio" name="payment[credito_instituicao]" value="AmericanExpress" onclick="setCcType('AE');">
|
93 |
-
</li>
|
94 |
-
<li>
|
95 |
-
<img onclick="" src="<?php echo $this->getDinersImage(); ?>" alt="Diners" border="0" onclick="setCcType('DI');">
|
96 |
-
<input id="bandeiramoip" type="radio" name="payment[credito_instituicao]" value="Diners" onclick="setCcType('DI');">
|
97 |
-
</li>
|
98 |
-
<li>
|
99 |
-
<img onclick="" src="<?php echo $this->getHipercardImage(); ?>" alt="Hipercard" border="0" onclick="setCcType('HI');">
|
100 |
-
<input id="bandeiramoip" type="radio" name="payment[credito_instituicao]" value="Hipercard" onclick="setCcType('HI');">
|
101 |
-
</li>
|
102 |
-
</ul>
|
103 |
<div id="checkout-payment-bandeira" class="validation-advice" style="display:none;position:relative;" ></div>
|
104 |
<ul class="form-list">
|
105 |
<li class="wide cc-cvv">
|
5 |
$selector = "";
|
6 |
$dn = "";
|
7 |
?>
|
8 |
+
|
9 |
<script type="text/javascript">
|
10 |
fechar = function(){
|
11 |
jQuery('.moip-payment-method-content').slideUp();
|
61 |
|
62 |
<link rel="stylesheet" type="text/css" href="<?php echo $this->getSkinUrl('O2TI/moip/css/formulario_horizontal.css'); ?>"media="all">
|
63 |
<div id="checkouto2ti">
|
64 |
+
<div id="payment_form_<?php echo $this->getMethodCode() ?>" style="display:none">
|
65 |
<ul class="inline input-switcher moip-payment-methods">
|
66 |
<?php if($this->mostraCartao()): ?>
|
67 |
<li data-target="moip-cartao" class='moip-payment-method-line'>
|
79 |
<li class="moip-payment-method-content row-fluid" id="moip-cartao" style="display:none">
|
80 |
<h3>Cartão de Crédito</h3>
|
81 |
<label class="required" for="credito_bandeira" >Selecione a Bandeira:<em>*</em></label>
|
82 |
+
<div class="input-box">
|
83 |
+
<select name="payment[credito_instituicao]" id="credito_instituicao" class="input-text required-entry" >
|
84 |
+
<option value="">Selecione a Bandeira</option>
|
85 |
+
<option value="Visa">Visa</option>
|
86 |
+
<option value="Mastercard">Mastercard</option>
|
87 |
+
<option value="AmericanExpress">American Express</option>
|
88 |
+
<option value="Diners">Diners</option>
|
89 |
+
<option value="Hipercard">Hipercard</option>
|
90 |
+
</select>
|
91 |
+
</div>
|
92 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
93 |
<div id="checkout-payment-bandeira" class="validation-advice" style="display:none;position:relative;" ></div>
|
94 |
<ul class="form-list">
|
95 |
<li class="wide cc-cvv">
|
app/design/frontend/default/default/template/O2TI/moip/info.phtml
CHANGED
@@ -1,88 +1,352 @@
|
|
|
|
|
|
1 |
|
2 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
|
4 |
-
|
5 |
-
$
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
if($order == ""):
|
14 |
-
$order = $this->getInfo()->getOrder()->getquote_id();
|
15 |
-
$sale_id = Mage::getSingleton('checkout/session')->getLastRealOrderId();
|
16 |
-
endif;
|
17 |
-
if ($sale_id != ""){
|
18 |
-
$connR = Mage::getSingleton('core/resource')->getConnection('core_read');
|
19 |
-
$sql = "SELECT *
|
20 |
-
FROM moip
|
21 |
-
WHERE sale_id IN (".$sale_id.") AND status ='Sucesso'";
|
22 |
-
$_venda = $connR->fetchAll($sql);
|
23 |
-
foreach($_venda as $venda)
|
24 |
-
{
|
25 |
-
$tokenpagamento = $venda['xml_return'];
|
26 |
-
$bandeira = $venda['bandeira'];
|
27 |
-
$formadepagamento = $venda['formapg'];
|
28 |
-
$orderid = $venda['sale_id'];
|
29 |
-
}
|
30 |
-
}
|
31 |
-
else
|
32 |
-
{
|
33 |
-
$connR = Mage::getSingleton('core/resource')->getConnection('core_read');
|
34 |
-
$sql = "SELECT *
|
35 |
-
FROM moip
|
36 |
-
WHERE realorder_id IN (".$order.") AND status ='Sucesso'";
|
37 |
-
$_venda = $connR->fetchAll($sql);
|
38 |
|
39 |
-
|
40 |
-
{
|
41 |
-
$tokenpagamento = $venda['xml_return'];
|
42 |
-
$bandeira = $venda['bandeira'];
|
43 |
-
$formadepagamento = $venda['formapg'];
|
44 |
-
$orderid = $venda['sale_id'];
|
45 |
-
$num_parcelas = $venda['num_parcelas'];
|
46 |
-
$ult_dig = $venda['ult_dig'];
|
47 |
-
|
48 |
-
}
|
49 |
-
}
|
50 |
-
$imagem = $this->getSkinUrl('O2TI/moip/imagem/'.$bandeira.'.png');
|
51 |
-
if($formadepagamento == "BoletoBancario"){
|
52 |
-
$html = "<b> Pago via </b>". $titulo .", por: </br><b>" . $formadepagamento . "</b></br><img src='" . $imagem . "' style='width:80px;float:left;margin:5px;' border='0'>" . "<div id='repagar'><a href='https://www.moip.com.br/Instrucao.do?token=".$tokenpagamento."' style='background: none repeat scroll 0 0 #337BAA;margin:10px;border-radius:3px;padding:10px 5px;width:140px;float:left; text-align:center;color:#ffffff;font-weight:normal;font-size:13px;display:block;text-decoration:none;font-family:Arial,Helvetica,sans-serif' target='_blank'>Imprimir Boleto</a></div>";
|
53 |
-
}
|
54 |
-
if($formadepagamento == "DebitoBancario"){
|
55 |
-
$html = "<b> Pago via </b>". $titulo .", por: </br><b>" . $formadepagamento . "</b></br><img src='" . $imagem . "' style='width:80px;float:left;margin:5px;' border='0'>" . "<div id='repagar'><a href='https://www.moip.com.br/Instrucao.do?token=".$tokenpagamento."' style='background: none repeat scroll 0 0 #337BAA;margin:10px;border-radius:3px;padding:10px 5px;width:140px;float:left; text-align:center;color:#ffffff;font-weight:normal;font-size:13px;display:block;text-decoration:none;font-family:Arial,Helvetica,sans-serif' target='_blank'>Realizar Transferência</a></div>";
|
56 |
-
}
|
57 |
-
if($formadepagamento == "CartaoCredito"){
|
58 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
59 |
|
60 |
-
$params = array(
|
61 |
-
'token' => $venda['xml_return'],
|
62 |
-
'orderId' => $venda['sale_id'],
|
63 |
-
'realorder' => $venda['realorder_id'],
|
64 |
-
);
|
65 |
-
$urldosite = Mage::getBaseUrl('web', true);
|
66 |
-
$url = $urldosite."Moip/standard/redirect/";
|
67 |
-
if ($num_parcelas == "")
|
68 |
-
{
|
69 |
-
$num_parcelas = "Acesse seu cadastro";
|
70 |
-
}
|
71 |
-
if ($ult_dig == "")
|
72 |
-
{
|
73 |
-
$ult_dig = "Acesse seu cadastro";
|
74 |
-
}
|
75 |
-
$html = "<div>
|
76 |
-
<b> Pago via </b>{$titulo}, por: </br>
|
77 |
-
<b>{$formadepagamento}</b></br>
|
78 |
-
<img src='{$imagem}' style='width:80px;float:left;margin:5px;' border='0'>" . "
|
79 |
-
<div>Bandeira:<b> {$bandeira}</b></div>
|
80 |
-
<div>Pago em: <b>{$num_parcelas}</b> parcela(s)</div>
|
81 |
-
<div>4 últimos dígitos do cartão: <b>{$ult_dig}</b></div>
|
82 |
-
</div>";
|
83 |
|
84 |
-
}
|
85 |
|
|
|
86 |
|
87 |
-
|
88 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
/* Mage::getModel("sales/order")->getCollection()->getLastItem()->getIncrementId(); */
|
3 |
|
4 |
+
if(Mage::app()->getRequest()->getModuleName() != "onestepcheckout" && Mage::app()->getRequest()->getModuleName() != "checkout"){
|
5 |
+
$css_email = "display: block;float: left;clear: both !important;border-radius: 10px;color: #fff;font-size: 16pt;font-weight: bold;text-align: center;text-transform: uppercase;position: relative;margin-left: 70px;margin-top: 10px;margin-bottom: 25px;background: #ff9900;background: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJod…EiIGhlaWdodD0iMSIgZmlsbD0idXJsKCNncmFkLXVjZ2ctZ2VuZXJhdGVkKSIgLz4KPC9zdmc+);
|
6 |
+
background: -moz-linear-gradient(top, #ff9900 0%, #ff6600 100%);background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ff9900), color-stop(100%,#ff6600));
|
7 |
+
background: -webkit-linear-gradient(top, #ff9900 0%,#ff6600 100%);background: -o-linear-gradient(top, #ff9900 0%,#ff6600 100%);background: -ms-linear-gradient(top, #ff9900 0%,#ff6600 100%);background: linear-gradient(to bottom, #ff9900 0%,#ff6600 100%);filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ff9900', endColorstr='#ff6600',GradientType=0 );line-height: 20px;position: relative;";
|
8 |
+
$css_boleto = "padding: 15px 20px 15px 55px;border: 0;";
|
9 |
+
$css_trans = "padding: 20px 20px 20px 40px";
|
10 |
+
$css_email_img = "position: absolute !important;left: -70px !important;top: -20px !important;min-height: 100px;width: 115px;";
|
11 |
+
?>
|
12 |
+
<?php $info = $this->_prepareInfo(); ?>
|
13 |
+
<?php if($info['result_meio'] == "Cartão de Crédito"): ?>
|
14 |
+
<div class="cartao" style="width:100%">
|
15 |
+
<h4>Pago em <?php echo $info['creditcard_parc']; ?> parcelas via:</h4>
|
16 |
+
</div>
|
17 |
+
<div class="cartao" style="width:100%">
|
18 |
+
<div class="image" style="width:30%; float:left;">
|
19 |
+
<?php $imagem = $info['brand']; ?>
|
20 |
+
<div class="image" style="padding:5px"><img src="<?php echo $this->getSkinUrl('O2TI/moip/imagem/'); echo "Visa"; echo ".png"; ?>"></div>
|
21 |
+
</div>
|
22 |
+
<div class="dados" style="width:70%; float:left">
|
23 |
+
<label>6 Primeiros dígitos do cartão</label>
|
24 |
+
<div class="input-text"><strong><?php echo $info['first6'] ?></strong></div>
|
25 |
+
<label>4 Últimos dígitos do cartão</label>
|
26 |
+
<div class="input-text"><strong><?php echo $info['last4'] ?></strong></div>
|
27 |
+
</div>
|
28 |
+
</div>
|
29 |
+
<?php endif ?>
|
30 |
|
31 |
+
|
32 |
+
<?php if($info['result_meio'] == "Boleto Bancário"): ?>
|
33 |
+
<div class="metodo title"><h3><?php echo $info['result_meio'] ?></h3></div>
|
34 |
+
<div style="clear:both; width:100%;">
|
35 |
+
<button style="<?php echo $css_email.$css_boleto ?>" onclick="window.location='<?php echo $info['url'] ?>'" ><div style="<?php echo $css_email_img; ?>background:url(<?php echo $this->getSkinUrl('O2TI/moip/imagem/printer.png');echo") no-repeat;"; ?>"/></div>Visualize o boleto aqui</span></button>
|
36 |
+
</div></br>
|
37 |
+
<div class="boleto_line_title"><h4>Ou Cópie o endereço:</h4></div>
|
38 |
+
<div class="boleto_line"><input type="text" class="input-text" value="<?php echo $info['url'] ?>" readonly="true" style="width:350px"></div>
|
39 |
+
<?php endif ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
40 |
|
41 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
42 |
|
43 |
+
<?php if($info['result_meio'] == "Transferência Bancária"): ?>
|
44 |
+
<div class="metodo title"><h3><?php echo $info['result_meio'] ?></h3></div>
|
45 |
+
<div class="trans" style="width:100%">
|
46 |
+
<div style="clear:both;width:100%"><button type="button" title="Finalizar compra" style="<?php echo $css_email.$css_trans ?>" onclick="window.location='<?php echo $info['url'] ?>'"><div style="<?php echo $css_email_img; ?>background:url(<?php echo $this->getSkinUrl('O2TI/moip/imagem/bank-icon.png');echo") no-repeat;"; ?>"/></div>Ir ao Banco</button></div>
|
47 |
+
<div class="boleto_line_title" style="clear:both;width:100%"><h4>Ou Cole a Url na Barra do Navegador:</h4></div>
|
48 |
+
<div class="boleto_line" style="clear:both;width:100%"><input type="text" class="input-text" value="<?php echo $info['url'] ?>" readonly="true" style="width:350px"></div>
|
49 |
+
</div>
|
50 |
+
<?php endif ?>
|
51 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
52 |
|
53 |
+
<?php } if(Mage::app()->getRequest()->getModuleName() == "onestepcheckout" || Mage::app()->getRequest()->getModuleName() == "checkout" ) { ?>
|
54 |
|
55 |
+
<?php echo "Pagamento via MoIP" ?>
|
56 |
|
57 |
+
<?php } if(Mage::app()->getRequest()->getModuleName() == "sales"): ?>
|
58 |
+
<?php
|
59 |
+
$order = Mage::getModel('sales/order')->load($info['realorder_id'], 'increment_id');
|
60 |
+
$states = $order->getStatus();
|
61 |
+
if($states == "pending" || $order->isCanceled()){
|
62 |
+
$api = $this->getMoip();
|
63 |
+
$resposta_moip = $info['token'];
|
64 |
+
if (Mage::getSingleton('moip/standard')->getConfigData('ambiente') == "teste") {
|
65 |
+
$url = "https://desenvolvedor.moip.com.br/sandbox/Instrucao.do?token=";
|
66 |
+
$urljs = "https://desenvolvedor.moip.com.br/sandbox/";
|
67 |
+
}
|
68 |
+
else {
|
69 |
+
$url = "https://www.moip.com.br/Instrucao.do?token=";
|
70 |
+
$urljs = "https://www.moip.com.br/";
|
71 |
+
}
|
72 |
+
?>
|
73 |
+
<script type="text/javascript" charset="ISO-8859-1" src="<?php echo $urljs ?>/transparente/MoipWidget-v2.js" onerror="erro_mail('erro caiu o moip widget')" ></script>
|
74 |
+
<div id="MoipWidget" data-token="<?php echo $info['token'] ?>" callback-method-error="erroValidacao" callback-method-success="sucesso"></div>
|
75 |
+
<div class="refaz_pg" style="clear:both;width:100%">
|
76 |
+
<div>
|
77 |
+
<button type="button" title="Finalizar compra" style="background:none repeat scroll 0 0 #337baa;margin:10px;border-radius:3px;padding:10px 5px;width:250px;float:left;text-align:center;color:#ffffff;font-weight:normal;font-size:13px;display:block;text-decoration:none;font-family:Arial,Helvetica,sans-serif;border: none;margin-top: 10px !important;" onclick="jQuery('#showXml').modal('toggle')">
|
78 |
+
Escolher outra forma de pagamento
|
79 |
+
</button>
|
80 |
+
</div>
|
81 |
+
</div>
|
82 |
+
<div class="modal" id="showXml" style="display:none; width:38%; left:52%; min-width:250px;">
|
83 |
+
<div class="modal-header">
|
84 |
+
<button class="close" data-dismiss="modal">x</button><h3>Escolha a nova forma de pagamento.</h3>
|
85 |
+
</div>
|
86 |
+
<div class="modal-body">
|
87 |
+
<h4>Você poderá escolher uma nova forma de pagamento, selecionando os meios disponíveis a baixo:</h4>
|
88 |
+
<div style="display: none;" id="loading-mask">
|
89 |
+
<p id="loading_mask_loader" class="loader"><img alt="Loading..." src="<?php echo $this->getSkinUrl('O2TI/onestepcheckout/images/ajax-loader-tr.gif')?>"><br>Realizando pagamento, por favor aguarde...</p>
|
90 |
+
</div>
|
91 |
+
<div class="retorno_moip">
|
92 |
+
</div>
|
93 |
+
<form method="POST" action='<?php echo Mage::getBaseUrl(); ?>moip/index/Novaforma/' id="refaz_pg_forma">
|
94 |
+
<input type="hidden" name="forma_de_pagamento" id="forma_de_pagamento" value="" >
|
95 |
+
<input type="hidden" name="moip_id" value="<?php echo $info['token'] ?>">
|
96 |
+
<input type="hidden" name="order_id" value="<?php echo $info['realorder_id'] ?>">
|
97 |
+
|
98 |
+
|
99 |
+
<div class= "seleciona_meio" style="border-bottom:2px solid #eeeee0;">
|
100 |
+
<ul class="inline input-switcher moip-payment-methods" style="display: inline-flex;">
|
101 |
+
<!--li data-target="CartaoCredito" class='moip-payment-method-line' style="padding: 10px 15px;background: #EEE;border-radius: 5px 5px 0 0;margin-right: 10px;cursor:pointer;">
|
102 |
+
Cartão de Crédito
|
103 |
+
</li -->
|
104 |
+
<li data-target="BoletoBancario" class='moip-payment-method-line' style="padding: 10px 15px;background: #EEE;border-radius: 5px 5px 0 0;margin-right: 10px;cursor:pointer;">
|
105 |
+
Boleto Bancário
|
106 |
+
</li>
|
107 |
+
<li data-target="DebitoBancario" class='moip-payment-method-line' style="padding: 10px 15px;background: #EEE;border-radius: 5px 5px 0 0;margin-right: 10px;cursor:pointer;">
|
108 |
+
Débito Bancário
|
109 |
+
</li>
|
110 |
+
</ul>
|
111 |
+
</div>
|
112 |
+
|
113 |
+
|
114 |
+
<div class="moip-payment-method-content row-fluid" id="DebitoBancario" style="display:none">
|
115 |
+
<h2>Transferência Bancária</h2>
|
116 |
+
<div style="width:100%">É obrigatório ter token do banco para realizar esse processo.</div>
|
117 |
+
<div><h4>Selecione o Banco.</h4></div>
|
118 |
+
<div>
|
119 |
+
<ul>
|
120 |
+
<li><label><input type="radio" name="instituicao" id="instituicao" value="BancodoBrasil" onclick="jQuery('.pagar_trans').show()"> Banco do Brasil</label></li>
|
121 |
+
<li><label><input type="radio" name="instituicao" id="instituicao" value="Bradesco" onclick="jQuery('.pagar_trans').show()"> Bradesco</label></li>
|
122 |
+
<li><label><input type="radio" name="instituicao" id="instituicao" value="Itau" onclick="jQuery('.pagar_trans').show()"> Itaú</label></li>
|
123 |
+
<li><label><input type="radio" name="instituicao" id="instituicao" value="Banrisul" onclick="jQuery('.pagar_trans').show()"> Banrisul</label></li>
|
124 |
+
</ul>
|
125 |
+
|
126 |
+
</div>
|
127 |
+
<div class="pagar_trans" style="display:none;">
|
128 |
+
<button id="sendToMoip2" style="margin-top: 10px;" class="btn-moip buttonmoip" onclick="jQuery('#loading-mask').show();jQuery('#refaz_pg_form').hide('slow');">Pagar Agora</button>
|
129 |
+
</div>
|
130 |
+
</div>
|
131 |
+
|
132 |
+
<div class="moip-payment-method-content row-fluid" id="BoletoBancario" style="display:none">
|
133 |
+
<h2>Boleto Bancário</h2>
|
134 |
+
<div>Pagável até a data do vencimento em qualquer Casa lotérica, via internet-bank ou caixa eletrônico do seu banco.</div>
|
135 |
+
<button id="sendToMoip2" style="margin-top: 10px;" class="btn-moip buttonmoip" onclick="jQuery('#loading-mask').show();jQuery('#refaz_pg_form').hide('slow');">Pagar Agora</button>
|
136 |
+
</div>
|
137 |
+
|
138 |
+
<div class="moip-payment-method-content row-fluid" id="CartaoCredito" style="display:none">
|
139 |
+
<div class="well">
|
140 |
+
<ul class="repay-form">
|
141 |
+
<div class="cartao_dados">
|
142 |
+
<li>
|
143 |
+
<h3>Dados do Cartão</h3>
|
144 |
+
</li>
|
145 |
+
<li>
|
146 |
+
<label>Parcelas:</label>
|
147 |
+
<?php $pgtoArray = $this->getOrder_dados(Mage::registry('client_array')); ?>
|
148 |
+
<?php $order = Mage::getModel('sales/order')->loadByIncrementId($info['realorder_id']); ?>
|
149 |
+
<?php $parcelamento = $api->getParcelamento(number_format($order->getGrand_total(), 2, ".", ".")); $z=0;?>
|
150 |
+
<select id="Parcelas" name="parcelas">
|
151 |
+
<?php foreach ($parcelamento as $k => $v):?>
|
152 |
+
<?php if($z=="0"){ ?>
|
153 |
+
<option value="1">Pagamento à vista.</option>
|
154 |
+
<?php } ?>
|
155 |
+
<option value="<?php echo $k ?>"><?php echo $k . "x R$ " . $v['valor'] . " | Total: R$ " .$v['total']."" ?></option>
|
156 |
+
<?php $z++; endforeach; ?>
|
157 |
+
</select>
|
158 |
+
</li>
|
159 |
+
<li>
|
160 |
+
<label>Instituição:</label>
|
161 |
+
<select id="bandeira" name="bandeira">
|
162 |
+
<option value="VISA">Visa</option>
|
163 |
+
<option value="MASTERCARD">Mastercard</option>
|
164 |
+
<option value="AMERICANEXPRESS">AmericanExpress</option>
|
165 |
+
<option value="HIPERCARD">Hipercard</option>
|
166 |
+
<option value="DINERS">Diners</option>
|
167 |
+
</select>
|
168 |
+
</li>
|
169 |
+
<li>
|
170 |
+
<div>
|
171 |
+
<label>Numero do Cartão:</label>
|
172 |
+
<input type="text" id="Numero" name="Numero" class="input-text" >
|
173 |
+
</div>
|
174 |
+
<div>
|
175 |
+
<label>CVV:</label>
|
176 |
+
<input type="text" id="CodigoSeguranca" class="input-text" name="CodigoSeguranca" size="4">
|
177 |
+
</div>
|
178 |
+
</li>
|
179 |
+
<li>
|
180 |
+
<label>Expiração:</label>
|
181 |
+
<input type="text" id="Expiracao" name="Expiracao_mes" onkeypress="return txtBoxFormat(this, '99', event);" maxlength="2" placeholder="Ex. 10/15" size="2" class="input-text" >
|
182 |
+
<input type="text" id="Expiracao" name="Expiracao_ano" onkeypress="return txtBoxFormat(this, '99', event);" maxlength="2" placeholder="Ex. 10/15" size="2" class="input-text" >
|
183 |
+
</li>
|
184 |
+
<li>
|
185 |
+
<button type="button" id="sendToMoip2" class="btn-moip buttonmoip" style="margin-top: 10px !important;" onclick="jQuery('.cartao_dados').hide();jQuery('.pagador_dados_pessoais').show('slow');">Prosseguir</button>
|
186 |
+
</li>
|
187 |
+
</div>
|
188 |
+
<div class="pagador_dados_pessoais" style="display:none">
|
189 |
+
<li>
|
190 |
+
<h3>Dados do Títular do Cartão</h3>
|
191 |
+
</li>
|
192 |
+
<li>
|
193 |
+
<label>Portador:</label>
|
194 |
+
<input type="text" id="Portador" name="Portador" class="input-text" >
|
195 |
+
</li>
|
196 |
+
<li>
|
197 |
+
<label>CPF:</label>
|
198 |
+
<input type="text" id="CPF" name="CPF" class="input-text" onkeypress="return txtBoxFormat(this, '99999999999', event);" maxlength="11">
|
199 |
+
</li>
|
200 |
+
<li>
|
201 |
+
<label>Data Nascimento:</label>
|
202 |
+
<input type="text" id="DataNascimento" name="DataNascimento" onkeypress="return txtBoxFormat(this, '99/99/9999', event);" maxlength="10" placeholder="Ex. 10/10/1985" class="input-text" ><br>
|
203 |
+
</li>
|
204 |
+
<li>
|
205 |
+
<label>Telefone:</label>
|
206 |
+
<input type="text" id="Telefone" name="Telefone" onkeypress="return txtBoxFormat(this, '(99)9999-9999', event);" placeholder="Ex. (11)9999-9999" maxlength="14" class="input-text" ><br>
|
207 |
+
</li>
|
208 |
+
<li>
|
209 |
+
<a href="#" style="margin-top: 10px !important; float:left" onclick="jQuery('.cartao_dados').show('slow');jQuery('.pagador_dados_pessoais').hide();">← Voltar</a>
|
210 |
+
<button id="sendToMoip2" class="btn-moip buttonmoip" style="margin-top: -30px !important; float:left" onclick="jQuery('#loading-mask').show();jQuery('#refaz_pg_form').hide('slow');">Pagar Agora</button>
|
211 |
+
</li>
|
212 |
+
</div>
|
213 |
+
</ul>
|
214 |
+
</div>
|
215 |
+
</div>
|
216 |
+
</form>
|
217 |
+
<div class="resposta_recebida"></div>
|
218 |
+
</div>
|
219 |
+
</div>
|
220 |
+
<script type="text/javascript">
|
221 |
+
jQuery(document).ready(function() {
|
222 |
+
jQuery('.input-switcher > li').bind({
|
223 |
+
click: function() {
|
224 |
+
jQuery(this).parent().children('li').fadeTo(300, 0.4);
|
225 |
+
jQuery('#checkout-payment-bandeira').hide();
|
226 |
+
jQuery('#checkout-payment-banco').hide();
|
227 |
+
jQuery(this).fadeTo(0, 1);
|
228 |
+
jQuery(this).find('input[type="radio"]').attr('checked', true);
|
229 |
+
}
|
230 |
+
});
|
231 |
+
jQuery('.moip-payment-methods > li').bind({
|
232 |
+
click: function() {
|
233 |
+
jQuery('.moip-payment-method-content').not('#' + jQuery(this).attr('data-target')).slideUp();
|
234 |
+
jQuery('#' + jQuery(this).attr('data-target')).slideDown();
|
235 |
+
jQuery('#forma_de_pagamento').val(jQuery(this).attr('data-target'));
|
236 |
+
}
|
237 |
+
});
|
238 |
+
});
|
239 |
+
|
240 |
+
var sucesso = function(data){
|
241 |
+
var data = JSON.stringify(data);
|
242 |
+
jQuery("#loading_mask_loader").hide();
|
243 |
+
if(jQuery("#forma_de_pagamento").val() == "BoletoBancario"){
|
244 |
+
jQuery(".retorno_moip").html("<a href='<?php echo $info['url'] ?>'>Cique Aqui para visualizar o boleto</a>");
|
245 |
+
};
|
246 |
+
if(jQuery("#forma_de_pagamento").val() == "DebitoBancario"){
|
247 |
+
jQuery(".retorno_moip").html("<a href='<?php echo $info['url'] ?>'>Cique Aqui para ir ao banco</a>");
|
248 |
+
};
|
249 |
+
if(jQuery("#forma_de_pagamento").val() == "CartaoCredito"){
|
250 |
+
if (data.Status == "Cancelado"){
|
251 |
+
jQuery(".retorno_moip").append("<h3>Pagamento Cancelado</h3>");
|
252 |
+
jQuery(".retorno_moip").append("Transação não aprovada.");
|
253 |
+
if(data.hasOwnProperty(data.Classificacao)){
|
254 |
+
var motivo = JSON.stringify(data.Classificacao.Descricao);
|
255 |
+
} else{
|
256 |
+
var motivo = "semretorno";
|
257 |
+
}
|
258 |
+
if(motivo == '"Desconhecido"'){
|
259 |
+
jQuery(".erros_moip").html("Seus dados estão incorretos ou não podemos envia-los a operadora de crédito.");
|
260 |
+
}
|
261 |
+
if(motivo == '"Transação não processada"'){
|
262 |
+
jQuery(".erros_moip").html("O pagamento não pode ser processado.</br>Por favor, tente novamente.</br>Caso o erro persista, entre em contato com o nosso atendimento.");
|
263 |
+
}
|
264 |
+
if(motivo == '"Política de segurança do Moip"'){
|
265 |
+
jQuery(".erros_moip").html("Pagamento não autorizado.</br>Entre em contato com o seu banco antes de uma nova tentativa.");
|
266 |
+
}
|
267 |
+
if(motivo == '"Política de segurança do Banco Emissor"'){
|
268 |
+
jQuery(".erros_moip").html("O pagamento não foi autorizado pelo Banco Emissor do seu Cartão.</br>Entre em contato com o Banco para entender o motivo e refazer o pagamento..");
|
269 |
+
}
|
270 |
+
if(motivo == '"Cartão vencido"'){
|
271 |
+
jQuery(".erros_moip").html("A validade do seu Cartão expirou.</br>Escolha outra forma de pagamento para concluir o pagamento.");
|
272 |
+
}
|
273 |
+
if(motivo == '"Dados inválidos"'){
|
274 |
+
jQuery(".erros_moip").html("Dados informados inválidos.</br>Você digitou algo errado durante o preenchimento dos dados do seu Cartão.</br>Certifique-se de que está usando o Cartão correto e faça uma nova tentativa.");
|
275 |
+
}
|
276 |
+
if(motivo =='semretorno' ){
|
277 |
+
jQuery(".erros_moip").html("Verifique os dados e tente pagar novamente.");
|
278 |
+
}
|
279 |
+
}
|
280 |
+
if (data.Status == "EmAnalise"){
|
281 |
+
jQuery(".retorno_moip").append("<h3>Pagamento Aguardando Aprovação</h3>");
|
282 |
+
jQuery(".retorno_moip").append("Por favor, aguarde a em análise da transação. Assim que for alterado o status você será informado via e-mail.");
|
283 |
+
|
284 |
+
}
|
285 |
+
if (data.Status == "Autorizado"){
|
286 |
+
jQuery(".retorno_moip").append("<h3>Pagamento Aprovado</h3>");
|
287 |
+
jQuery(".retorno_moip").append("Por favor, aguarde o processo de envio.");
|
288 |
+
|
289 |
+
}
|
290 |
+
|
291 |
+
};
|
292 |
+
}
|
293 |
+
var erroValidacao = function(data) {
|
294 |
+
jQuery(".retorno_moip").html("Pagamento não pode ser refeito, confira os dados e tente novamente.");
|
295 |
+
jQuery("#refaz_pg_forma").show();
|
296 |
+
}
|
297 |
+
jQuery("#refaz_pg_forma").submit(function(e){
|
298 |
+
var postData = jQuery(this).serializeArray();
|
299 |
+
var formURL = jQuery(this).attr("action");
|
300 |
+
jQuery("#refaz_pg_forma").hide();
|
301 |
+
jQuery("#loading_mask_loader").show();
|
302 |
+
jQuery.ajax(
|
303 |
+
{
|
304 |
+
url : formURL,
|
305 |
+
type: "POST",
|
306 |
+
data : postData,
|
307 |
+
success:function(data, textStatus, jqXHR)
|
308 |
+
{
|
309 |
+
if(jQuery("#forma_de_pagamento").val() == "BoletoBancario"){
|
310 |
+
var settings = {
|
311 |
+
"Forma" : "BoletoBancario"
|
312 |
+
};
|
313 |
+
};
|
314 |
+
if(jQuery("#forma_de_pagamento").val() == "DebitoBancario"){
|
315 |
+
var settings = {
|
316 |
+
"Forma" : "DebitoBancario",
|
317 |
+
"Instituicao": "BancoDoBrasil"
|
318 |
+
};
|
319 |
+
};
|
320 |
+
if(jQuery("#forma_de_pagamento").val() == "CartaoCredito")
|
321 |
+
{
|
322 |
+
var settings =
|
323 |
+
{
|
324 |
+
"Forma": "CartaoCredito",
|
325 |
+
"Instituicao": jQuery("#bandeira").val(),
|
326 |
+
"Parcelas": jQuery("#Parcelas").val(),
|
327 |
+
"CartaoCredito":
|
328 |
+
{
|
329 |
+
"Numero": jQuery("input[name=Numero]").val(),
|
330 |
+
"Expiracao": jQuery("input[name=Expiracao_mes]").val()+'/'+jQuery("input[name=Expiracao_ano]").val(),
|
331 |
+
"CodigoSeguranca": jQuery("input[name=CodigoSeguranca]").val(),
|
332 |
+
"Portador": {
|
333 |
+
"Nome" : jQuery("input[name=Portador]").val(),
|
334 |
+
"DataNascimento": jQuery("input[name=DataNascimento]").val(),
|
335 |
+
"Telefone": jQuery("input[name=Telefone]").val(),
|
336 |
+
"Identidade": jQuery("input[name=CPF]").val()
|
337 |
+
}
|
338 |
+
}
|
339 |
+
}
|
340 |
+
};
|
341 |
+
MoipWidget(settings);
|
342 |
+
},
|
343 |
+
|
344 |
+
});
|
345 |
+
e.preventDefault();
|
346 |
+
});
|
347 |
+
|
348 |
+
|
349 |
+
</script>
|
350 |
+
<?php
|
351 |
+
}
|
352 |
+
endif; ?>
|
app/design/frontend/default/default/template/O2TI/moip/layout_boleto.phtml
ADDED
@@ -0,0 +1,508 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php $boleto = $this->getBoleto_Moip(Mage::registry('result_decode')); ?>
|
2 |
+
<?php $cliente = $this->getCliente(Mage::registry('client_array')); ?>
|
3 |
+
<?php $pgtoArray = $this->getOrder_dados(Mage::registry('client_array')); ?>
|
4 |
+
<?php $order = Mage::getModel('sales/order')->loadByIncrementId($pgtoArray['id_transacao']); ?>
|
5 |
+
<?php $this->getSaveDate($pgtoArray['id_transacao'], $boleto, Mage::registry('result_decode'), Mage::registry('dados_boleto'), Mage::registry('pgtoarry'), 'BoletoBancario'); ?>
|
6 |
+
<?php $vcmento = date("d/m/Y", strtotime($boleto['expirationDate'])); ?>
|
7 |
+
<?php $data_hj = date("d/m/Y") ?>
|
8 |
+
<?php $total = $boleto['total'] ?>
|
9 |
+
<?php $total = ($total/100); ?>
|
10 |
+
<?php $total = number_format($total,'2',',',''); ?>
|
11 |
+
|
12 |
+
<html>
|
13 |
+
<head>
|
14 |
+
<meta http-equiv="content-type" content="text/html">
|
15 |
+
<title>Boleto Bradesco</title>
|
16 |
+
<style>
|
17 |
+
div{
|
18 |
+
font-family: arial;
|
19 |
+
size: 11px;
|
20 |
+
}
|
21 |
+
|
22 |
+
.btn_print:hover{
|
23 |
+
color: #333333;
|
24 |
+
background-color: #e6e6e6;
|
25 |
+
*background-color: #d9d9d9;
|
26 |
+
cursor: pointer;
|
27 |
+
-webkit-appearance: button;
|
28 |
+
}
|
29 |
+
|
30 |
+
.btn_print {
|
31 |
+
display: inline-block;
|
32 |
+
*display: inline;
|
33 |
+
padding: 4px 14px;
|
34 |
+
margin-bottom: 0;
|
35 |
+
*margin-left: .3em;
|
36 |
+
font-size: 14px;
|
37 |
+
line-height: 20px;
|
38 |
+
*line-height: 20px;
|
39 |
+
color: #333333;
|
40 |
+
text-align: center;
|
41 |
+
text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);
|
42 |
+
vertical-align: middle;
|
43 |
+
cursor: pointer;
|
44 |
+
background-color: #f5f5f5;
|
45 |
+
*background-color: #e6e6e6;
|
46 |
+
background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6));
|
47 |
+
background-image: -webkit-linear-gradient(top, #ffffff, #e6e6e6);
|
48 |
+
background-image: -o-linear-gradient(top, #ffffff, #e6e6e6);
|
49 |
+
background-image: linear-gradient(to bottom, #ffffff, #e6e6e6);
|
50 |
+
background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6);
|
51 |
+
background-repeat: repeat-x;
|
52 |
+
border: 1px solid #bbbbbb;
|
53 |
+
*border: 0;
|
54 |
+
border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
|
55 |
+
border-color: #e6e6e6 #e6e6e6 #bfbfbf;
|
56 |
+
border-bottom-color: #a2a2a2;
|
57 |
+
-webkit-border-radius: 4px;
|
58 |
+
-moz-border-radius: 4px;
|
59 |
+
border-radius: 4px;
|
60 |
+
filter: progid:dximagetransform.microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe6e6e6', GradientType=0);
|
61 |
+
filter: progid:dximagetransform.microsoft.gradient(enabled=false);
|
62 |
+
*zoom: 1;
|
63 |
+
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
|
64 |
+
-moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
|
65 |
+
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
|
66 |
+
}
|
67 |
+
|
68 |
+
.right{
|
69 |
+
float:right;
|
70 |
+
}
|
71 |
+
|
72 |
+
.editable_line{
|
73 |
+
float:right;text-align:right;padding-right:5px;margin-top:15px;margin-bottom:9px;width:400px;
|
74 |
+
}
|
75 |
+
</style>
|
76 |
+
</head>
|
77 |
+
|
78 |
+
<body leftmargin="0" topmargin="0" text="#000000" vlink="#990000" alink="#ff0000" bgcolor="#ffffff" link="#aa0000">
|
79 |
+
|
80 |
+
<div style="width:100%; padding:12px 12px 12px 0">
|
81 |
+
|
82 |
+
<div style="clear:left">
|
83 |
+
<div style="float:left;margin-top:7px;">
|
84 |
+
<strong>Imprima e pague seu boleto</strong><br/>
|
85 |
+
em qualquer agência bancária até o vencimento.<br/>
|
86 |
+
Não imprima em modo rascunho.
|
87 |
+
</div>
|
88 |
+
<div id="btn_print" class="btn_print right" style="margin-top:23px;" onClick="window.print();return false">
|
89 |
+
<img src="<?php echo $this->getSkinUrl('O2TI/moip/imagem/icon_print_14x14.png') ?>" width="14" height="14"> imprimir
|
90 |
+
</div>
|
91 |
+
</div>
|
92 |
+
<div style="clear:left">
|
93 |
+
<div style="float:left;margin-top:7px;">
|
94 |
+
<strong>Pague pelo internet banking</strong><br/>
|
95 |
+
utilize a linha editável ao lado
|
96 |
+
</div>
|
97 |
+
<input type="text" value="<?php echo $boleto['line']; ?>" class="editable_line input-text">
|
98 |
+
</div>
|
99 |
+
</div>
|
100 |
+
|
101 |
+
<table width="100%" border="0" cellpadding="0" cellspacing="0">
|
102 |
+
<tbody>
|
103 |
+
<tr>
|
104 |
+
<td>
|
105 |
+
<div align="right">
|
106 |
+
<font face="Arial, Helvetica, sans-serif">
|
107 |
+
<i>
|
108 |
+
<font size="1">Cortar nas linhas Pontilhadas </font>
|
109 |
+
</i>
|
110 |
+
</font>
|
111 |
+
</div>
|
112 |
+
</td>
|
113 |
+
</tr>
|
114 |
+
<tr valign="top">
|
115 |
+
<td>
|
116 |
+
<img src="<?php echo $this->getSkinUrl('O2TI/moip/imagem//tesoura.gif') ?>" style="margin-bottom: 3px;" width="100%" height="5">
|
117 |
+
</td>
|
118 |
+
</tr>
|
119 |
+
</tbody>
|
120 |
+
</table>
|
121 |
+
<table width="100%" border="0" cellpadding="0" cellspacing="0">
|
122 |
+
<tbody>
|
123 |
+
<tr>
|
124 |
+
<td width="320">
|
125 |
+
<font size="3" face="Arial, Helvetica, sans-serif">
|
126 |
+
<img src="<?php echo $this->getSkinUrl('O2TI/moip/imagem//ico.gif') ?>" vspace="0" width="25" align="absbottom" height="23" hspace="1">
|
127 |
+
<b> Bradesco</b>
|
128 |
+
</font>
|
129 |
+
</td>
|
130 |
+
<td valign="bottom" width="320" align="right">
|
131 |
+
<b>
|
132 |
+
<font size="3" face="Arial, Helvetica, sans-serif">Recibo do Sacado</font>
|
133 |
+
</b>
|
134 |
+
</td>
|
135 |
+
</tr>
|
136 |
+
</tbody>
|
137 |
+
</table>
|
138 |
+
<table bordercolorlight="#FFFFFF" width="100%" border="1" cellpadding="0" cellspacing="0">
|
139 |
+
<tbody>
|
140 |
+
<tr>
|
141 |
+
<td width="43%">
|
142 |
+
<font size="1" face="Arial, Helvetica, sans-serif"> Cedente<br></font>
|
143 |
+
<font size="2" face="Arial, Helvetica, sans-serif">
|
144 |
+
<b> <?php echo Mage::app()->getWebsite()->getName(); ?> | MoIP S.A.</b>
|
145 |
+
</font>
|
146 |
+
<font size="1" face="Arial, Helvetica, sans-serif"> </font>
|
147 |
+
</td>
|
148 |
+
<td width="21%">
|
149 |
+
<div align="center">
|
150 |
+
<font size="1" face="Arial, Helvetica, sans-serif"> Agência/Cod. Cedente<br></font>
|
151 |
+
<font size="2" face="Arial, Helvetica, sans-serif">3391-0 / 0017479-3</font>
|
152 |
+
<font size="1" face="Arial, Helvetica, sans-serif"></font>
|
153 |
+
</div>
|
154 |
+
</td>
|
155 |
+
<td width="18%">
|
156 |
+
<div align="center">
|
157 |
+
<font size="1" face="Arial, Helvetica, sans-serif">Data do Documento<br></font>
|
158 |
+
<font size="2" face="Arial, Helvetica, sans-serif"><?php echo $data_hj ?></font>
|
159 |
+
</div>
|
160 |
+
</td>
|
161 |
+
<td width="18%">
|
162 |
+
<font size="1" face="Arial, Helvetica, sans-serif"> Vencimento</font>
|
163 |
+
<font size="3" face="Arial">
|
164 |
+
<b>
|
165 |
+
<div align="right">
|
166 |
+
<font size="2" face="Arial, Helvetica, sans-serif"><?php echo $vcmento ?> </font>
|
167 |
+
</div>
|
168 |
+
</b>
|
169 |
+
</font>
|
170 |
+
</td>
|
171 |
+
</tr>
|
172 |
+
<tr>
|
173 |
+
<td width="43%">
|
174 |
+
<font size="1" face="Arial"> Sacado </font>
|
175 |
+
<font size="1" face="Arial, Helvetica, sans-serif"><br></font>
|
176 |
+
<font size="2" face="Arial, Helvetica, sans-serif">
|
177 |
+
<b> </b>
|
178 |
+
</font>
|
179 |
+
<font size="2" face="Arial">
|
180 |
+
<b><?php echo $cliente['pagador_nome'] ?></b>
|
181 |
+
</font>
|
182 |
+
<font size="1" face="Arial, Helvetica, sans-serif"> </font>
|
183 |
+
</td>
|
184 |
+
<td width="21%">
|
185 |
+
<div align="center">
|
186 |
+
<font size="1" face="Arial">Número Documento</font>
|
187 |
+
<font size="1" face="Arial, Helvetica, sans-serif"><br></font>
|
188 |
+
<font size="2" face="Arial"> como obeter???????</font>
|
189 |
+
<font size="1" face="Arial, Helvetica, sans-serif"></font>
|
190 |
+
</div>
|
191 |
+
</td>
|
192 |
+
<td width="18%">
|
193 |
+
<div align="center">
|
194 |
+
<font size="1" face="Arial">Carteira/Nosso Número</font>
|
195 |
+
<font size="1" face="Arial, Helvetica, sans-serif"><br></font>
|
196 |
+
<font size="2" face="Arial">25/como obeter?</font>
|
197 |
+
</div>
|
198 |
+
</td>
|
199 |
+
<td width="18%">
|
200 |
+
<font size="1" face="Arial, Helvetica, sans-serif"> Valor do Documento<br></font>
|
201 |
+
<font size="3" face="Arial">
|
202 |
+
<b>
|
203 |
+
<div align="right">
|
204 |
+
<font size="2" face="Arial, Helvetica, sans-serif">
|
205 |
+
<b><?php echo $total; ?></b>
|
206 |
+
</font>
|
207 |
+
<font size="3" face="Arial">
|
208 |
+
<b>
|
209 |
+
<font size="2" face="Arial, Helvetica, sans-serif"> </font>
|
210 |
+
</b>
|
211 |
+
</font>
|
212 |
+
</div>
|
213 |
+
</b>
|
214 |
+
</font>
|
215 |
+
</td>
|
216 |
+
</tr>
|
217 |
+
<tr>
|
218 |
+
<td colspan="4">
|
219 |
+
<table width="100%" border="0" cellpadding="0" cellspacing="0">
|
220 |
+
<tbody>
|
221 |
+
<tr>
|
222 |
+
<td width="4"></td>
|
223 |
+
<td width="626">
|
224 |
+
<font style="font-size: 10px;" face="Arial">Demonstrativo
|
225 |
+
<br>
|
226 |
+
<b>
|
227 |
+
===============================================================<br>
|
228 |
+
Pagamento do pedido <?php echo $pgtoArray['id_transacao'] ?> a <?php echo Mage::app()->getWebsite()->getName(); ?><br>
|
229 |
+
===============================================================<br>
|
230 |
+
<br>
|
231 |
+
</b>
|
232 |
+
</font>
|
233 |
+
</td>
|
234 |
+
</tr>
|
235 |
+
</tbody>
|
236 |
+
</table>
|
237 |
+
</td>
|
238 |
+
</tr>
|
239 |
+
</tbody>
|
240 |
+
</table>
|
241 |
+
<table width="100%" border="0" cellpadding="2" cellspacing="0">
|
242 |
+
<tbody>
|
243 |
+
<tr>
|
244 |
+
<td width="100%" align="right">
|
245 |
+
<b>
|
246 |
+
<font size="1" face="Arial">Autenticação mecânica</font>
|
247 |
+
</b>
|
248 |
+
<br>
|
249 |
+
</td>
|
250 |
+
</tr>
|
251 |
+
<tr>
|
252 |
+
<td width="100%" align="middle" height="17"> </td>
|
253 |
+
</tr>
|
254 |
+
</tbody>
|
255 |
+
</table>
|
256 |
+
<table width="100%" border="0" cellpadding="0" cellspacing="0">
|
257 |
+
<tbody>
|
258 |
+
<tr valign="top">
|
259 |
+
<td>
|
260 |
+
<img src="<?php echo $this->getSkinUrl('O2TI/moip/imagem//tesoura.gif') ?>" style="margin-bottom: 3px;" width="100%" height="5">
|
261 |
+
</td>
|
262 |
+
</tr>
|
263 |
+
</tbody></table>
|
264 |
+
<table width="100%" border="0" cellpadding="0" cellspacing="0">
|
265 |
+
<tbody><tr>
|
266 |
+
<td valign="bottom" width="112"><font size="3" face="Arial, Helvetica, sans-serif"><img src="<?php echo $this->getSkinUrl('O2TI/moip/imagem//ico.gif') ?>" vspace="0" width="25" align="absbottom" height="23" hspace="1"><b> Bradesco</b></font></td>
|
267 |
+
<td valign="bottom" width="66" align="center">
|
268 |
+
<font size="4" face="Arial, Helvetica, sans-serif"><b>| <font color="#999999">237-2</font> |</b></font>
|
269 |
+
</td>
|
270 |
+
<td valign="bottom" width="462" align="right" nowrap="nowrap"><font size="3" face="Arial"><?php echo $boleto['line']; ?> </font></td>
|
271 |
+
</tr>
|
272 |
+
</tbody></table>
|
273 |
+
<table bordercolorlight="#FFFFFF" width="100%" border="1" cellpadding="1" cellspacing="0">
|
274 |
+
<tbody><tr>
|
275 |
+
<td colspan="6"> <table width="100%" border="0" cellpadding="0" cellspacing="0">
|
276 |
+
<tbody><tr>
|
277 |
+
<td valign="top" width="120"><font size="1" face="Arial, Helvetica, sans-serif"> Local
|
278 |
+
de Pagamento</font><font face="Arial, Helvetica, sans-serif"><br>
|
279 |
+
<font size="3"> </font><br>
|
280 |
+
</font></td>
|
281 |
+
<td valign="middle" width="370"><font size="2" face="Arial, Helvetica, sans-serif"><b> Pagável em qualquer banco até o vencimento</b></font> <font face="Arial, Helvetica, sans-serif"><br>
|
282 |
+
</font></td>
|
283 |
+
</tr>
|
284 |
+
</tbody></table></td>
|
285 |
+
<td width="140"> <table bordercolorlight="#FFFFFF" width="100%" border="0" cellpadding="0" cellspacing="0" height="100%">
|
286 |
+
<tbody><tr bgcolor="#cccccc">
|
287 |
+
<td><font size="1" face="Arial, Helvetica, sans-serif"> Vencimento
|
288 |
+
</font><font face="Arial, Helvetica, sans-serif"><br>
|
289 |
+
</font></td>
|
290 |
+
</tr>
|
291 |
+
<tr bgcolor="#cccccc">
|
292 |
+
<td align="right"><font face="Arial, Helvetica, sans-serif"><b><font size="3"><?php echo $vcmento ?></font></b></font><font size="3" face="Arial"><b><font size="2" face="Arial, Helvetica, sans-serif"> </font></b></font><font face="Arial, Helvetica, sans-serif"><br>
|
293 |
+
</font></td>
|
294 |
+
</tr>
|
295 |
+
</tbody></table></td>
|
296 |
+
</tr>
|
297 |
+
<tr>
|
298 |
+
<td colspan="6" valign="top"> <table width="100%" border="0" cellpadding="0" cellspacing="0">
|
299 |
+
<tbody><tr>
|
300 |
+
<td valign="top"><font size="1" face="Arial"> Cedente </font><br> </td>
|
301 |
+
</tr>
|
302 |
+
<tr>
|
303 |
+
<td valign="top"><font size="2" face="Arial"><b> <?php echo Mage::app()->getWebsite()->getName(); ?> | MoIP S.A.</b></font><br> </td>
|
304 |
+
</tr>
|
305 |
+
</tbody></table></td>
|
306 |
+
<td valign="top" width="140"> <table width="100%" border="0" cellpadding="1" cellspacing="1">
|
307 |
+
<tbody><tr>
|
308 |
+
<td><font size="1" face="Arial, Helvetica, sans-serif"> Agência/Código
|
309 |
+
Cedente</font></td>
|
310 |
+
</tr>
|
311 |
+
<tr>
|
312 |
+
<td align="right"><font size="2" face="Arial, Helvetica, sans-serif"><b>3391-0 / 0017479-3</b></font></td>
|
313 |
+
</tr>
|
314 |
+
</tbody></table></td>
|
315 |
+
</tr>
|
316 |
+
<tr>
|
317 |
+
<td width="103"> <table width="100%" border="0" cellpadding="0" cellspacing="0">
|
318 |
+
<tbody><tr>
|
319 |
+
<td> <div align="center"><font size="1" face="Arial">Data do documento</font><br>
|
320 |
+
</div></td>
|
321 |
+
</tr>
|
322 |
+
<tr>
|
323 |
+
<td align="middle"> <div align="center"><font size="2" face="Arial, Helvetica, sans-serif"><?php echo $data_hj ?></font><br>
|
324 |
+
</div></td>
|
325 |
+
</tr>
|
326 |
+
</tbody></table></td>
|
327 |
+
<td colspan="2"> <table width="100%" border="0" cellpadding="0" cellspacing="0">
|
328 |
+
<tbody><tr>
|
329 |
+
<td> <div align="center"><font size="1" face="Arial">No. do documento</font><br>
|
330 |
+
</div></td>
|
331 |
+
</tr>
|
332 |
+
<tr>
|
333 |
+
<td align="middle"> <div align="center"><font size="2" face="Arial, Helvetica, sans-serif">como obeter?</font><br>
|
334 |
+
</div></td>
|
335 |
+
</tr>
|
336 |
+
</tbody></table></td>
|
337 |
+
<td width="65"> <table width="98%" border="0" cellpadding="0" cellspacing="0">
|
338 |
+
<tbody><tr>
|
339 |
+
<td> <div align="center"><font size="1" face="Arial">Espécie doc</font><br>
|
340 |
+
</div></td>
|
341 |
+
</tr>
|
342 |
+
<tr>
|
343 |
+
<td align="middle"> <div align="center"><font size="1" face="Arial"><font size="2">Outros</font></font><br>
|
344 |
+
</div></td>
|
345 |
+
</tr>
|
346 |
+
</tbody></table></td>
|
347 |
+
<td width="44"> <table width="100%" border="0" cellpadding="0" cellspacing="0">
|
348 |
+
<tbody><tr>
|
349 |
+
<td> <div align="center"><font size="1" face="Arial"> Aceite</font><br>
|
350 |
+
</div></td>
|
351 |
+
</tr>
|
352 |
+
<tr>
|
353 |
+
<td align="middle"> <div align="center"><font size="2" face="Arial">N</font><br>
|
354 |
+
</div></td>
|
355 |
+
</tr>
|
356 |
+
</tbody></table></td>
|
357 |
+
<td width="126"> <table width="100%" border="0" cellpadding="0" cellspacing="0" height="100%">
|
358 |
+
<tbody><tr>
|
359 |
+
<td nowrap="nowrap"> <div align="center"><font size="1" face="Arial">Data Processamento</font></div></td>
|
360 |
+
</tr>
|
361 |
+
<tr>
|
362 |
+
<td align="middle" nowrap="nowrap"> <div align="center"><font size="2" face="Arial">26/01/2014</font></div></td>
|
363 |
+
</tr>
|
364 |
+
</tbody></table></td>
|
365 |
+
<td width="140"> <table width="100%" border="0" cellpadding="0" cellspacing="0">
|
366 |
+
<tbody><tr>
|
367 |
+
<td><font size="1" face="Arial, Helvetica, sans-serif"> Nosso Número
|
368 |
+
</font><font face="Arial, Helvetica, sans-serif"><br>
|
369 |
+
</font></td>
|
370 |
+
</tr>
|
371 |
+
<tr>
|
372 |
+
<td align="right"><font size="2" face="Arial, Helvetica, sans-serif"><b>25/00024163628-8</b></font><font size="3" face="Arial"><b><font size="2" face="Arial, Helvetica, sans-serif"> </font></b></font><font face="Arial, Helvetica, sans-serif"><br>
|
373 |
+
</font></td>
|
374 |
+
</tr>
|
375 |
+
</tbody></table></td>
|
376 |
+
</tr>
|
377 |
+
<tr align="center">
|
378 |
+
<td valign="top" width="103"> <table width="100%" border="0" cellpadding="0" cellspacing="0">
|
379 |
+
<tbody><tr valign="top">
|
380 |
+
<td> <div align="center"><font size="1" face="Arial">Uso do Banco</font><br>
|
381 |
+
</div></td>
|
382 |
+
</tr>
|
383 |
+
<tr valign="top">
|
384 |
+
<td> <div align="center"><font size="2" face="Arial"> </font><br>
|
385 |
+
</div></td>
|
386 |
+
</tr>
|
387 |
+
</tbody></table></td>
|
388 |
+
<td valign="top" width="39" align="center"> <table width="100%" align="center" border="0" cellpadding="0" cellspacing="0">
|
389 |
+
<tbody><tr valign="top">
|
390 |
+
<td align="center"> <font size="1" face="Arial">Carteira</font></td>
|
391 |
+
</tr>
|
392 |
+
<tr valign="top">
|
393 |
+
<td align="center"><font size="2" face="Arial">25</font></td>
|
394 |
+
</tr>
|
395 |
+
</tbody></table></td>
|
396 |
+
<td valign="top" width="93"> <table width="100%" border="0" cellpadding="0" cellspacing="0">
|
397 |
+
<tbody><tr valign="top">
|
398 |
+
<td> <div align="center"><font size="1" face="Arial"> Moeda</font><br>
|
399 |
+
</div></td>
|
400 |
+
</tr>
|
401 |
+
<tr valign="top">
|
402 |
+
<td> <div align="center"><font size="2" face="Arial">R$</font><br>
|
403 |
+
</div></td>
|
404 |
+
</tr>
|
405 |
+
</tbody></table></td>
|
406 |
+
<td colspan="2" valign="top"> <table width="100%" border="0" cellpadding="0" cellspacing="0">
|
407 |
+
<tbody><tr valign="top">
|
408 |
+
<td> <div align="center"><font size="1" face="Arial">Quantidade</font><br>
|
409 |
+
</div></td>
|
410 |
+
</tr>
|
411 |
+
<tr valign="top">
|
412 |
+
<td> <div align="center"><br>
|
413 |
+
</div></td>
|
414 |
+
</tr>
|
415 |
+
</tbody></table></td>
|
416 |
+
<td valign="top" width="126"> <table width="100%" border="0" cellpadding="0" cellspacing="0">
|
417 |
+
<tbody><tr valign="top">
|
418 |
+
<td> <div align="center"><font size="1" face="Arial"> Valor</font><br>
|
419 |
+
</div></td>
|
420 |
+
</tr>
|
421 |
+
<tr valign="top">
|
422 |
+
<td> <div align="center"><font size="2" face="Arial"> </font><br>
|
423 |
+
</div></td>
|
424 |
+
</tr>
|
425 |
+
</tbody></table></td>
|
426 |
+
<td valign="top" width="140"> <table width="100%" border="0" cellpadding="0" cellspacing="0" height="100%">
|
427 |
+
<tbody><tr>
|
428 |
+
<td bgcolor="lightgrey" height="50%"><font size="1" face="Arial, Helvetica, sans-serif"> (=)
|
429 |
+
Valor do Documento </font></td>
|
430 |
+
</tr>
|
431 |
+
<tr>
|
432 |
+
<td align="right" bgcolor="lightgrey" height="50%"><font face="Arial, Helvetica, sans-serif"><b><font size="2"><?php echo $total; ?></font></b></font><font size="3" face="Arial"><b><font size="2" face="Arial, Helvetica, sans-serif"> </font></b></font></td>
|
433 |
+
</tr>
|
434 |
+
</tbody></table></td>
|
435 |
+
</tr>
|
436 |
+
<tr>
|
437 |
+
<td colspan="6" rowspan="5" valign="top"> <table width="100%" border="0" cellpadding="0" cellspacing="0">
|
438 |
+
<tbody><tr valign="center">
|
439 |
+
<td colspan="2" height="23"><font size="2" face="Arial"><b> Instruções
|
440 |
+
</b><br>
|
441 |
+
</font></td>
|
442 |
+
</tr>
|
443 |
+
<tr valign="top">
|
444 |
+
<td width="4">
|
445 |
+
</td>
|
446 |
+
<td width="457"><font style="font-size: 10px;" face="Arial">Sr. Caixa, não receber após o vencimento<br>
|
447 |
+
<br>
|
448 |
+
</font>
|
449 |
+
<font style="font-size: 11px;" face="Courier New">
|
450 |
+
<br>
|
451 |
+
<br>
|
452 |
+
<br>
|
453 |
+
<br>
|
454 |
+
<br>
|
455 |
+
</font>
|
456 |
+
</td>
|
457 |
+
</tr>
|
458 |
+
</tbody></table></td>
|
459 |
+
<td valign="top" width="140"><font style="font-size: 10px;" face="Arial"> (-) Descontos/Abatimento
|
460 |
+
<br><br>
|
461 |
+
</font></td>
|
462 |
+
</tr>
|
463 |
+
<tr>
|
464 |
+
<td valign="top" width="140"><font style="font-size: 10px;" face="Arial"> (-) Outras
|
465 |
+
Deduções <br><br>
|
466 |
+
</font></td>
|
467 |
+
</tr>
|
468 |
+
<tr>
|
469 |
+
<td valign="top" width="140"><font style="font-size: 10px;" face="Arial"> (+) Mora/Multa
|
470 |
+
<br><br>
|
471 |
+
</font></td>
|
472 |
+
</tr>
|
473 |
+
<tr>
|
474 |
+
<td valign="top" width="140"><font style="font-size: 10px;" face="Arial"> (+) Outros
|
475 |
+
Acréscimos <br><br>
|
476 |
+
</font></td>
|
477 |
+
</tr>
|
478 |
+
<tr>
|
479 |
+
<td valign="top" width="140" bgcolor="#cccccc"><font style="font-size: 10px;" face="Arial"> (=)
|
480 |
+
Valor Cobrado <br><br>
|
481 |
+
</font></td>
|
482 |
+
</tr>
|
483 |
+
<tr>
|
484 |
+
<td colspan="5"> <table width="100%" border="0" cellpadding="0" cellspacing="0">
|
485 |
+
<tbody><tr>
|
486 |
+
<td valign="top" width="100"><font size="1" face="Arial, Helvetica, sans-serif"> Sacado
|
487 |
+
</font><font face="Arial, Helvetica, sans-serif"><br>
|
488 |
+
</font></td>
|
489 |
+
<td valign="top" width="100%" height="40"><font size="1" face="Arial, Helvetica, sans-serif">
|
490 |
+
<?php echo($order->getShippingAddress()->getStreet(1)); ?>, n.º <?php echo($order->getShippingAddress()->getStreet(2)); ?>, Bairro: <?php echo($order->getShippingAddress()->getStreet(4)); ?><br>
|
491 |
+
<?php echo($order->getShippingAddress()->getCity()); ?>,<?php echo($order->getShippingAddress()->getRegion()); ?> | <?php echo($order->getShippingAddress()->getPostcode()); ?>
|
492 |
+
</tr>
|
493 |
+
</tbody></table></td>
|
494 |
+
<td colspan="2" valign="bottom" align="middle"><b><font size="3" face="Arial"> Ficha
|
495 |
+
de Compensação </font></b></td>
|
496 |
+
</tr>
|
497 |
+
</tbody></table>
|
498 |
+
<table width="637" border="0" cellpadding="0" cellspacing="0" height="86">
|
499 |
+
<div style="margin-top:15px;"><?php echo $boleto['imagem']; ?></div>
|
500 |
+
<div><?php echo $boleto['line']; ?></div>
|
501 |
+
</table>
|
502 |
+
</font></td>
|
503 |
+
</tr></tbody>
|
504 |
+
</table>
|
505 |
+
|
506 |
+
|
507 |
+
</body>
|
508 |
+
</html>
|
app/design/frontend/default/default/template/O2TI/moip/refaz.phtml
ADDED
@@ -0,0 +1,81 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php $session = Mage::getSingleton('checkout/session'); ?>
|
2 |
+
<?php
|
3 |
+
$z=0;
|
4 |
+
$api = Mage::getModel('moip/api');
|
5 |
+
$dados = $session->getPgtoarry();
|
6 |
+
?>
|
7 |
+
<?php $client_array = $session->getClient_array(); ?>
|
8 |
+
<?php $pgtoArray = $this->getOrder_dados($client_array); ?>
|
9 |
+
<form id="refazercartao" method="POST" action='<?php echo Mage::getBaseUrl(); ?>moip/index/Repag/'>
|
10 |
+
<input type="hidden" name="forma_de_pagamento" value="CartaoDeCredito" >
|
11 |
+
<div class="well">
|
12 |
+
<ul class="repay-form">
|
13 |
+
<li>
|
14 |
+
<h3>Dados do Cartão</h3>
|
15 |
+
</li>
|
16 |
+
<li>
|
17 |
+
<label>Parcelas:</label>
|
18 |
+
<?php $pgtoArray = $this->getOrder_dados($client_array); ?>
|
19 |
+
<?php $order = Mage::getModel('sales/order')->loadByIncrementId($pgtoArray['id_transacao']); ?>
|
20 |
+
<?php $parcelamento = $api->getParcelamento(number_format($order->getGrand_total(), 2, ".", ".")); ?>
|
21 |
+
<select id="Parcelas" name="parcelas">
|
22 |
+
<?php foreach ($parcelamento as $k => $v):?>
|
23 |
+
<?php if($z=="0"){ ?>
|
24 |
+
<option value="1">Pagamento à vista.</option>
|
25 |
+
<?php } ?>
|
26 |
+
<option value="<?php echo $k ?>"><?php echo $k . "x R$ " . $v['valor'] . " | Total: R$ " .$v['total']."" ?></option>
|
27 |
+
<?php $z++; endforeach; ?>
|
28 |
+
</select>
|
29 |
+
</li>
|
30 |
+
<li>
|
31 |
+
<label>Instituição:</label>
|
32 |
+
<select id="instituicao" name="bandeira">
|
33 |
+
<option value="Visa">Visa</option>
|
34 |
+
<option value="Mastercard">Mastercard</option>
|
35 |
+
<option value="AmericanExpress">AmericanExpress</option>
|
36 |
+
<option value="Hipercard">Hipercard</option>
|
37 |
+
<option value="Diners">Diners</option>
|
38 |
+
</select>
|
39 |
+
</li>
|
40 |
+
<li>
|
41 |
+
<div>
|
42 |
+
<label>Numero do Cartão:</label>
|
43 |
+
<input type="text" id="Numero" name="Numero" value="<?php echo $dados['credito_numero'] ?>" class="input-text" >
|
44 |
+
</div>
|
45 |
+
<div>
|
46 |
+
<label>CVV:</label>
|
47 |
+
<input type="text" id="CodigoSeguranca" class="input-text" name="CodigoSeguranca" value="<?php echo $dados['credito_codigo_seguranca'] ?>" size="4">
|
48 |
+
</div>
|
49 |
+
</li>
|
50 |
+
<li>
|
51 |
+
<label>Expiração:</label>
|
52 |
+
<input type="text" id="Expiracao" name="Expiracao_mes" value="<?php echo $dados['credito_expiracao_mes'] ?>" onkeypress="return txtBoxFormat(this, '99', event);" maxlength="2" placeholder="Ex. 10/15" size="2" class="input-text" >
|
53 |
+
<input type="text" id="Expiracao" name="Expiracao_ano" value="<?php echo $dados['credito_expiracao_ano'] ?>" onkeypress="return txtBoxFormat(this, '99', event);" maxlength="2" placeholder="Ex. 10/15" size="2" class="input-text" >
|
54 |
+
</li>
|
55 |
+
<li>
|
56 |
+
<h3>Dados do Títular do Cartão</h3>
|
57 |
+
</li>
|
58 |
+
<li>
|
59 |
+
<label>Portador:</label>
|
60 |
+
<input type="text" id="Portador" name="Portador" value="<?php echo $dados['credito_portador_nome'] ?>" class="input-text" >
|
61 |
+
</li>
|
62 |
+
<li>
|
63 |
+
<label>CPF:</label>
|
64 |
+
<input type="text" id="CPF" name="CPF" value="<?php echo $dados['credito_portador_cpf'] ?>" class="input-text" onkeypress="return txtBoxFormat(this, '99999999999', event);" maxlength="11">
|
65 |
+
</li>
|
66 |
+
<li>
|
67 |
+
<label>Data Nascimento:</label>
|
68 |
+
<input type="text" id="DataNascimento" value="<?php echo date('d/m/Y', strtotime($dados['credito_portador_nascimento'])) ?>" name="DataNascimento" onkeypress="return txtBoxFormat(this, '99/99/9999', event);" maxlength="10" placeholder="Ex. 10/10/1985" class="input-text" ><br>
|
69 |
+
</li>
|
70 |
+
<li>
|
71 |
+
<label>Telefone:</label>
|
72 |
+
<input type="text" id="Telefone" name="Telefone" onkeypress="return txtBoxFormat(this, '(99)9999-9999', event);" placeholder="Ex. (11)9999-9999" maxlength="14" class="input-text" value="<?php echo $dados['credito_portador_DDD'] ?><?php echo $dados['credito_portador_telefone'] ?>" ><br>
|
73 |
+
</li>
|
74 |
+
<li>
|
75 |
+
<button id="sendToMoip2" class="btn-moip buttonmoip" onclick="jQuery('#loading-mask').show();jQuery('.repeat_cartao').hide('slow');">Pagar Agora</button>
|
76 |
+
</li>
|
77 |
+
</ul>
|
78 |
+
</div>
|
79 |
+
</form>
|
80 |
+
|
81 |
+
|
app/design/frontend/default/default/template/O2TI/moip/transferencia.phtml
ADDED
@@ -0,0 +1,66 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php $session = Mage::getSingleton('checkout/session'); ?>
|
2 |
+
<?php $result_decode = $session->getResult_decode(); ?>
|
3 |
+
<?php $client_array = $session->getClient_array(); ?>
|
4 |
+
<?php $pgtoArraya = $session->getPgtoarry(); ?>
|
5 |
+
<?php $pgtoArray = $this->getOrder_dados($client_array);
|
6 |
+
$customerData = "";
|
7 |
+
if(Mage::getSingleton('customer/session')->isLoggedIn()) {
|
8 |
+
$customerData = Mage::getSingleton('customer/session')->getCustomer();
|
9 |
+
}
|
10 |
+
if (Mage::getSingleton('moip/standard')->getConfigData('ambiente') == "teste") {
|
11 |
+
$url = "https://desenvolvedor.moip.com.br/sandbox/Instrucao.do?token=";
|
12 |
+
$urljs = "https://desenvolvedor.moip.com.br/sandbox/";
|
13 |
+
}
|
14 |
+
else {
|
15 |
+
$url = "https://www.moip.com.br/Instrucao.do?token=";
|
16 |
+
$urljs = "https://www.moip.com.br/";
|
17 |
+
}
|
18 |
+
?>
|
19 |
+
<?php $order = Mage::getModel('sales/order')->loadByIncrementId($pgtoArray['id_transacao']); ?>
|
20 |
+
<?php $this->getSaveDate($pgtoArray['id_transacao'], $result_decode, $customerData, $pgtoArraya, $client_array); ?>
|
21 |
+
|
22 |
+
<script type="text/javascript" charset="ISO-8859-1" src="<?php echo $urljs ?>/transparente/MoipWidget-v2.js" onerror="erro_mail('erro caiu o moip widget')" ></script>
|
23 |
+
<div id="MoipWidget" data-token="<?php echo $result_decode['token'] ?>" callback-method-error="erroValidacao" callback-method-success="sucesso"></div>
|
24 |
+
<!--meta http-equiv='Refresh' content='10;URL=<?php #echo $url_direct ?>' -->
|
25 |
+
<div class="row grid-full">
|
26 |
+
<div class="section clearer grid12-12 ">
|
27 |
+
<h3>Seu pedido foi enviado com sucesso, <strong><?php echo $client_array['pagador_nome'] ?></strong>!</h3>
|
28 |
+
|
29 |
+
<div class="corpo_moip grid12-5 alpha">
|
30 |
+
|
31 |
+
<div class="method-type bank-title">
|
32 |
+
<h3>Transferência Bancária</h3>
|
33 |
+
<h4>Você será redirecionado para o seu banco em 10 segundos, caso isto não ocorra, por favor clique no link abaixo para ser redirecionado ao seu banco.</h4>
|
34 |
+
</div>
|
35 |
+
</br>
|
36 |
+
<button type="button" title="Finalizar compra" class="btn-moip btn-bank" onclick="window.location='<?php echo $url. $result_decode['token'] ?>'"><img src="<?php echo $this->getSkinUrl('O2TI/moip/imagem/bank-icon.png') ?>" alt="" />Ir ao Banco</button>
|
37 |
+
</div>
|
38 |
+
|
39 |
+
<div class="col-md-6 grid12-6 omega">
|
40 |
+
<div class="order-id-wrapper">
|
41 |
+
<p>O número do seu pedido é:</p>
|
42 |
+
<span class="order-id">#<?php echo $pgtoArray['id_transacao'] ?></span>
|
43 |
+
<h4>Seu pedido será enviado por <?php echo $order->getShippingDescription(); ?></h4>
|
44 |
+
</div>
|
45 |
+
<div class="warning-block">
|
46 |
+
<strong>Atenção:</strong> Você receberá um e-mail com a confirmação do seu pedido.
|
47 |
+
</div>
|
48 |
+
<div class="row">
|
49 |
+
<a href="<?php echo Mage::helper('core/url')->getHomeUrl(); ?>" class="back-to-store">Voltar para a home</a>
|
50 |
+
</div>
|
51 |
+
</div>
|
52 |
+
</div>
|
53 |
+
</div>
|
54 |
+
<script type="text/javascript">
|
55 |
+
jQuery(document).ready(function(){
|
56 |
+
jQuery("#token").val("<?php echo $result_decode['token'] ?>");
|
57 |
+
var settings =
|
58 |
+
<?php echo $this->getJson($pgtoArraya); ?>
|
59 |
+
;
|
60 |
+
MoipWidget(settings);
|
61 |
+
|
62 |
+
});
|
63 |
+
var sucesso = function(data){
|
64 |
+
}
|
65 |
+
|
66 |
+
</script>
|
app/design/frontend/default/default/template/O2TI/moip/vertical_form.phtml
CHANGED
@@ -1,3 +1,4 @@
|
|
|
|
1 |
<?php
|
2 |
$nome = "";
|
3 |
$cpf = "";
|
@@ -42,6 +43,7 @@ function countChar(val) {
|
|
42 |
}
|
43 |
};
|
44 |
jQuery(document).ready(function() {
|
|
|
45 |
jQuery('.input-switcher > li').bind({
|
46 |
click: function() {
|
47 |
jQuery(this).parent().children('li').fadeTo(300, 0.4);
|
@@ -84,7 +86,7 @@ jQuery(document).ready(function() {
|
|
84 |
<?php endif; ?>
|
85 |
</ul>
|
86 |
|
87 |
-
<div class="moip-payment-method-content row-fluid" id="moip-cartao" style="display:
|
88 |
<h3>Cartão de Crédito</h3>
|
89 |
<label class="required" for="credito_bandeira" >Selecione a Bandeira:<em>*</em></label>
|
90 |
<ul class="inline banderias-cartao input-switcher input-switcher-5">
|
1 |
+
|
2 |
<?php
|
3 |
$nome = "";
|
4 |
$cpf = "";
|
43 |
}
|
44 |
};
|
45 |
jQuery(document).ready(function() {
|
46 |
+
jQuery("#cartao_radio").trigger("click");
|
47 |
jQuery('.input-switcher > li').bind({
|
48 |
click: function() {
|
49 |
jQuery(this).parent().children('li').fadeTo(300, 0.4);
|
86 |
<?php endif; ?>
|
87 |
</ul>
|
88 |
|
89 |
+
<div class="moip-payment-method-content row-fluid" id="moip-cartao" style="display:block">
|
90 |
<h3>Cartão de Crédito</h3>
|
91 |
<label class="required" for="credito_bandeira" >Selecione a Bandeira:<em>*</em></label>
|
92 |
<ul class="inline banderias-cartao input-switcher input-switcher-5">
|
js/O2TI/moip/jquery_noconflict.js
ADDED
@@ -0,0 +1 @@
|
|
|
1 |
+
jQuery.noConflict();
|
js/O2TI/moip/novamascara.js
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
function txtBoxFormat(objeto,sMask,evtKeyPress){var i,nCount,sValue,fldLen,mskLen,bolMask,sCod,nTecla;if(document.all){nTecla=evtKeyPress.keyCode;}else if(document.layers){nTecla=evtKeyPress.which;}else{nTecla=evtKeyPress.which;if(nTecla==8){return true;}}
|
2 |
+
sValue=objeto.value;sValue=sValue.toString().replace("-","");sValue=sValue.toString().replace("-","");sValue=sValue.toString().replace(".","");sValue=sValue.toString().replace(".","");sValue=sValue.toString().replace("/","");sValue=sValue.toString().replace("/","");sValue=sValue.toString().replace(":","");sValue=sValue.toString().replace(":","");sValue=sValue.toString().replace("(","");sValue=sValue.toString().replace("(","");sValue=sValue.toString().replace(")","");sValue=sValue.toString().replace(")","");sValue=sValue.toString().replace(" ","");sValue=sValue.toString().replace(" ","");fldLen=sValue.length;mskLen=sMask.length;i=0;nCount=0;sCod="";mskLen=fldLen;while(i<=mskLen){bolMask=((sMask.charAt(i)=="-")||(sMask.charAt(i)==".")||(sMask.charAt(i)=="/")||(sMask.charAt(i)==":"))
|
3 |
+
bolMask=bolMask||((sMask.charAt(i)=="(")||(sMask.charAt(i)==")")||(sMask.charAt(i)==" "))
|
4 |
+
if(bolMask){sCod+=sMask.charAt(i);mskLen++;}
|
5 |
+
else{sCod+=sValue.charAt(nCount);nCount++;}
|
6 |
+
i++;}
|
7 |
+
objeto.value=sCod;if(nTecla!=8){if(sMask.charAt(i-1)=="9"){return((nTecla>47)&&(nTecla<58));}
|
8 |
+
else{return true;}}
|
9 |
+
else{return true;}}
|
js/O2TI/moip/validacao.js
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
function validaCPF(cpf,pType){var cpf_filtrado="",valor_1=" ",valor_2=" ",ch="";var valido=false;for(i=0;i<cpf.length;i++){ch=cpf.substring(i,i+1);if(ch>="0"&&ch<="9"){cpf_filtrado=cpf_filtrado.toString()+ch.toString()
|
3 |
+
valor_1=valor_2;valor_2=ch;}
|
4 |
+
if((valor_1!=" ")&&(!valido))valido=!(valor_1==valor_2);}
|
5 |
+
if(!valido)cpf_filtrado="12345678912";if(cpf_filtrado.length<11){for(i=1;i<=(11-cpf_filtrado.length);i++){cpf_filtrado="0"+cpf_filtrado;}}
|
6 |
+
if(pType<=1){if((cpf_filtrado.substring(9,11)==checkCPF(cpf_filtrado.substring(0,9)))&&(cpf_filtrado.substring(11,12)=="")){return true;}}
|
7 |
+
if((pType==2)||(pType==0)){if(cpf_filtrado.length>=14){if(cpf_filtrado.substring(12,14)==checkCNPJ(cpf_filtrado.substring(0,12))){return true;}}}
|
8 |
+
return false;}
|
9 |
+
function checkCNPJ(vCNPJ){var mControle="";var aTabCNPJ=new Array(5,4,3,2,9,8,7,6,5,4,3,2);for(i=1;i<=2;i++){mSoma=0;for(j=0;j<vCNPJ.length;j++)
|
10 |
+
mSoma=mSoma+(vCNPJ.substring(j,j+1)*aTabCNPJ[j]);if(i==2)mSoma=mSoma+(2*mDigito);mDigito=(mSoma*10)%11;if(mDigito==10)mDigito=0;mControle1=mControle;mControle=mDigito;aTabCNPJ=new Array(6,5,4,3,2,9,8,7,6,5,4,3);}
|
11 |
+
return((mControle1*10)+mControle);}
|
12 |
+
function checkCPF(vCPF){var mControle=""
|
13 |
+
var mContIni=2,mContFim=10,mDigito=0;for(j=1;j<=2;j++){mSoma=0;for(i=mContIni;i<=mContFim;i++)
|
14 |
+
mSoma=mSoma+(vCPF.substring((i-j-1),(i-j))*(mContFim+1+j-i));if(j==2)mSoma=mSoma+(2*mDigito);mDigito=(mSoma*10)%11;if(mDigito==10)mDigito=0;mControle1=mControle;mControle=mDigito;mContIni=3;mContFim=11;}
|
15 |
+
return((mControle1*10)+mControle);}
|
media/O2TI/all/logo.png
CHANGED
Binary file
|
package.xml
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>o2ti_moip</name>
|
4 |
-
<version>1.0.
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://o2ti.com/licensa_checkout_moip.txt">Free to use with MoIP</license>
|
7 |
<channel>community</channel>
|
@@ -31,11 +31,12 @@ Repayment, if you customer input wrong date he can try repaying it without have
|
|
31 |
Multi store split rates
|
32 |
Store terms and conditions (Mandatory in all stores following the federal law (http://legislacao.planalto.gov.br/legisla/legislacao.nsf/Viw_Identificacao/DEC%207.962-2013?OpenDocument) Nº 7.962, DE 15 DE MARÇO DE 2013</a>)
|
33 |
</ul></description>
|
34 |
-
<notes>
|
|
|
35 |
<authors><author><name>O2TI</name><user>o2ti</user><email>contato@o2ti.com</email></author></authors>
|
36 |
-
<date>2014-
|
37 |
-
<time>14:
|
38 |
-
<contents><target name="magelocal"><dir name="O2TI"><dir name="All"><dir name="Helper"><file name="Data.php" hash="5cfce5f56526da7a17ac2e402b39dd6e"/></dir><dir name="etc"><file name="config.xml" hash="b4343acf6c3f25bb750a287f0b4fa7fc"/><file name="system.xml" hash="9bad1e5078f470994567ce7a68d71688"/></dir></dir><dir name="Moip"><dir name="Block"><dir name="Adminhtml"><dir name="moip"><dir name="Info"><file name="Customermessages.php" hash="bf0e3f76f8ab4dde138a4125fe2fb07c"/><file name="Info.php" hash="d41d8cd98f00b204e9800998ecf8427e"/></dir></dir></dir><file name="Info.php" hash="4853c2ffc2f36c75120e9902bf5dff8c"/><dir name="Standard"><file name="Form.php" hash="f93521922122f4d4d5f829a67c0754c2"/><file name="Info.php" hash="f4e7f00836f8ba5867a2ec1157523b03"/><file name="Redirect.php" hash="4a34f719a3d37c3af9e3850c305400fc"/></dir></dir><dir name="Helper"><file name="Data.php" hash="36af3c64c424820d5e6124528959d296"/></dir><dir name="Model"><file name="Api.php" hash="becb048b0e44812dfa750f723c5f13fb"/><file name="Observer.php" hash="80db718dbfb7e493ad235e3bdf4d6baf"/><file name="Orders.php" hash="a6023047810e0652e9e6248d67704b44"/><dir name="Source"><file name="Ambiente.php" hash="439a9f70669af322f1de30937551a1f0"/><file name="FormasPagamento.php" hash="bfa5931fe39fc22841acc789e71e6e92"/><file name="Layout.php" hash="4cc1e4fb27e773ce93a1c6b9bc571158"/></dir><file name="Standard.php" hash="e1f6ff1a99a69cd2b63d792a80fb209e"/></dir><dir name="controllers"><file name="IndexController.php" hash="9e6de72f21ef42c17eb2f1682c48f647"/><file name="StandardController.php" hash="b4b8d4eb467779534f54a8ed296f1f1c"/></dir><dir name="etc"><file name="adminhtml.xml" hash="75bde86c187ceb24042233abde0f88b0"/><file name="config.xml" hash="2b34d5356eaeefbcd13e7eeb657b7ac7"/><file name="system.xml" hash="9d20ff57c669960d54cd5f659a6abf05"/></dir><dir name="sql"><dir name="moip_setup"><file name="mysql4-install-0.1.0.php" hash="bff338f70822b4af170073029558b511"/><file name="mysql4-upgrade-0.1.0-0.2.0.php" hash="f09a912732a76ff087f3d2b01539a202"/><file name="mysql4-upgrade-0.1.0-0.2.1.php" hash="441725100d074d7d212bae4bc07db841"/><file name="mysql4-upgrade-0.2.1-0.2.2.php" hash="7e22a5f81d536e1b024e07d60df808d7"/><file name="mysql4-upgrade-0.2.1-0.2.3.php" hash="b6a1c02303eb5be5ac7c2c9bee962bb0"/></dir></dir></dir><dir name="Onestepcheckout"><dir name="Block"><dir name="Adminhtml"><dir name="Form"><dir name="Renderer"><dir name="Config"><file name="Createfield.php" hash="bca92a144c0564105091fb78ec75a235"/></dir></dir></dir><dir name="Onestepcheckout"><dir name="Edit"><file name="Form.php" hash="011556489a4e2e987d622bbc193ca5db"/><dir name="Tab"><file name="Form.php" hash="786a5a8d580250f8ab5c9def49f197c4"/></dir><file name="Tabs.php" hash="3e49037ed0f2ba7d930e7675398a6fd6"/></dir><file name="Edit.php" hash="b4a2a6c99cea16750408cb5c89c97ad8"/><file name="Grid.php" hash="8aa5742a2357b1c632ef26ce2a71e217"/><dir name="Sales"><dir name="Order"><file name="Grid.php" hash="e23140dfc8b567ba7d957afeabee6643"/><dir name="View"><dir name="Tab"><dir name="Info"><file name="Customermessages.php" hash="bf0e3f76f8ab4dde138a4125fe2fb07c"/><file name="Deliverydate.php" hash="64ea9d43321c8b51d74621ee90916553"/></dir></dir></dir></dir></dir><dir name="System"><dir name="Config"><dir name="Form"><dir name="Field"><file name="Addtimerange.php" hash="08419845203bd4dd3421cdcab5cf241d"/></dir></dir></dir></dir></dir><file name="Onestepcheckout.php" hash="d0253394f7c3515fcc4ba81f34f192d4"/></dir><dir name="Checkout"><dir name="Onepage"><dir name="Billing"><file name="Sortbilling.php" hash="c92c36496e94fd9dc6da3aa8e53dda86"/></dir><file name="Billing.php" hash="ef4f0f010d7e288c6664002060fa5b8a"/><dir name="Review"><file name="Options.php" hash="67b005f43191b0be294d4ecf50c37485"/></dir><dir name="Shipping"><file name="Sortshipping.php" hash="9af5fa1281bf34c37e4c92fb40a4873c"/></dir><file name="Shipping.php" hash="a56afd3502132baab34c4a9419aa7e3c"/><dir name="Shippingmethod"><file name="Deliverydate.php" hash="36ba92c13f59f21c33902ea1146d6cdc"/></dir></dir><file name="Top.php" hash="70e323dbbb57a29579c13412a8a2443f"/></dir><file name="Onestepcheckout.php" hash="e8b954f14acebf579bb0910813e899e4"/><dir name="Sales"><dir name="Info"><file name="Customermessages.php" hash="6666cedaeb9597e0c5f90cf7cc2934ae"/><file name="Deliverydate.php" hash="225859a718283767ca44b1ddccfd4bfb"/></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="fb1897f58ca16ce27184dc0790f0ecf2"/></dir><dir name="Model"><dir name="Customer"><file name="Customer.php" hash="b1b26b8e170bd4ed90b27fb9fcea8481"/></dir><dir name="Entity"><file name="Tipopessoa.php" hash="af14c8d054fe25c7f8cef5f89fcb65da"/></dir><dir name="Mysql4"><dir name="Onestepcheckout"><file name="Collection.php" hash="13781c0c51fcde3c6afc4f31054a6e03"/></dir><file name="Onestepcheckout.php" hash="5777de55ec60a045e86dc9de10f768bd"/></dir><file name="Observer.php" hash="75aeac65c1e5ffa22465b3a1d9c754c7"/><file name="Onestepcheckout.php" hash="3630794e4b1fda8229b82826e49a702f"/><dir name="Sales"><dir name="Quote"><file name="Address.php" hash="09cba85a351b58f16b4daba5be0d5595"/></dir></dir><dir name="Shipping"><file name="Allowedmethods.php" hash="801e98156ee12fd5fa08f30c37b64086"/></dir><file name="Status.php" hash="3e1d737e4f8cef4b6a591240efdafd83"/><dir name="System"><dir name="Config"><dir name="Source"><file name="Checkuncheck.php" hash="a232182e727d089f1a730d1e0bb05996"/><file name="Disablefield.php" hash="d5a2192f21d68175ed7375f3a6e7f85a"/><file name="Formatdate.php" hash="7e3eeae0c5a8ebba85ed501ef513b192"/><file name="Optionaddfield.php" hash="3b9cf9f6a67931b7d56c21c9e8cb48b3"/><file name="Optionhidefield.php" hash="847e6415e5d037ae3b3572e1df28f347"/><file name="Pagelayout.php" hash="676dd09a7aad20c0e3cfdb74e9f7f87f"/><dir name="Payment"><file name="Allowedmethods.php" hash="ea276b37bfdf6bcdbc302a76df966523"/></dir><dir name="Shipping"><file name="Allowedmethods.php" hash="801e98156ee12fd5fa08f30c37b64086"/></dir><file name="Subscribenewletter.php" hash="48dd4e572839e532e5321854bdd07750"/><dir name="form"><file name="Createfield.php" hash="6cc825f91bc3f787b7a84e5369422f39"/></dir></dir></dir></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="OnestepcheckoutController.php" hash="260a95696953ed372ed3d22ab52e7c85"/></dir><file name="IndexController.php" hash="48992c41e4c2d3b3bd49af4111342bb6"/><file name="TestController.php" hash="b7814c4a88338b9e031f26274bd7d07a"/></dir><dir name="etc"><file name="config.xml" hash="a8cd520ee0f0b93c00a01d95951da4fa"/><file name="system.xml" hash="61d85ec1a6ace0e8f465ad6069c5b6c7"/></dir><dir name="sql"><dir name="onestepcheckout_setup"><file name="mysql4-install-0.1.0.php" hash="0bcce57d95b0c63e8efb86faad1d798c"/><file name="mysql4-upgrade-0.1.0-0.2.0.php" hash="6d20a03343747545eb10c276631114c8"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><file name="o2ti_moip.xml" hash="13a5c858c1cdf8e638749179a6f97d2c"/><file name="o2ti_onestepcheckout.xml" hash="98ea87bd4113f491aade48e87c3fde46"/></dir><dir name="template"><dir name="O2TI"><dir name="cadastro"><dir name="customer"><dir name="form"><file name="edit.phtml" hash="1cdb3179dd883809bd7357409ca0a5d0"/></dir></dir><dir name="persistent"><dir name="checkout"><dir name="onepage"><file name="billing.phtml" hash="5fc8ba027dfb92482c1a85d88e211cda"/></dir></dir><dir name="customer"><dir name="form"><file name="register.phtml" hash="08b5b692abfce0e689d243c3478de77e"/></dir></dir></dir></dir><dir name="moip"><file name="horizontal_form.phtml" hash="903a0d8de7ac81e312fd233cce2d1617"/><file name="info.phtml" hash="ea1a3b7be6db68bb6625575355c21d07"/><file name="redirect.phtml" hash="1d302d419b7855d702b5f04078062024"/><file name="vertical_form.phtml" hash="be6ba2e46561296e833d64143699f77d"/></dir><dir name="onestepcheckout"><dir name="daskboard"><dir name="onepage"><file name="agreements.phtml" hash="5b762aa76287b160fcbec8fed8b789e8"/><dir name="billing"><file name="billing_form.phtml" hash="908f6689451953e64b295da644181255"/></dir><file name="billing.phtml" hash="3ace016f656dd99a2f18b35ec13740a5"/><file name="correio.phtml" hash="461b88fcbf6adffc4f23c5905932bafa"/><file name="coupon.phtml" hash="7e3ffcc7e51d78c7607d91bc40ed68db"/><file name="forgotpassword.phtml" hash="2fb80e3ec1a8151dde497743b149c6e9"/><file name="local.xml" hash="08c7ce351c502056fb9ee3a14a9b065a"/><file name="login.phtml" hash="85198c4e290aec3eaf72057cf04d5ca8"/><dir name="payment"><file name="methods.phtml" hash="235eecfb6272e525a70cab79785852e2"/></dir><file name="payment.phtml" hash="3501af6f3b4c108f11bc2bc6d58a9d87"/><dir name="review"><file name="button.phtml" hash="4d5c7c5a2d70f85ec324e79c7e81946b"/><file name="info.phtml" hash="68556313d6d0943c153d69ebd00c8c4b"/><file name="item.phtml" hash="af2406220da6cd44940a672e2771f902"/><dir name="options"><file name="additional.phtml" hash="724b44c70421d206a77f72c2c151cf40"/></dir><file name="options.phtml" hash="c0281a5dc15905296ac8e93a9d13071b"/><file name="totals.phtml" hash="6e857d144768ed8faa0be977b547b32f"/></dir><file name="review.phtml" hash="763347e2b03553d1bf791b3c6df093a3"/><dir name="shipping"><file name="shipping_form.phtml" hash="87bf26552fb0c331c012a2b40c7ce059"/></dir><file name="shipping.phtml" hash="69f97ed0e0eb2e391b1e761bb8b1ffc7"/><dir name="shipping_method"><file name="available.phtml" hash="f0eb7caf698a2dddf1895b5211167467"/></dir><file name="shipping_method.phtml" hash="58c56da9e30df17c997e08e20e32a8ee"/></dir></dir><file name="daskboard.phtml" hash="840bb5f0838b3c039575db1cbeb6359d"/><file name="emptyupdate.phtml" hash="7bf34446254428a5c42740731127b435"/><file name="onepage.phtml" hash="149f7077a5a959968afc0da9a0d952db"/><dir name="sales"><dir name="order"><dir name="info"><file name="customermessages.phtml" hash="1d783fb503426ca094f02525dd1a827b"/><file name="customermessages.phtml~" hash="aa6199bb564edbf6d950fa154b624c02"/><file name="deliverydate.phtml" hash="24d4d3fafafca91bb44b2159695c24bc"/><file name="deliverydate.phtml~" hash="75709e72398a0df41305dee259dc3de2"/></dir><file name="info.phtml" hash="a5b6b9223ec3d5da923e04f8becc84f3"/><dir name="view"><dir name="tab"><dir name="info"><file name="customermessages.phtml" hash="7de74c4598eceef2d17215585252f740"/><file name="deliverydate.phtml" hash="6e1260a32a1f6801ac185ef38a33114c"/></dir><file name="info.phtml" hash="57f4718dbfaa448976954368c1932b2b"/></dir></dir></dir></dir></dir></dir><dir name="customer"><dir><dir name="widget"><file name="dob.phtml" hash="7ac1cc016c90251d0c423d7347e9d715"/><file name="taxvat.phtml" hash="67333f779d3c7503209ce057a3b44c34"/></dir></dir></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="O2TI"><dir name="moip"><file name="form.phtml" hash="e381151a9b66f0fdc6cd74d019cefb5e"/><file name="info.phtml" hash="ea1a3b7be6db68bb6625575355c21d07"/><file name="redirect.phtml" hash="a928915ad38266f0ca462a6e434cbb77"/></dir><dir name="onestepcheckout"><dir name="sales"><dir name="order"><dir name="view"><dir name="tab"><dir name="info"><file name="Customermessages.phtml" hash="bfaea7d5c4300ae8c73c31f3472c5a14"/><file name="Deliverydate.phtml" hash="b5040d3cb30cc31c0c63bfaa81d3c7ac"/></dir><file name="info.phtml" hash="1b6b38d40668d878487f1710a28c1e69"/></dir></dir></dir></dir></dir><dir name="sales"><dir name="order"><dir name="view"><file name="info.phtml" hash="c6aa8255f5c494857c557a21a59e3367"/></dir></dir></dir></dir></dir><dir name="layout"><file name="o2ti_onestepcheckout.xml" hash="b601985811c14292e18b3e242ac6cc93"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="O2TI_All.xml" hash="0112972a847c93755903dd13239eae1f"/><file name="O2TI_Moip.xml" hash="e2cef22a0e5c667be681851c03dbffd4"/><file name="O2TI_Onestepcheckout.xml" hash="dbcbe66be4612fd2942b6f6847b834c9"/></dir></target><target name="magelocale"><dir><dir name="en_US"><file name="O2TI_Onestepcheckout.csv" hash="4bff2b6a4c9e13f8d9ea2a287c10c85f"/><dir name="template"><dir name="email"><file name="statusmail_cancelado_o2ti.html" hash="867805dc1d9ecd61f96e1134cdacecf1"/><file name="statusmail_cancelado_o2ti.html~" hash="cb69a0a0e730655677332354bf3dd4a2"/></dir></dir></dir><dir name="pt_BR"><file name="O2TI_Onestepcheckout.csv" hash="4bff2b6a4c9e13f8d9ea2a287c10c85f"/><dir name="template"><dir name="email"><file name="statusmail_cancelado_o2ti.html" hash="867805dc1d9ecd61f96e1134cdacecf1"/><file name="statusmail_cancelado_o2ti.html~" hash="cb69a0a0e730655677332354bf3dd4a2"/></dir></dir></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="default"><dir name="default"><dir name="O2TI"><dir name="moip"><dir name="css"><file name="bootstrap.css" hash="5ebc088f9c8fdbfba712a95e41dff8df"/><file name="formulario.css" hash="dba3b96839a8e49fd4dff529ded7a2db"/><file name="formulario_horizontal.css" hash="66643c0d1384786bc0b120285d7518cd"/><file name="prettify.css" hash="ecd4a5d6c0cbee10b168f6aa000c64ea"/></dir><dir name="imagem"><file name="AmericanExpress.png" hash="40ea216476033961d50f452bf4bca4df"/><file name="BancoDoBrasil.png" hash="572914d1e4b635dc56cd507c6c46b023"/><file name="Banrisul.png" hash="d4ac02772b3f521a92542b849e679092"/><file name="Bradesco.png" hash="ceb6a2aaf263fc359fabaf6f102cb8db"/><file name="Diners.png" hash="0f4264379e7b8ba6b1a30a3d69240ae2"/><file name="Hipercard.png" hash="c25430ddd8e441cc2fc3ef68219e7668"/><file name="Itau.png" hash="40d639fe4b14d063d810589577f0eb7d"/><file name="Mastercard.png" hash="836466c092121163320e9e6279f11f8b"/><file name="Visa.png" hash="cc0709d50773fa2815f7bfeb741a4219"/><file name="ababoleto.png" hash="47e3ede4db46d5938a68f126bb68bcfe"/><file name="abacartao.png" hash="667954485c4082bafa84920073288453"/><file name="abatransf.png" hash="0623c4cf50653b9c13d12cca5eed43f6"/><file name="ajax-loader.gif" hash="57ca1a2085d82f0574e3ef740b9a5ead"/><dir name="azul"><file name="ababoleto.png" hash="47e3ede4db46d5938a68f126bb68bcfe"/><file name="abacartao.png" hash="667954485c4082bafa84920073288453"/><file name="abatransf.png" hash="0623c4cf50653b9c13d12cca5eed43f6"/></dir><file name="bank-icon.png" hash="3f73473ce94841328abffa85fe314f3e"/><file name="bank-title.png" hash="3d33028c41f80b1042ef5500ea05c0d1"/><file name="bb.png" hash="572914d1e4b635dc56cd507c6c46b023"/><file name="boleto-icon.png" hash="c4560588cb6e12ca7756788648493ad3"/><file name="boleto.png" hash="fe1b591868a937c40e1a095b1313e3ed"/><dir name="branco"><file name="ababoleto.png" hash="f3baeeaf41a6528905b97d825ac67cf7"/><file name="abacartao.png" hash="684d8a48644f55f2c3504da1f51a350b"/><file name="abatransf.png" hash="ea6f42607620ea8f8dca34c1fc98b42b"/><file name="e-sedex.gif" hash="9d0af24408b3798ab687094ab9b76199"/><file name="e-sedex.png" hash="19c04d68032987d594c4da51e3b66094"/><file name="pac.gif" hash="fc1373622266269e8b0986b637e93851"/><file name="pac.png" hash="17aaff70f9924a8e37166429ceae549e"/><file name="sedex.gif" hash="9b6771f2d93f8f73dbbc8f5584a7f580"/><file name="sedex.png" hash="15e2831cad72756b9a9bf99a6e2af5e5"/></dir><file name="cc-title.png" hash="f3064bbd55a468c5bb717762e93a8a3b"/><file name="codigo-seguranca.png" hash="b1cdecab044511593083ff18033d4e4f"/><file name="flatrate_flatrate.gif" hash="a27796835310fe5e57ed11b5792d5530"/><file name="freeshipping_freeshipping.gif" hash="80af8e1da4c9cf03b1856f47bf7e27a4"/><file name="info.png" hash="051e3f3601ab034ba27615e42dd5cfdf"/><file name="logomoip.png" hash="0f09942428d649b8aa6b8999f0c60c0b"/><file name="logomoipck.png" hash="684da020f45d07cbee27cc231920d72a"/><file name="moip.png" hash="14273d22979881d4a57c960b952866e3"/><file name="moipamerican.png" hash="40ea216476033961d50f452bf4bca4df"/><file name="moipbanner2.png" hash="1c24f42b0cbb05f00ea779d3a719ebe1"/><file name="moipdiners.png" hash="0f4264379e7b8ba6b1a30a3d69240ae2"/><file name="moiphiper.png" hash="c25430ddd8e441cc2fc3ef68219e7668"/><file name="moipmaster.png" hash="836466c092121163320e9e6279f11f8b"/><file name="moipvisa.png" hash="cc0709d50773fa2815f7bfeb741a4219"/><file name="pedroteixeira_correios_40010.gif" hash="e260acafdeaf0f493350cfa5c34b8be1"/><file name="pedroteixeira_correios_40096.gif" hash="9d0af24408b3798ab687094ab9b76199"/><file name="pedroteixeira_correios_41068.gif" hash="fc1373622266269e8b0986b637e93851"/><file name="pedroteixeira_correios_41106.gif" hash="dcb56e6f42c1730736b44363d7c01e11"/><file name="pedroteixeira_correios_81019.gif" hash="9b6771f2d93f8f73dbbc8f5584a7f580"/><dir name="preto"><file name="ababoleto.png" hash="a728ac886e7e57744e62bba2c7b0b969"/><file name="abacartao.png" hash="50b6103cb5b7e51a27f3c26eaa7411d0"/><file name="abatransf.png" hash="61eec388356aea3230fc5d811ef996ea"/></dir><file name="printer.png" hash="f4bfc0849dceba778a6e7f252b7a3b9c"/><dir name="verde"><file name="ababoleto.png" hash="3c3e047acb513328ebdfd6bfc9c339fa"/><file name="abacartao.png" hash="809d7e21263b3474d1685087a91ca18a"/><file name="abatransf.png" hash="0e3e6bdba002a69be78e126f3e7e775f"/></dir><dir name="vermelho"><file name="ababoleto.png" hash="0d84f05b75c8e964122c4f087268bd1c"/><file name="abacartao.png" hash="63b85e98d5b77c6a373bc351080e60f4"/><file name="abatransf.png" hash="0bef9fec6108a914ebc108f3c600c013"/></dir><file name="warning.png" hash="3fbeef48124ccb146e082a9d20977b3e"/></dir></dir><dir name="onestepcheckout"><dir name="css"><file name="960grid_onestepcheckout.css" hash="0c8bb8b5a5519baf105c81be27fb8213"/><dir name="images"><file name="blank.gif" hash="325472601571f31e1bf00674c368d335"/><file name="fancy_close.png" hash="6e2879a324a76e9972ebc98201aae1d8"/><file name="fancy_loading.png" hash="b1d54c240cf06e7f41e372d56919b738"/><file name="fancy_nav_left.png" hash="3f3e406102152cd8236383568a40ba35"/><file name="fancy_nav_right.png" hash="216e4bde5bddeeaa60dc3d692890a68e"/><file name="fancy_overlay.png" hash="b886fd165d4b7ac77d41fb52d87ffc60"/><file name="fancy_shadow_e.png" hash="fd4f491080d29fade5080877f1ba4c8b"/><file name="fancy_shadow_n.png" hash="18cde16379b2ceadef714d9b346d09ec"/><file name="fancy_shadow_ne.png" hash="63adf788acf193d4e4f3642d7d793125"/><file name="fancy_shadow_nw.png" hash="c820c878aedb7a7f9ebd7135a58e7c65"/><file name="fancy_shadow_s.png" hash="9b9e5c888028aaef40fe5b6a363f1e29"/><file name="fancy_shadow_se.png" hash="a8afd5a008884380ee712d177105268f"/><file name="fancy_shadow_sw.png" hash="f81cc0fee5581d76ad3cebe47e7e791b"/><file name="fancy_shadow_w.png" hash="59b0e63eb059e58d932cfd53da4d87e6"/><file name="fancy_title_left.png" hash="1582ac2d3bef6a6445bf02ceca2741cd"/><file name="fancy_title_main.png" hash="38dad6c1ed4bdc81c0bec721b2deb8c2"/><file name="fancy_title_over.png" hash="b886fd165d4b7ac77d41fb52d87ffc60"/><file name="fancy_title_right.png" hash="6cbe0c935511e7f9a2555ccb6a7324c4"/><file name="fancybox-x.png" hash="168696d8a694214090ef90e029cdf393"/><file name="fancybox-y.png" hash="36a58859beb9a6b19322a37466b9f78e"/><file name="fancybox.png" hash="f6ccaf1eda8a79a2bd44643e5a346990"/><file name="ui-bg_diagonals-thick_18_b81900_40x40.png" hash="95f9cceeb9d742dd3e917ec16ed754f8"/><file name="ui-bg_diagonals-thick_20_666666_40x40.png" hash="f040b255ca13e693da34ab33c7d6b554"/><file name="ui-bg_flat_10_000000_40x100.png" hash="c18cd01623c7fed23c80d53e2f5e7c78"/><file name="ui-bg_glass_100_f6f6f6_1x400.png" hash="5f1847175ba18c41322cb9cb0581e0fb"/><file name="ui-bg_glass_100_fdf5ce_1x400.png" hash="d26e8f463195a7b86f86b7d550cfc114"/><file name="ui-bg_glass_65_ffffff_1x400.png" hash="e5a8f32e28fd5c27bf0fed33c8a8b9b5"/><file name="ui-bg_gloss-wave_35_000_500x100.png" hash="5038a7d5d5bc3c3a565c585079798dca"/><file name="ui-bg_gloss-wave_35_f6a828_500x100.png" hash="5038a7d5d5bc3c3a565c585079798dca"/><file name="ui-bg_highlight-soft_100_eeeeee_1x100.png" hash="384c3f17709ba0f809b023b6e7b10b84"/><file name="ui-bg_highlight-soft_75_ffe45c_1x100.png" hash="b806658954cb4d16ade8977af737f486"/><file name="ui-icons_222222_256x240.png" hash="ebe6b6902a408fbf9cac6379a1477525"/><file name="ui-icons_228ef1_256x240.png" hash="ff1768bb6731566603303d106e298bec"/><file name="ui-icons_ef8c08_256x240.png" hash="ef9a6ccfe3b14041928ddc708665b226"/><file name="ui-icons_ffd27a_256x240.png" hash="ab8c30acc0e3608fb79e01fccf832c70"/><file name="ui-icons_ffffff_256x240.png" hash="342bc03f6264c75d3f1d7f99e34295b9"/></dir><file name="jquery.fancybox-1.3.1.css" hash="cc35aa3ea29cb379c994b32050f313b6"/><file name="onestepcheckout.css" hash="776267da336ae7dabe485db3189bfb95"/></dir><dir name="images"><file name="01.png" hash="89fcfa0fa3fe73b65ca2420269c26158"/><file name="02.png" hash="dab59c7515b3366465a4dd57d2d9deb2"/><file name="03.png" hash="dcaf4232529a8f9ac304db7553397450"/><file name="04.png" hash="68ae3a414c70c12f340e7c801d854c53"/><file name="05.png" hash="6e8fe636f0593ed3cf00d140e68d2308"/><file name="2_clock.png" hash="bb35645e06d8687f818a583202ad1615"/><file name="ajax-loader-tr.gif" hash="7a46575a4d543082fd6174c593aa762a"/><file name="bkg-giftmessage.png" hash="e0dc9f84c687af088bcc04e3ea200e0b"/><file name="bkg-step-review.png" hash="589914598419e9625c9358df8f68d49c"/><file name="bkg_form-search.gif" hash="2ca36eb80ea705e063409153f3821f78"/><file name="bkg_header.jpg" hash="0211c47be1493bd0ec72949c47932b81"/><file name="blank.gif" hash="325472601571f31e1bf00674c368d335"/><file name="btn_checkout.gif" hash="d2060501e14e86c29e28137130e5726e"/><file name="clock.gif" hash="c6d5badd40d31d332470c32a03d2e98c"/><file name="clock.png" hash="73f0648c150bde4ef647db7e9c14ca3e"/><file name="demo-large_03.png" hash="86628bc4358a1c1f655534d4ae15be45"/><file name="demo-large_04.png" hash="0d5f289d2bf808165be000b318a50591"/><file name="demo-large_05.png" hash="5fd1386a147ea4768553c3990d9db804"/><file name="demo-large_051.png" hash="452556661a99a8fb20c6d507ce9506f0"/><file name="demo-large_06.png" hash="247e5412b0e70bf164a428374b15a82d"/><file name="demo-large_07.png" hash="9deac604cfb692b2e17f0f53c3aebbf4"/><file name="fancy_close.png" hash="6e2879a324a76e9972ebc98201aae1d8"/><file name="fancy_loading.png" hash="b1d54c240cf06e7f41e372d56919b738"/><file name="fancy_nav_left.png" hash="3f3e406102152cd8236383568a40ba35"/><file name="fancy_nav_right.png" hash="216e4bde5bddeeaa60dc3d692890a68e"/><file name="fancy_overlay.png" hash="7a46575a4d543082fd6174c593aa762a"/><file name="fancy_shadow_e.png" hash="fd4f491080d29fade5080877f1ba4c8b"/><file name="fancy_shadow_n.png" hash="18cde16379b2ceadef714d9b346d09ec"/><file name="fancy_shadow_ne.png" hash="63adf788acf193d4e4f3642d7d793125"/><file name="fancy_shadow_nw.png" hash="c820c878aedb7a7f9ebd7135a58e7c65"/><file name="fancy_shadow_s.png" hash="9b9e5c888028aaef40fe5b6a363f1e29"/><file name="fancy_shadow_se.png" hash="a8afd5a008884380ee712d177105268f"/><file name="fancy_shadow_sw.png" hash="f81cc0fee5581d76ad3cebe47e7e791b"/><file name="fancy_shadow_w.png" hash="59b0e63eb059e58d932cfd53da4d87e6"/><file name="fancy_title_left.png" hash="1582ac2d3bef6a6445bf02ceca2741cd"/><file name="fancy_title_main.png" hash="38dad6c1ed4bdc81c0bec721b2deb8c2"/><file name="fancy_title_over.png" hash="b886fd165d4b7ac77d41fb52d87ffc60"/><file name="fancy_title_right.png" hash="6cbe0c935511e7f9a2555ccb6a7324c4"/><file name="fancybox-x.png" hash="168696d8a694214090ef90e029cdf393"/><file name="fancybox-y.png" hash="36a58859beb9a6b19322a37466b9f78e"/><file name="fancybox.png" hash="11e57e492ee0311540967cc7a1e6e3e2"/><file name="grid-cal.gif" hash="b1468e5239504974c689eea5d93f86d4"/><file name="line-gradient.gif" hash="bef9df2d426124dbe3d496407219190b"/><file name="loja_segura.jpg" hash="5e65fd40952db665746dc485d67fdf35"/><file name="opc-ajax-loader.gif" hash="e805ea7eca1f34c75ba0f93780d32d38"/><file name="validation_advice_bg.gif" hash="b85432906de8985a8b14eeb2dc652d3c"/></dir></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="O2TI"><dir name="moip"><dir name="css"><file name="bootstrap.css" hash="1899fb29f3f5bdeeaecd6d16485614e6"/><file name="formulario.css" hash="54920765fd12d894d8db2fbcdb3e62d5"/><file name="prettify.css" hash="ecd4a5d6c0cbee10b168f6aa000c64ea"/></dir><dir name="imagem"><file name="AmericanExpress.png" hash="40ea216476033961d50f452bf4bca4df"/><file name="BancoDoBrasil.png" hash="572914d1e4b635dc56cd507c6c46b023"/><file name="Banrisul.png" hash="d4ac02772b3f521a92542b849e679092"/><file name="Bradesco.png" hash="ceb6a2aaf263fc359fabaf6f102cb8db"/><file name="Diners.png" hash="0f4264379e7b8ba6b1a30a3d69240ae2"/><file name="Hipercard.png" hash="c25430ddd8e441cc2fc3ef68219e7668"/><file name="Itau.png" hash="40d639fe4b14d063d810589577f0eb7d"/><file name="Mastercard.png" hash="836466c092121163320e9e6279f11f8b"/><file name="Visa.png" hash="cc0709d50773fa2815f7bfeb741a4219"/><file name="ababoleto.png" hash="f99320f749bda4f07e6bc9b43d4d98ad"/><file name="abacartao.png" hash="b9a2891519c51bb19ac1647dd5640be3"/><file name="abatransf.png" hash="86de71f37be51f0f19838c8952dd34b5"/><file name="ajax-loader.gif" hash="57ca1a2085d82f0574e3ef740b9a5ead"/><file name="bb.png" hash="572914d1e4b635dc56cd507c6c46b023"/><file name="boleto.png" hash="fe1b591868a937c40e1a095b1313e3ed"/><file name="codigo-seguranca.png" hash="b1cdecab044511593083ff18033d4e4f"/><file name="flatrate_flatrate.gif" hash="a27796835310fe5e57ed11b5792d5530"/><file name="freeshipping_freeshipping.gif" hash="80af8e1da4c9cf03b1856f47bf7e27a4"/><file name="info.png" hash="051e3f3601ab034ba27615e42dd5cfdf"/><file name="logomoip.png" hash="0f09942428d649b8aa6b8999f0c60c0b"/><file name="logomoipck.png" hash="684da020f45d07cbee27cc231920d72a"/><file name="moip.png" hash="14273d22979881d4a57c960b952866e3"/><file name="moipamerican.png" hash="40ea216476033961d50f452bf4bca4df"/><file name="moipdiners.png" hash="0f4264379e7b8ba6b1a30a3d69240ae2"/><file name="moiphiper.png" hash="c25430ddd8e441cc2fc3ef68219e7668"/><file name="moipmaster.png" hash="836466c092121163320e9e6279f11f8b"/><file name="moipvisa.png" hash="cc0709d50773fa2815f7bfeb741a4219"/><file name="pedroteixeira_correios_40010.gif" hash="3defbbdc7b3d5ca86d76643260182320"/><file name="pedroteixeira_correios_40096.gif" hash="33cd0845f40648cf0584b13fa65c942a"/><file name="pedroteixeira_correios_41068.gif" hash="f317b7dff693b6598c78829c1592b2b7"/><file name="pedroteixeira_correios_41106.gif" hash="f317b7dff693b6598c78829c1592b2b7"/><file name="pedroteixeira_correios_81019.gif" hash="3defbbdc7b3d5ca86d76643260182320"/></dir></dir></dir></dir></dir></dir></target><target name="magemedia"><dir name="O2TI"><dir name="all"><file name="logo.png" hash="7523d376189aad175dad07c900ab1ec4"/></dir></dir></target><target name="mageweb"><dir name="js"><dir name="O2TI"><file name="jquery.js" hash="f8e2833ce2f57ec673b178be7eefbd82"/><file name="jquery_noconflict.js" hash="afdd9b4ecb226d898fe655136f849752"/><dir name="moip"><file name="bootstrap-modal.js" hash="3a3af727bfc923a064aad1b02681ffce"/><file name="bootstrap.min.js" hash="5eb1cb055ddcf2f7b2b662f73f56cf1f"/></dir><dir name="onestepcheckout"><file name="billing.js" hash="9f72ed92f8f51401ebc2fe98395c6af0"/><file name="change-events.js" hash="5f2255559e09fc56f24c72acd80e70b7"/><file name="jquery.fancybox-1.3.1.js" hash="9a060de18420a5bbe26cfa42b8470323"/><file name="noConflict.js" hash="afdd9b4ecb226d898fe655136f849752"/><file name="novamascara.js" hash="b9e977ef39649ce38245bb62a855551b"/><file name="shipping.js" hash="d9045d07a8adddeaddf25a757e86cf44"/><file name="validacao.js" hash="73cb3aaf10be38fda611e8cff9abd550"/></dir></dir></dir><dir name="."><file name="MOIP_README.md" hash="4dfe78832a2ea8f2f065cd150c846658"/><file name="MOIP_SQL_MANUAL_INSTALATION.txt" hash="57eca9f3b60792f0e4925ff14b8eba0e"/></dir></target></contents>
|
39 |
<compatible/>
|
40 |
<dependencies><required><php><min>4.0.0</min><max>5.5.5</max></php><extension><name>openssl</name><min>1</min><max>1</max></extension><extension><name>PDO</name><min>1</min><max>1</max></extension><extension><name>mcrypt</name><min>1</min><max>1</max></extension></required></dependencies>
|
41 |
</package>
|
1 |
<?xml version="1.0"?>
|
2 |
<package>
|
3 |
<name>o2ti_moip</name>
|
4 |
+
<version>1.0.9</version>
|
5 |
<stability>stable</stability>
|
6 |
<license uri="http://o2ti.com/licensa_checkout_moip.txt">Free to use with MoIP</license>
|
7 |
<channel>community</channel>
|
31 |
Multi store split rates
|
32 |
Store terms and conditions (Mandatory in all stores following the federal law (http://legislacao.planalto.gov.br/legisla/legislacao.nsf/Viw_Identificacao/DEC%207.962-2013?OpenDocument) Nº 7.962, DE 15 DE MARÇO DE 2013</a>)
|
33 |
</ul></description>
|
34 |
+
<notes>Alteração no MoiP
|
35 |
+
Criação de xml para pedidos, restruturação do redirect.phtml, e-mail e info.phtml</notes>
|
36 |
<authors><author><name>O2TI</name><user>o2ti</user><email>contato@o2ti.com</email></author></authors>
|
37 |
+
<date>2014-02-23</date>
|
38 |
+
<time>19:14:52</time>
|
39 |
+
<contents><target name="magelocal"><dir name="O2TI"><dir name="All"><dir name="Helper"><file name="Data.php" hash="5cfce5f56526da7a17ac2e402b39dd6e"/></dir><dir name="etc"><file name="config.xml" hash="b4343acf6c3f25bb750a287f0b4fa7fc"/><file name="system.xml" hash="9bad1e5078f470994567ce7a68d71688"/></dir></dir><dir name="Moip"><dir name="Block"><dir name="Adminhtml"><dir name="moip"><dir name="Info"><file name="Customermessages.php" hash="bf0e3f76f8ab4dde138a4125fe2fb07c"/><file name="Info.php" hash="d41d8cd98f00b204e9800998ecf8427e"/></dir></dir></dir><file name="Info.php" hash="2056d0699fde273a1a9d16c65632e9bd"/><dir name="Standard"><file name="Form.php" hash="f93521922122f4d4d5f829a67c0754c2"/><file name="Info.php" hash="a1826c09d72b4310573cae391b8a0f06"/><file name="Novaforma.php" hash="9dfbce5025124bd7e80f7ac23386aa1a"/><file name="Redirect.php" hash="80cbf0f6501a36447c7afa67edb5cb0f"/></dir></dir><dir name="Helper"><file name="Data.php" hash="36af3c64c424820d5e6124528959d296"/></dir><dir name="Model"><file name="Api.php" hash="6fedca017231f611fd1ab26cdc57e894"/><dir name="Mysql4"><file name="Collection.php" hash="9e0195a71bb5a5cd959992a6cec97667"/><file name="Write.php" hash="056d78bdbbb7a9e466b62d78015a8ed5"/></dir><file name="Observer.php" hash="80db718dbfb7e493ad235e3bdf4d6baf"/><file name="Orders.php" hash="a6023047810e0652e9e6248d67704b44"/><dir name="Source"><file name="Ambiente.php" hash="439a9f70669af322f1de30937551a1f0"/><file name="FormasPagamento.php" hash="bfa5931fe39fc22841acc789e71e6e92"/><file name="Layout.php" hash="4cc1e4fb27e773ce93a1c6b9bc571158"/></dir><file name="Standard.php" hash="687000495f28dbe2fb230b26505ea60f"/><file name="Write.php" hash="ac1d3e9ff033480cab6ea20af271fa91"/><file name=".ftpquota" hash="bd9db78914b33cca442f35848cc680b5"/></dir><dir name="controllers"><file name="IndexController.php" hash="1c46afa51975fee2e626df503cfc29c9"/><file name="StandardController.php" hash="050e8beb60bbdf0a81e878344211f962"/></dir><dir name="etc"><file name="adminhtml.xml" hash="75bde86c187ceb24042233abde0f88b0"/><file name="config.xml" hash="3e921887d5844a4b5602db406b476ee4"/><file name="system.xml" hash="abf7ba5636a5c869d7782e1177e78839"/></dir><dir name="sql"><dir name="moip_setup"><file name="mysql4-install-0.1.0.php" hash="bff338f70822b4af170073029558b511"/><file name="mysql4-upgrade-0.1.0-0.2.0.php" hash="e767051db0711586184d20abbdebcbca"/><file name="mysql4-upgrade-0.1.0-0.2.1.php" hash="441725100d074d7d212bae4bc07db841"/><file name="mysql4-upgrade-0.2.1-0.2.2.php" hash="7e22a5f81d536e1b024e07d60df808d7"/><file name="mysql4-upgrade-0.2.1-0.2.3.php" hash="b6a1c02303eb5be5ac7c2c9bee962bb0"/><file name="mysql4-upgrade-0.2.1-0.2.4.php" hash="39985ee007790d939be31c8339c570fe"/></dir></dir></dir><dir name="Onestepcheckout"><dir name="Block"><dir name="Adminhtml"><dir name="Form"><dir name="Renderer"><dir name="Config"><file name="Createfield.php" hash="bca92a144c0564105091fb78ec75a235"/></dir></dir></dir><dir name="Onestepcheckout"><dir name="Edit"><file name="Form.php" hash="011556489a4e2e987d622bbc193ca5db"/><dir name="Tab"><file name="Form.php" hash="786a5a8d580250f8ab5c9def49f197c4"/></dir><file name="Tabs.php" hash="3e49037ed0f2ba7d930e7675398a6fd6"/></dir><file name="Edit.php" hash="b4a2a6c99cea16750408cb5c89c97ad8"/><file name="Grid.php" hash="8aa5742a2357b1c632ef26ce2a71e217"/><dir name="Sales"><dir name="Order"><file name="Grid.php" hash="e23140dfc8b567ba7d957afeabee6643"/><dir name="View"><dir name="Tab"><dir name="Info"><file name="Customermessages.php" hash="bf0e3f76f8ab4dde138a4125fe2fb07c"/><file name="Deliverydate.php" hash="64ea9d43321c8b51d74621ee90916553"/></dir></dir></dir></dir></dir><dir name="System"><dir name="Config"><dir name="Form"><dir name="Field"><file name="Addtimerange.php" hash="08419845203bd4dd3421cdcab5cf241d"/></dir></dir></dir></dir></dir><file name="Onestepcheckout.php" hash="d0253394f7c3515fcc4ba81f34f192d4"/></dir><dir name="Checkout"><dir name="Onepage"><dir name="Billing"><file name="Sortbilling.php" hash="c92c36496e94fd9dc6da3aa8e53dda86"/></dir><file name="Billing.php" hash="ef4f0f010d7e288c6664002060fa5b8a"/><dir name="Review"><file name="Options.php" hash="67b005f43191b0be294d4ecf50c37485"/></dir><dir name="Shipping"><file name="Sortshipping.php" hash="9af5fa1281bf34c37e4c92fb40a4873c"/></dir><file name="Shipping.php" hash="a56afd3502132baab34c4a9419aa7e3c"/><dir name="Shippingmethod"><file name="Deliverydate.php" hash="36ba92c13f59f21c33902ea1146d6cdc"/></dir></dir><file name="Top.php" hash="70e323dbbb57a29579c13412a8a2443f"/></dir><file name="Onestepcheckout.php" hash="e8b954f14acebf579bb0910813e899e4"/><dir name="Sales"><dir name="Info"><file name="Customermessages.php" hash="6666cedaeb9597e0c5f90cf7cc2934ae"/><file name="Deliverydate.php" hash="225859a718283767ca44b1ddccfd4bfb"/></dir></dir></dir><dir name="Helper"><file name="Data.php" hash="fb1897f58ca16ce27184dc0790f0ecf2"/></dir><dir name="Model"><dir name="Customer"><file name="Customer.php" hash="b1b26b8e170bd4ed90b27fb9fcea8481"/></dir><dir name="Entity"><file name="Tipopessoa.php" hash="af14c8d054fe25c7f8cef5f89fcb65da"/></dir><dir name="Mysql4"><dir name="Onestepcheckout"><file name="Collection.php" hash="13781c0c51fcde3c6afc4f31054a6e03"/></dir><file name="Onestepcheckout.php" hash="5777de55ec60a045e86dc9de10f768bd"/></dir><file name="Observer.php" hash="75aeac65c1e5ffa22465b3a1d9c754c7"/><file name="Onestepcheckout.php" hash="3630794e4b1fda8229b82826e49a702f"/><dir name="Sales"><dir name="Quote"><file name="Address.php" hash="09cba85a351b58f16b4daba5be0d5595"/></dir></dir><dir name="Shipping"><file name="Allowedmethods.php" hash="801e98156ee12fd5fa08f30c37b64086"/></dir><file name="Status.php" hash="3e1d737e4f8cef4b6a591240efdafd83"/><dir name="System"><dir name="Config"><dir name="Source"><file name="Checkuncheck.php" hash="a232182e727d089f1a730d1e0bb05996"/><file name="Disablefield.php" hash="d5a2192f21d68175ed7375f3a6e7f85a"/><file name="Formatdate.php" hash="7e3eeae0c5a8ebba85ed501ef513b192"/><file name="Optionaddfield.php" hash="3b9cf9f6a67931b7d56c21c9e8cb48b3"/><file name="Optionhidefield.php" hash="847e6415e5d037ae3b3572e1df28f347"/><file name="Pagelayout.php" hash="676dd09a7aad20c0e3cfdb74e9f7f87f"/><dir name="Payment"><file name="Allowedmethods.php" hash="ea276b37bfdf6bcdbc302a76df966523"/></dir><dir name="Shipping"><file name="Allowedmethods.php" hash="801e98156ee12fd5fa08f30c37b64086"/></dir><file name="Subscribenewletter.php" hash="48dd4e572839e532e5321854bdd07750"/><dir name="form"><file name="Createfield.php" hash="6cc825f91bc3f787b7a84e5369422f39"/></dir></dir></dir></dir></dir><dir name="controllers"><dir name="Adminhtml"><file name="OnestepcheckoutController.php" hash="260a95696953ed372ed3d22ab52e7c85"/></dir><file name="IndexController.php" hash="b27320c1411d103bfa2616f4825de62b"/><file name="TestController.php" hash="b7814c4a88338b9e031f26274bd7d07a"/></dir><dir name="etc"><file name="config.xml" hash="a8cd520ee0f0b93c00a01d95951da4fa"/><file name="system.xml" hash="61d85ec1a6ace0e8f465ad6069c5b6c7"/></dir><dir name="sql"><dir name="onestepcheckout_setup"><file name="mysql4-install-0.1.0.php" hash="0bcce57d95b0c63e8efb86faad1d798c"/><file name="mysql4-upgrade-0.1.0-0.2.0.php" hash="6d20a03343747545eb10c276631114c8"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="default"><dir name="default"><dir name="layout"><file name="o2ti_moip.xml" hash="8b83c3965f776ae872077ea9523361a2"/><file name="o2ti_onestepcheckout.xml" hash="98ea87bd4113f491aade48e87c3fde46"/></dir><dir name="template"><dir name="O2TI"><dir name="cadastro"><dir name="customer"><dir name="form"><file name="edit.phtml" hash="1cdb3179dd883809bd7357409ca0a5d0"/></dir></dir><dir name="persistent"><dir name="checkout"><dir name="onepage"><file name="billing.phtml" hash="5fc8ba027dfb92482c1a85d88e211cda"/></dir></dir><dir name="customer"><dir name="form"><file name="register.phtml" hash="08b5b692abfce0e689d243c3478de77e"/></dir></dir></dir></dir><dir name="moip"><file name="Novaforma.phtml" hash="49d046daa42bae37c1c5e80ff88c3e0d"/><file name="boleto.phtml" hash="2e962f38695a7c5b3b405adf2d1af22f"/><file name="cartao.phtml" hash="21e081eade405c0ead973f028cb4e072"/><file name="emptyupdate.phtml" hash="8625e958f0e2dd1138721b8518c8069a"/><file name="form.phtml" hash="97159f0fb40753ded7c032dfba582762"/><file name="horizontal_form.phtml" hash="41ddf8a11071c36e026fd989ca884178"/><file name="info.phtml" hash="fdf42bb7c2424b6332a2a37f0ecfaee2"/><file name="layout_boleto.phtml" hash="6a609b4bc4bbbb610f151266983c06e1"/><file name="redirect.phtml" hash="1d302d419b7855d702b5f04078062024"/><file name="refaz.phtml" hash="61375f1a1f052fa29100cae10623fd85"/><file name="transferencia.phtml" hash="85b6ed7d8fba7a3438799854c8b013a7"/><file name="vertical_form.phtml" hash="926d44a6c8969bfd105ed0020e177a32"/></dir><dir name="onestepcheckout"><dir name="daskboard"><dir name="onepage"><file name="agreements.phtml" hash="5b762aa76287b160fcbec8fed8b789e8"/><dir name="billing"><file name="billing_form.phtml" hash="908f6689451953e64b295da644181255"/></dir><file name="billing.phtml" hash="3ace016f656dd99a2f18b35ec13740a5"/><file name="correio.phtml" hash="461b88fcbf6adffc4f23c5905932bafa"/><file name="coupon.phtml" hash="7e3ffcc7e51d78c7607d91bc40ed68db"/><file name="forgotpassword.phtml" hash="2fb80e3ec1a8151dde497743b149c6e9"/><file name="local.xml" hash="08c7ce351c502056fb9ee3a14a9b065a"/><file name="login.phtml" hash="85198c4e290aec3eaf72057cf04d5ca8"/><dir name="payment"><file name="methods.phtml" hash="235eecfb6272e525a70cab79785852e2"/></dir><file name="payment.phtml" hash="3501af6f3b4c108f11bc2bc6d58a9d87"/><dir name="review"><file name="button.phtml" hash="4d5c7c5a2d70f85ec324e79c7e81946b"/><file name="info.phtml" hash="68556313d6d0943c153d69ebd00c8c4b"/><file name="item.phtml" hash="af2406220da6cd44940a672e2771f902"/><dir name="options"><file name="additional.phtml" hash="724b44c70421d206a77f72c2c151cf40"/></dir><file name="options.phtml" hash="c0281a5dc15905296ac8e93a9d13071b"/><file name="totals.phtml" hash="6e857d144768ed8faa0be977b547b32f"/></dir><file name="review.phtml" hash="763347e2b03553d1bf791b3c6df093a3"/><dir name="shipping"><file name="shipping_form.phtml" hash="87bf26552fb0c331c012a2b40c7ce059"/></dir><file name="shipping.phtml" hash="69f97ed0e0eb2e391b1e761bb8b1ffc7"/><dir name="shipping_method"><file name="available.phtml" hash="f0eb7caf698a2dddf1895b5211167467"/></dir><file name="shipping_method.phtml" hash="58c56da9e30df17c997e08e20e32a8ee"/></dir></dir><file name="daskboard.phtml" hash="840bb5f0838b3c039575db1cbeb6359d"/><file name="emptyupdate.phtml" hash="7bf34446254428a5c42740731127b435"/><file name="onepage.phtml" hash="149f7077a5a959968afc0da9a0d952db"/><dir name="sales"><dir name="order"><dir name="info"><file name="customermessages.phtml" hash="1d783fb503426ca094f02525dd1a827b"/><file name="customermessages.phtml~" hash="aa6199bb564edbf6d950fa154b624c02"/><file name="deliverydate.phtml" hash="24d4d3fafafca91bb44b2159695c24bc"/><file name="deliverydate.phtml~" hash="75709e72398a0df41305dee259dc3de2"/></dir><file name="info.phtml" hash="a5b6b9223ec3d5da923e04f8becc84f3"/><dir name="view"><dir name="tab"><dir name="info"><file name="customermessages.phtml" hash="7de74c4598eceef2d17215585252f740"/><file name="deliverydate.phtml" hash="6e1260a32a1f6801ac185ef38a33114c"/></dir><file name="info.phtml" hash="57f4718dbfaa448976954368c1932b2b"/></dir></dir></dir></dir></dir></dir><dir name="customer"><dir><dir name="widget"><file name="dob.phtml" hash="7ac1cc016c90251d0c423d7347e9d715"/><file name="taxvat.phtml" hash="67333f779d3c7503209ce057a3b44c34"/></dir></dir></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="O2TI"><dir name="moip"><file name="form.phtml" hash="e381151a9b66f0fdc6cd74d019cefb5e"/><file name="info.phtml" hash="c8d72ab25c1a9db9ac282b19fcd81711"/><file name="redirect.phtml" hash="a928915ad38266f0ca462a6e434cbb77"/></dir><dir name="onestepcheckout"><dir name="sales"><dir name="order"><dir name="view"><dir name="tab"><dir name="info"><file name="Customermessages.phtml" hash="bfaea7d5c4300ae8c73c31f3472c5a14"/><file name="Deliverydate.phtml" hash="b5040d3cb30cc31c0c63bfaa81d3c7ac"/></dir><file name="info.phtml" hash="1b6b38d40668d878487f1710a28c1e69"/></dir></dir></dir></dir></dir><dir name="sales"><dir name="order"><dir name="view"><file name="info.phtml" hash="c6aa8255f5c494857c557a21a59e3367"/></dir></dir></dir></dir></dir><dir name="layout"><file name="o2ti_onestepcheckout.xml" hash="b601985811c14292e18b3e242ac6cc93"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="O2TI_All.xml" hash="0112972a847c93755903dd13239eae1f"/><file name="O2TI_Moip.xml" hash="e2cef22a0e5c667be681851c03dbffd4"/><file name="O2TI_Onestepcheckout.xml" hash="dbcbe66be4612fd2942b6f6847b834c9"/></dir></target><target name="magelocale"><dir><dir name="en_US"><file name="O2TI_Onestepcheckout.csv" hash="4bff2b6a4c9e13f8d9ea2a287c10c85f"/><dir name="template"><dir name="email"><file name="statusmail_cancelado_o2ti.html" hash="867805dc1d9ecd61f96e1134cdacecf1"/><file name="statusmail_cancelado_o2ti.html~" hash="cb69a0a0e730655677332354bf3dd4a2"/></dir></dir></dir><dir name="pt_BR"><file name="O2TI_Onestepcheckout.csv" hash="4bff2b6a4c9e13f8d9ea2a287c10c85f"/><dir name="template"><dir name="email"><file name="statusmail_cancelado_o2ti.html" hash="867805dc1d9ecd61f96e1134cdacecf1"/><file name="statusmail_cancelado_o2ti.html~" hash="cb69a0a0e730655677332354bf3dd4a2"/></dir></dir></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="default"><dir name="default"><dir name="O2TI"><dir name="moip"><dir name="css"><file name="bootstrap.css" hash="39f61bb34cd4c8ae95a771d2593ccfc3"/><file name="formulario.css" hash="dba3b96839a8e49fd4dff529ded7a2db"/><file name="formulario_horizontal.css" hash="3ebe4fefb3bdcea345187d043f71e843"/><file name="prettify.css" hash="ecd4a5d6c0cbee10b168f6aa000c64ea"/></dir><dir name="imagem"><file name="AmericanExpress.png" hash="40ea216476033961d50f452bf4bca4df"/><file name="BancoDoBrasil.png" hash="572914d1e4b635dc56cd507c6c46b023"/><file name="Banrisul.png" hash="d4ac02772b3f521a92542b849e679092"/><file name="Bradesco.png" hash="ceb6a2aaf263fc359fabaf6f102cb8db"/><file name="Diners.png" hash="0f4264379e7b8ba6b1a30a3d69240ae2"/><file name="Hipercard.png" hash="c25430ddd8e441cc2fc3ef68219e7668"/><file name="Itau.png" hash="40d639fe4b14d063d810589577f0eb7d"/><file name="Mastercard.png" hash="836466c092121163320e9e6279f11f8b"/><file name="Visa.png" hash="cc0709d50773fa2815f7bfeb741a4219"/><file name="ababoleto.png" hash="47e3ede4db46d5938a68f126bb68bcfe"/><file name="abacartao.png" hash="667954485c4082bafa84920073288453"/><file name="abatransf.png" hash="0623c4cf50653b9c13d12cca5eed43f6"/><file name="ajax-loader.gif" hash="57ca1a2085d82f0574e3ef740b9a5ead"/><dir name="azul"><file name="ababoleto.png" hash="47e3ede4db46d5938a68f126bb68bcfe"/><file name="abacartao.png" hash="667954485c4082bafa84920073288453"/><file name="abatransf.png" hash="0623c4cf50653b9c13d12cca5eed43f6"/></dir><file name="bank-icon.png" hash="3f73473ce94841328abffa85fe314f3e"/><file name="bank-title.png" hash="3d33028c41f80b1042ef5500ea05c0d1"/><file name="bb.png" hash="572914d1e4b635dc56cd507c6c46b023"/><file name="boleto-icon.png" hash="c4560588cb6e12ca7756788648493ad3"/><file name="boleto.png" hash="fe1b591868a937c40e1a095b1313e3ed"/><dir name="branco"><file name="ababoleto.png" hash="f3baeeaf41a6528905b97d825ac67cf7"/><file name="abacartao.png" hash="684d8a48644f55f2c3504da1f51a350b"/><file name="abatransf.png" hash="ea6f42607620ea8f8dca34c1fc98b42b"/><file name="e-sedex.gif" hash="9d0af24408b3798ab687094ab9b76199"/><file name="e-sedex.png" hash="19c04d68032987d594c4da51e3b66094"/><file name="pac.gif" hash="fc1373622266269e8b0986b637e93851"/><file name="pac.png" hash="17aaff70f9924a8e37166429ceae549e"/><file name="sedex.gif" hash="9b6771f2d93f8f73dbbc8f5584a7f580"/><file name="sedex.png" hash="15e2831cad72756b9a9bf99a6e2af5e5"/></dir><file name="cc-title.png" hash="f3064bbd55a468c5bb717762e93a8a3b"/><file name="codigo-seguranca.png" hash="b1cdecab044511593083ff18033d4e4f"/><file name="flatrate_flatrate.gif" hash="a27796835310fe5e57ed11b5792d5530"/><file name="freeshipping_freeshipping.gif" hash="80af8e1da4c9cf03b1856f47bf7e27a4"/><file name="info.png" hash="051e3f3601ab034ba27615e42dd5cfdf"/><file name="logomoip.png" hash="0f09942428d649b8aa6b8999f0c60c0b"/><file name="logomoipck.png" hash="684da020f45d07cbee27cc231920d72a"/><file name="moip.png" hash="14273d22979881d4a57c960b952866e3"/><file name="moipamerican.png" hash="40ea216476033961d50f452bf4bca4df"/><file name="moipbanner2.png" hash="1c24f42b0cbb05f00ea779d3a719ebe1"/><file name="moipdiners.png" hash="0f4264379e7b8ba6b1a30a3d69240ae2"/><file name="moiphiper.png" hash="c25430ddd8e441cc2fc3ef68219e7668"/><file name="moipmaster.png" hash="836466c092121163320e9e6279f11f8b"/><file name="moipvisa.png" hash="cc0709d50773fa2815f7bfeb741a4219"/><file name="pedroteixeira_correios_40010.gif" hash="e260acafdeaf0f493350cfa5c34b8be1"/><file name="pedroteixeira_correios_40096.gif" hash="9d0af24408b3798ab687094ab9b76199"/><file name="pedroteixeira_correios_41068.gif" hash="fc1373622266269e8b0986b637e93851"/><file name="pedroteixeira_correios_41106.gif" hash="dcb56e6f42c1730736b44363d7c01e11"/><file name="pedroteixeira_correios_81019.gif" hash="9b6771f2d93f8f73dbbc8f5584a7f580"/><dir name="preto"><file name="ababoleto.png" hash="a728ac886e7e57744e62bba2c7b0b969"/><file name="abacartao.png" hash="50b6103cb5b7e51a27f3c26eaa7411d0"/><file name="abatransf.png" hash="61eec388356aea3230fc5d811ef996ea"/></dir><file name="printer.png" hash="f4bfc0849dceba778a6e7f252b7a3b9c"/><dir name="verde"><file name="ababoleto.png" hash="3c3e047acb513328ebdfd6bfc9c339fa"/><file name="abacartao.png" hash="809d7e21263b3474d1685087a91ca18a"/><file name="abatransf.png" hash="0e3e6bdba002a69be78e126f3e7e775f"/></dir><dir name="vermelho"><file name="ababoleto.png" hash="0d84f05b75c8e964122c4f087268bd1c"/><file name="abacartao.png" hash="63b85e98d5b77c6a373bc351080e60f4"/><file name="abatransf.png" hash="0bef9fec6108a914ebc108f3c600c013"/></dir><file name="warning.png" hash="3fbeef48124ccb146e082a9d20977b3e"/></dir></dir><dir name="onestepcheckout"><dir name="css"><file name="960grid_onestepcheckout.css" hash="0c8bb8b5a5519baf105c81be27fb8213"/><dir name="images"><file name="blank.gif" hash="325472601571f31e1bf00674c368d335"/><file name="fancy_close.png" hash="6e2879a324a76e9972ebc98201aae1d8"/><file name="fancy_loading.png" hash="b1d54c240cf06e7f41e372d56919b738"/><file name="fancy_nav_left.png" hash="3f3e406102152cd8236383568a40ba35"/><file name="fancy_nav_right.png" hash="216e4bde5bddeeaa60dc3d692890a68e"/><file name="fancy_overlay.png" hash="b886fd165d4b7ac77d41fb52d87ffc60"/><file name="fancy_shadow_e.png" hash="fd4f491080d29fade5080877f1ba4c8b"/><file name="fancy_shadow_n.png" hash="18cde16379b2ceadef714d9b346d09ec"/><file name="fancy_shadow_ne.png" hash="63adf788acf193d4e4f3642d7d793125"/><file name="fancy_shadow_nw.png" hash="c820c878aedb7a7f9ebd7135a58e7c65"/><file name="fancy_shadow_s.png" hash="9b9e5c888028aaef40fe5b6a363f1e29"/><file name="fancy_shadow_se.png" hash="a8afd5a008884380ee712d177105268f"/><file name="fancy_shadow_sw.png" hash="f81cc0fee5581d76ad3cebe47e7e791b"/><file name="fancy_shadow_w.png" hash="59b0e63eb059e58d932cfd53da4d87e6"/><file name="fancy_title_left.png" hash="1582ac2d3bef6a6445bf02ceca2741cd"/><file name="fancy_title_main.png" hash="38dad6c1ed4bdc81c0bec721b2deb8c2"/><file name="fancy_title_over.png" hash="b886fd165d4b7ac77d41fb52d87ffc60"/><file name="fancy_title_right.png" hash="6cbe0c935511e7f9a2555ccb6a7324c4"/><file name="fancybox-x.png" hash="168696d8a694214090ef90e029cdf393"/><file name="fancybox-y.png" hash="36a58859beb9a6b19322a37466b9f78e"/><file name="fancybox.png" hash="f6ccaf1eda8a79a2bd44643e5a346990"/><file name="ui-bg_diagonals-thick_18_b81900_40x40.png" hash="95f9cceeb9d742dd3e917ec16ed754f8"/><file name="ui-bg_diagonals-thick_20_666666_40x40.png" hash="f040b255ca13e693da34ab33c7d6b554"/><file name="ui-bg_flat_10_000000_40x100.png" hash="c18cd01623c7fed23c80d53e2f5e7c78"/><file name="ui-bg_glass_100_f6f6f6_1x400.png" hash="5f1847175ba18c41322cb9cb0581e0fb"/><file name="ui-bg_glass_100_fdf5ce_1x400.png" hash="d26e8f463195a7b86f86b7d550cfc114"/><file name="ui-bg_glass_65_ffffff_1x400.png" hash="e5a8f32e28fd5c27bf0fed33c8a8b9b5"/><file name="ui-bg_gloss-wave_35_000_500x100.png" hash="5038a7d5d5bc3c3a565c585079798dca"/><file name="ui-bg_gloss-wave_35_f6a828_500x100.png" hash="5038a7d5d5bc3c3a565c585079798dca"/><file name="ui-bg_highlight-soft_100_eeeeee_1x100.png" hash="384c3f17709ba0f809b023b6e7b10b84"/><file name="ui-bg_highlight-soft_75_ffe45c_1x100.png" hash="b806658954cb4d16ade8977af737f486"/><file name="ui-icons_222222_256x240.png" hash="ebe6b6902a408fbf9cac6379a1477525"/><file name="ui-icons_228ef1_256x240.png" hash="ff1768bb6731566603303d106e298bec"/><file name="ui-icons_ef8c08_256x240.png" hash="ef9a6ccfe3b14041928ddc708665b226"/><file name="ui-icons_ffd27a_256x240.png" hash="ab8c30acc0e3608fb79e01fccf832c70"/><file name="ui-icons_ffffff_256x240.png" hash="342bc03f6264c75d3f1d7f99e34295b9"/></dir><file name="jquery.fancybox-1.3.1.css" hash="cc35aa3ea29cb379c994b32050f313b6"/><file name="onestepcheckout.css" hash="776267da336ae7dabe485db3189bfb95"/></dir><dir name="images"><file name="01.png" hash="89fcfa0fa3fe73b65ca2420269c26158"/><file name="02.png" hash="dab59c7515b3366465a4dd57d2d9deb2"/><file name="03.png" hash="dcaf4232529a8f9ac304db7553397450"/><file name="04.png" hash="68ae3a414c70c12f340e7c801d854c53"/><file name="05.png" hash="6e8fe636f0593ed3cf00d140e68d2308"/><file name="2_clock.png" hash="bb35645e06d8687f818a583202ad1615"/><file name="ajax-loader-tr.gif" hash="7a46575a4d543082fd6174c593aa762a"/><file name="bkg-giftmessage.png" hash="e0dc9f84c687af088bcc04e3ea200e0b"/><file name="bkg-step-review.png" hash="589914598419e9625c9358df8f68d49c"/><file name="bkg_form-search.gif" hash="2ca36eb80ea705e063409153f3821f78"/><file name="bkg_header.jpg" hash="0211c47be1493bd0ec72949c47932b81"/><file name="blank.gif" hash="325472601571f31e1bf00674c368d335"/><file name="btn_checkout.gif" hash="d2060501e14e86c29e28137130e5726e"/><file name="clock.gif" hash="c6d5badd40d31d332470c32a03d2e98c"/><file name="clock.png" hash="73f0648c150bde4ef647db7e9c14ca3e"/><file name="demo-large_03.png" hash="86628bc4358a1c1f655534d4ae15be45"/><file name="demo-large_04.png" hash="0d5f289d2bf808165be000b318a50591"/><file name="demo-large_05.png" hash="5fd1386a147ea4768553c3990d9db804"/><file name="demo-large_051.png" hash="452556661a99a8fb20c6d507ce9506f0"/><file name="demo-large_06.png" hash="247e5412b0e70bf164a428374b15a82d"/><file name="demo-large_07.png" hash="9deac604cfb692b2e17f0f53c3aebbf4"/><file name="fancy_close.png" hash="6e2879a324a76e9972ebc98201aae1d8"/><file name="fancy_loading.png" hash="b1d54c240cf06e7f41e372d56919b738"/><file name="fancy_nav_left.png" hash="3f3e406102152cd8236383568a40ba35"/><file name="fancy_nav_right.png" hash="216e4bde5bddeeaa60dc3d692890a68e"/><file name="fancy_overlay.png" hash="7a46575a4d543082fd6174c593aa762a"/><file name="fancy_shadow_e.png" hash="fd4f491080d29fade5080877f1ba4c8b"/><file name="fancy_shadow_n.png" hash="18cde16379b2ceadef714d9b346d09ec"/><file name="fancy_shadow_ne.png" hash="63adf788acf193d4e4f3642d7d793125"/><file name="fancy_shadow_nw.png" hash="c820c878aedb7a7f9ebd7135a58e7c65"/><file name="fancy_shadow_s.png" hash="9b9e5c888028aaef40fe5b6a363f1e29"/><file name="fancy_shadow_se.png" hash="a8afd5a008884380ee712d177105268f"/><file name="fancy_shadow_sw.png" hash="f81cc0fee5581d76ad3cebe47e7e791b"/><file name="fancy_shadow_w.png" hash="59b0e63eb059e58d932cfd53da4d87e6"/><file name="fancy_title_left.png" hash="1582ac2d3bef6a6445bf02ceca2741cd"/><file name="fancy_title_main.png" hash="38dad6c1ed4bdc81c0bec721b2deb8c2"/><file name="fancy_title_over.png" hash="b886fd165d4b7ac77d41fb52d87ffc60"/><file name="fancy_title_right.png" hash="6cbe0c935511e7f9a2555ccb6a7324c4"/><file name="fancybox-x.png" hash="168696d8a694214090ef90e029cdf393"/><file name="fancybox-y.png" hash="36a58859beb9a6b19322a37466b9f78e"/><file name="fancybox.png" hash="11e57e492ee0311540967cc7a1e6e3e2"/><file name="grid-cal.gif" hash="b1468e5239504974c689eea5d93f86d4"/><file name="line-gradient.gif" hash="bef9df2d426124dbe3d496407219190b"/><file name="loja_segura.jpg" hash="5e65fd40952db665746dc485d67fdf35"/><file name="opc-ajax-loader.gif" hash="e805ea7eca1f34c75ba0f93780d32d38"/><file name="validation_advice_bg.gif" hash="b85432906de8985a8b14eeb2dc652d3c"/></dir></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="O2TI"><dir name="moip"><dir name="css"><file name="bootstrap.css" hash="1899fb29f3f5bdeeaecd6d16485614e6"/><file name="formulario.css" hash="54920765fd12d894d8db2fbcdb3e62d5"/><file name="prettify.css" hash="a5ec3900f58a1827c96f8f103dc51ee6"/></dir><dir name="imagem"><file name="AmericanExpress.png" hash="40ea216476033961d50f452bf4bca4df"/><file name="BancoDoBrasil.png" hash="572914d1e4b635dc56cd507c6c46b023"/><file name="Banrisul.png" hash="d4ac02772b3f521a92542b849e679092"/><file name="Bradesco.png" hash="ceb6a2aaf263fc359fabaf6f102cb8db"/><file name="Diners.png" hash="0f4264379e7b8ba6b1a30a3d69240ae2"/><file name="Hipercard.png" hash="c25430ddd8e441cc2fc3ef68219e7668"/><file name="Itau.png" hash="40d639fe4b14d063d810589577f0eb7d"/><file name="Mastercard.png" hash="836466c092121163320e9e6279f11f8b"/><file name="Visa.png" hash="cc0709d50773fa2815f7bfeb741a4219"/><file name="ababoleto.png" hash="f99320f749bda4f07e6bc9b43d4d98ad"/><file name="abacartao.png" hash="b9a2891519c51bb19ac1647dd5640be3"/><file name="abatransf.png" hash="86de71f37be51f0f19838c8952dd34b5"/><file name="ajax-loader.gif" hash="57ca1a2085d82f0574e3ef740b9a5ead"/><file name="bb.png" hash="572914d1e4b635dc56cd507c6c46b023"/><file name="boleto.png" hash="fe1b591868a937c40e1a095b1313e3ed"/><file name="codigo-seguranca.png" hash="03f97c4205ab539ba49ef83017e8ec94"/><file name="flatrate_flatrate.gif" hash="a27796835310fe5e57ed11b5792d5530"/><file name="freeshipping_freeshipping.gif" hash="80af8e1da4c9cf03b1856f47bf7e27a4"/><file name="info.png" hash="051e3f3601ab034ba27615e42dd5cfdf"/><file name="logomoip.png" hash="0f09942428d649b8aa6b8999f0c60c0b"/><file name="logomoipck.png" hash="684da020f45d07cbee27cc231920d72a"/><file name="moip.png" hash="14273d22979881d4a57c960b952866e3"/><file name="moipamerican.png" hash="40ea216476033961d50f452bf4bca4df"/><file name="moipdiners.png" hash="0f4264379e7b8ba6b1a30a3d69240ae2"/><file name="moiphiper.png" hash="c25430ddd8e441cc2fc3ef68219e7668"/><file name="moipmaster.png" hash="836466c092121163320e9e6279f11f8b"/><file name="moipvisa.png" hash="cc0709d50773fa2815f7bfeb741a4219"/><file name="pedroteixeira_correios_40010.gif" hash="3defbbdc7b3d5ca86d76643260182320"/><file name="pedroteixeira_correios_40096.gif" hash="33cd0845f40648cf0584b13fa65c942a"/><file name="pedroteixeira_correios_41068.gif" hash="f317b7dff693b6598c78829c1592b2b7"/><file name="pedroteixeira_correios_41106.gif" hash="f317b7dff693b6598c78829c1592b2b7"/><file name="pedroteixeira_correios_81019.gif" hash="3defbbdc7b3d5ca86d76643260182320"/></dir></dir></dir></dir></dir></dir></target><target name="magemedia"><dir name="O2TI"><dir name="all"><file name="logo.png" hash="c08692c7e53617ad2a6d5f1449d04e96"/></dir></dir></target><target name="mageweb"><dir name="js"><dir name="O2TI"><file name="jquery.js" hash="f8e2833ce2f57ec673b178be7eefbd82"/><file name="jquery_noconflict.js" hash="afdd9b4ecb226d898fe655136f849752"/><dir name="moip"><file name="bootstrap-modal.js" hash="3a3af727bfc923a064aad1b02681ffce"/><file name="bootstrap.min.js" hash="5eb1cb055ddcf2f7b2b662f73f56cf1f"/><file name="jquery_noconflict.js" hash="afdd9b4ecb226d898fe655136f849752"/><file name="novamascara.js" hash="b9e977ef39649ce38245bb62a855551b"/><file name="validacao.js" hash="73cb3aaf10be38fda611e8cff9abd550"/></dir><dir name="onestepcheckout"><file name="billing.js" hash="9f72ed92f8f51401ebc2fe98395c6af0"/><file name="change-events.js" hash="5f2255559e09fc56f24c72acd80e70b7"/><file name="jquery.fancybox-1.3.1.js" hash="9a060de18420a5bbe26cfa42b8470323"/><file name="noConflict.js" hash="afdd9b4ecb226d898fe655136f849752"/><file name="novamascara.js" hash="b9e977ef39649ce38245bb62a855551b"/><file name="shipping.js" hash="d9045d07a8adddeaddf25a757e86cf44"/><file name="validacao.js" hash="73cb3aaf10be38fda611e8cff9abd550"/></dir></dir></dir><dir name="."><file name="MOIP_README.md" hash="4dfe78832a2ea8f2f065cd150c846658"/><file name="MOIP_SQL_MANUAL_INSTALATION.txt" hash="57eca9f3b60792f0e4925ff14b8eba0e"/></dir></target></contents>
|
40 |
<compatible/>
|
41 |
<dependencies><required><php><min>4.0.0</min><max>5.5.5</max></php><extension><name>openssl</name><min>1</min><max>1</max></extension><extension><name>PDO</name><min>1</min><max>1</max></extension><extension><name>mcrypt</name><min>1</min><max>1</max></extension></required></dependencies>
|
42 |
</package>
|
skin/adminhtml/default/default/O2TI/moip/css/prettify.css
CHANGED
Binary file
|
skin/adminhtml/default/default/O2TI/moip/imagem/codigo-seguranca.png
CHANGED
Binary file
|
skin/frontend/default/default/O2TI/moip/css/bootstrap.css
CHANGED
@@ -41,7 +41,11 @@
|
|
41 |
|
42 |
.col-md-6 h1, .col-md-6 h2, .col-md-6 h3{color:#333;}
|
43 |
.col-md-6 h4{color:#666;}
|
44 |
-
|
|
|
|
|
|
|
|
|
45 |
|
46 |
.method-type{width: auto;clear:both;float:lefT;}
|
47 |
.method-type h3{font-size:12pt;margin-bottom:7px;}
|
41 |
|
42 |
.col-md-6 h1, .col-md-6 h2, .col-md-6 h3{color:#333;}
|
43 |
.col-md-6 h4{color:#666;}
|
44 |
+
.corpo_moip.grid12-5 {
|
45 |
+
width: 44%;
|
46 |
+
float: left;
|
47 |
+
min-width: 250px;
|
48 |
+
}
|
49 |
|
50 |
.method-type{width: auto;clear:both;float:lefT;}
|
51 |
.method-type h3{font-size:12pt;margin-bottom:7px;}
|
skin/frontend/default/default/O2TI/moip/css/formulario_horizontal.css
CHANGED
@@ -9,7 +9,7 @@ ul.form-list .wide.cc-validade > div > select#credito_expiracao_mes{margin: 0 !i
|
|
9 |
ul.form-list.dados-titular > li > label{clear: none !important; width: 105px;float: left !important;padding-top: 5px;}
|
10 |
ul.form-list.dados-titular > li > div{ width: 50% !important;clear: none !important; float: left;}
|
11 |
|
12 |
-
ul.inline{display: block;clear:both;}
|
13 |
ul.inline li{float: left;width: 100%;margin-right: 2%; text-align: center;}
|
14 |
ul.inline li img{width: 25%; height: auto;float: left; display: block; margin-bottom: 5px;}
|
15 |
ul.inline li.moip-payment-method-line img{margin-left: 10px;}
|
@@ -25,7 +25,7 @@ ul.inline.input-switcher-5 > li img{width: 100%;float: none;}
|
|
25 |
.tooltip-moip{display: none;position: absolute; right: 0px;top: 100%;background: #cccccc;padding: 20px;border-radius: 10px;min-width: 245px;box-shadow: 0 0 10px #000;z-index:999;}
|
26 |
.tooltip-moip-handler:hover .tooltip-moip{display: block;}
|
27 |
.span3.method-image > img {float: right;width: 100%;}
|
28 |
-
#checkouto2ti > div {margin-right: 10px;}
|
29 |
.chamada {float: left; font-weight: bold;}
|
30 |
.method-price-title {float: right;}
|
31 |
.resume {float: left;}
|
9 |
ul.form-list.dados-titular > li > label{clear: none !important; width: 105px;float: left !important;padding-top: 5px;}
|
10 |
ul.form-list.dados-titular > li > div{ width: 50% !important;clear: none !important; float: left;}
|
11 |
|
12 |
+
ul.inline{display: block;clear:both;max-width: 300px;}
|
13 |
ul.inline li{float: left;width: 100%;margin-right: 2%; text-align: center;}
|
14 |
ul.inline li img{width: 25%; height: auto;float: left; display: block; margin-bottom: 5px;}
|
15 |
ul.inline li.moip-payment-method-line img{margin-left: 10px;}
|
25 |
.tooltip-moip{display: none;position: absolute; right: 0px;top: 100%;background: #cccccc;padding: 20px;border-radius: 10px;min-width: 245px;box-shadow: 0 0 10px #000;z-index:999;}
|
26 |
.tooltip-moip-handler:hover .tooltip-moip{display: block;}
|
27 |
.span3.method-image > img {float: right;width: 100%;}
|
28 |
+
#checkouto2ti > div {margin-right: 10px;clear: both;}
|
29 |
.chamada {float: left; font-weight: bold;}
|
30 |
.method-price-title {float: right;}
|
31 |
.resume {float: left;}
|