o2ti_moip - Version 2.0.3

Version Notes

Melhorias para
UX, Webhooks, Sucess

Download this release

Release Info

Developer MOIP
Extension o2ti_moip
Version 2.0.3
Comparing to
See all releases


Code changes from version 2.0.2 to 2.0.3

Files changed (24) hide show
  1. app/code/local/MOIP/Transparente/Block/Adminhtml/System/Config/Form/Fieldset/Modules/Oauth.php +165 -87
  2. app/code/local/MOIP/Transparente/Block/Form/Cc.php +13 -9
  3. app/code/local/MOIP/Transparente/Block/Info/Boleto.php +5 -2
  4. app/code/local/MOIP/Transparente/Block/Info/Cc.php +4 -2
  5. app/code/local/MOIP/Transparente/Block/Info/Tef.php +24 -1
  6. app/code/local/MOIP/Transparente/Block/Standard/Method/Boleto.php +32 -0
  7. app/code/local/MOIP/Transparente/Block/Standard/Method/Cc.php +25 -0
  8. app/code/local/MOIP/Transparente/Block/Standard/Method/Tef.php +32 -0
  9. app/code/local/MOIP/Transparente/Block/Standard/Moip.php +64 -111
  10. app/code/local/MOIP/Transparente/Model/Api.php +4 -4
  11. app/code/local/MOIP/Transparente/Model/Method/Boleto.php +16 -1
  12. app/code/local/MOIP/Transparente/Model/Method/Tef.php +16 -0
  13. app/code/local/MOIP/Transparente/Model/Observer.php +127 -115
  14. app/code/local/MOIP/Transparente/controllers/StandardController.php +180 -403
  15. app/code/local/MOIP/Transparente/etc/system.xml +38 -19
  16. app/design/frontend/base/default/layout/moip_transparente.xml +3 -3
  17. app/design/frontend/base/default/template/MOIP/onestepcheckout/cadastro/billing/billingform.phtml +4 -4
  18. app/design/frontend/base/default/template/MOIP/onestepcheckout/daskboard/onepage/billing/billingform.phtml +3 -3
  19. app/design/frontend/base/default/template/MOIP/transparente/form/cc.phtml +25 -14
  20. app/design/frontend/base/default/template/MOIP/transparente/info/boleto.phtml +10 -1
  21. app/design/frontend/base/default/template/MOIP/transparente/info/tef.phtml +5 -1
  22. package.xml +7 -6
  23. skin/adminhtml/default/default/MOIP/transparente/css/moip.css +23 -0
  24. skin/frontend/base/default/MOIP/transparente/css/form.css +8 -0
app/code/local/MOIP/Transparente/Block/Adminhtml/System/Config/Form/Fieldset/Modules/Oauth.php CHANGED
@@ -1,107 +1,185 @@
1
  <?php
2
 
3
- class MOIP_Transparente_Block_Adminhtml_System_Config_Form_Fieldset_Modules_Oauth extends Mage_Adminhtml_Block_System_Config_Form_Fieldset {
4
-
5
- /**
6
- * Return header html for fieldset
7
- *
8
- * @param Varien_Data_Form_Element_Abstract $element
9
- * @return string
10
- */
11
- protected function _getHeaderHtml($element)
 
 
 
12
  {
13
- $validacao = Mage::getSingleton('transparente/standard')->getConfigData('validador_retorno');
14
-
15
- $code = Mage::getSingleton('adminhtml/config_data')->getStore();
16
-
17
-
18
- if (strlen($code = Mage::getSingleton('adminhtml/config_data')->getStore()))
19
- {
20
- $store_id = Mage::getModel('core/store')->load($code)->getId();
21
- } elseif (strlen($code = Mage::getSingleton('adminhtml/config_data')->getWebsite())) {
22
- $website_id = Mage::getModel('core/website')->load($code)->getId();
23
- $store_id = Mage::app()->getWebsite($website_id)->getDefaultStore()->getId();
24
- } else {
25
- $store_id = Mage::app()->getWebsite($website_id)->getDefaultStore()->getId();
26
- }
27
- if($code == ""){
28
- $code = "default";
29
- }
30
-
31
- $redirectUri = Mage::getUrl('Transparente/standard/Oauth/'.'validacao/'.$validacao.'/store_scope/'.$code.'/store_id/'.$store_id); // Esse é um controle para get da autorização...
32
- $redirectUri = urlencode($redirectUri);
33
- $redirectUri = "http://moip.o2ti.com/magento/redirect/?client_id=".$redirectUri; //Aqui voce pode construir sua url URI no entanto precisa estar exatamente como indicado no app construido...
34
- $responseType = "CODE";
35
- $scope = "CREATE_ORDERS|VIEW_ORDERS|CREATE_PAYMENTS|VIEW_PAYMENTS";
36
- $webhooks_url = Mage::getUrl('Transparente/standard/EnableWebhooks/validacao/'.$validacao.'/');
37
- if (Mage::getSingleton('transparente/standard')->getConfigData('ambiente') == "teste") {
38
-
39
- $app_id_moip_dev = "APP-9MUFQ39Y4CQU"; //Alterar aqui caso necessário.
40
-
41
- $endpoint_moip = "https://sandbox.moip.com.br/oauth/authorize";
42
- $set_url_btn = $endpoint_moip.'?responseType='.$responseType.'&appId='.$app_id_moip_dev.'&redirectUri='.$redirectUri.'&scope='.$scope;
43
- $oauth = Mage::getSingleton('transparente/standard')->getConfigData('oauth_dev');
44
- $webhooks_return = Mage::getSingleton('transparente/standard')->getConfigData('webhook_key_dev');
45
-
46
- if(!is_null($oauth) || isset($oauth)) {
47
-
48
 
49
- $text_logar_se .= "<h2>Sua loja está autorizada a realizar vendas no ambiente:</h2> <p> Teste - Não processa compras reais.</p><hr/>";
50
- if(!$webhooks_return || is_null($webhooks_return)){
51
- $text_logar_se .= "<h2>Para configurar o retorno da transação acesse:</h2> <p> <a href='{$webhooks_url}''>Clique aqui</a> para configurar o retorno de status da transação </p>";
 
 
 
 
 
 
 
 
 
52
  } else {
53
- $text_logar_se .= "Registro do MOIP: ".$webhooks_return;
54
  }
55
-
56
 
57
-
58
- } else {
59
-
60
- $set_url_btn = $endpoint_moip.'?responseType='.$responseType.'&appId='.$app_id_moip_dev.'&redirectUri='.$redirectUri.'&scope='.$scope;
61
- $criar_conta = 'Para criar uma conta de teste acesse <a href="https://labs.moip.com.br/login/">clique aqui</a>';
62
- $btn = '<p><a href="'.$set_url_btn.'"><img src="' . $this->getSkinUrl('MOIP/transparente/imagem/btn-login-moip.png') . '" alt="Botão Login Moip" /></a></p><p>'.$criar_conta.'</p>';
63
- $text_logar_se .= "<p>2º - Passo - Para Realizar Transações no ambiente de Sandbox (ambiente para testes), por favor autorize o aplicativo:</p>".$btn;
64
-
65
 
66
- }
67
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
68
 
69
- } else {
 
 
70
 
71
- $app_id_moip_prod = "APP-AKYBMMVU1FL1";
72
- $endpoint_moip = "https://api.moip.com.br/oauth/authorize";
73
- $oauth = Mage::getSingleton('transparente/standard')->getConfigData('oauth_prod');
74
- $webhooks_return = Mage::getSingleton('transparente/standard')->getConfigData('webhook_key_prod');
 
 
 
 
75
 
76
- if(!is_null($oauth) || isset($oauth)) {
77
-
78
- $text_logar_se = "<h2>Sua loja está autorizada a para realizar vendas no ambiente:</h2> <p>Produção</p><hr/>";
79
- if(!$webhooks_return || is_null($webhooks_return)){
80
- $text_logar_se .= "<h2>Para configurar o retorno da transação acesse:</h2> <p> <a href='{$webhooks_url}''>Clique aqui</a> para configurar o retorno de status da transação </p>";
81
- } else {
82
- $text_logar_se .= "Registro do MOIP: ".$webhooks_return;
83
- }
 
 
84
 
85
- } else {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
86
 
87
- $set_url_btn = $endpoint_moip.'?responseType='.$responseType.'&appId='.$app_id_moip_prod.'&redirectUri='.$redirectUri.'&scope='.$scope;
88
- $criar_conta = 'Para criar uma conta no Moip acesse <a href="https://www.moip.com.br/login/">clique aqui</a>';
89
- $btn = '<p><a href="'.$set_url_btn.'"><img src="' . $this->getSkinUrl('MOIP/transparente/imagem/btn-login-moip.png') . '" alt="Botão Login Moip" /></a></p><p>'.$criar_conta.'</p>';
90
- $text_logar_se = "<h2>Para Realizar Transações no ambiente de Desenvolvimento (ambiente para produção, compras reais), por favor autorize o aplicativo:</h2>".$btn;
91
-
 
 
 
 
 
 
 
 
 
 
92
 
93
- }
94
- }
 
95
 
 
 
 
 
96
 
97
- if($validacao){
98
- $info_config = $text_logar_se;
99
- }else {
100
- $info_config = '<h2>Vamos Configurar a sua conta?</h2><p>1º - Passo - Insira no campo a baixo "Validação de comunicação" para continuar a sua instalação e clique em Salvar Configuração.</p>';
101
- }
102
- $html = parent::_getHeaderHtml($element);
103
- $html = $html.$info_config;
104
- return $html;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
105
  }
106
  }
107
  ?>
1
  <?php
2
 
3
+ class MOIP_Transparente_Block_Adminhtml_System_Config_Form_Fieldset_Modules_Oauth
4
+ extends Mage_Adminhtml_Block_Abstract implements Varien_Data_Form_Element_Renderer_Interface
5
+ {
6
+
7
+ const EndPointProd = "https://api.moip.com.br/oauth/authorize";
8
+ const EndPointDev = "https://sandbox.moip.com.br/oauth/authorize";
9
+ const AppIdDev = "APP-9MUFQ39Y4CQU";
10
+ const AppIdProd = "APP-AKYBMMVU1FL1";
11
+ const SCOPE_APP = "CREATE_ORDERS|VIEW_ORDERS|CREATE_PAYMENTS|VIEW_PAYMENTS";
12
+ const responseType = "CODE";
13
+
14
+ public function render(Varien_Data_Form_Element_Abstract $element)
15
  {
16
+ return sprintf(
17
+ '<tr class="system-fieldset-sub-head" id="row_%s">
18
+ <td colspan="5">
19
+ <h4 id="%s">%s</h4>
20
+ <p class="subheading-note" style="font-size:11px;font-style:italic;color:#666; margin-bottom:30px;"><span>%s</span></p>
21
+ <div class="action-moip">%s</div>
22
+ </td>
23
+ </tr>',
24
+ $element->getHtmlId(), $element->getHtmlId(), $this->getTitleSetup(), $this->getTextAmbiente(), $this->getActionSetup()
25
+ );
26
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
27
 
28
+ public function getTitleSetup(){
29
+ $validacao = Mage::getSingleton('transparente/standard')->getConfigData('validador_retorno');
30
+ if(!$validacao){
31
+ $title = "1º Passo";
32
+ } else {
33
+ $oauth = $this->getIfOauth();
34
+ $webhooks = $this->getifWebHooks();
35
+ if(!$oauth) {
36
+ $title = "2º Passo - Autorizar sua Loja a Realizar vendas";
37
+ } else {
38
+ if($webhooks){
39
+ $title = "Configuração concluídas com sucesso";
40
  } else {
41
+ $title = " Habilitar Retorno da transação";
42
  }
43
+ }
44
 
45
+ }
46
+ return $title;
47
+ }
 
 
 
 
 
48
 
49
+ public function getIfOauth(){
50
 
51
+ if($this->getAmbiente() == "teste"){
52
+ $oauth = Mage::getSingleton('transparente/standard')->getConfigData('oauth_dev');
53
+ } else {
54
+ $oauth = Mage::getSingleton('transparente/standard')->getConfigData('oauth_prod');
55
+ }
56
+ return $oauth;
57
+
58
+ }
59
+
60
+ public function getifWebHooks(){
61
+ if($this->getAmbiente() == "teste"){
62
+
63
+ $webhooks = Mage::getSingleton('transparente/standard')->getConfigData('webhook_key_dev');
64
+ } else {
65
+ $webhooks = Mage::getSingleton('transparente/standard')->getConfigData('webhook_key_prod');
66
+ }
67
+ return $webhooks;
68
+ }
69
 
70
+ public function getAmbiente(){
71
+ return Mage::getSingleton('transparente/standard')->getConfigData('ambiente');
72
+ }
73
 
74
+ public function getTextAmbiente(){
75
+ if(Mage::getSingleton('transparente/standard')->getConfigData('ambiente') == "teste"){
76
+ $texto = "O ambiente escolhido é de <b>Teste (Sandbox Moip)</b> - O Moip não irá comunicar as vendas a operadora de cartão, essa versão é apenas para testes.";
77
+ } else {
78
+ $texto = "O ambiente escolhido é de <b>Produção</b> - Suas vendas serão processadas normalmente.";
79
+ }
80
+ return $texto;
81
+ }
82
 
83
+ public function getUrlClearMoip(){
84
+ $validacao = Mage::getSingleton('transparente/standard')->getConfigData('validador_retorno');
85
+ $url_frontend = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB, array(
86
+ '_nosid' => true,
87
+ 'store_scope' => 'default',
88
+ '_secure' => true,
89
+ '_type' => 'direct_link'
90
+ ));
91
+ return $url_frontend.'Transparente/standard/ClearMoip/validacao/'.$validacao.'/';
92
+ }
93
 
94
+ public function getUrlOuathMoip(){
95
+ $validacao = Mage::getSingleton('transparente/standard')->getConfigData('validador_retorno');
96
+ $url_frontend = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB, array(
97
+ '_nosid' => true,
98
+ 'store_scope' => 'default',
99
+ '_secure' => true,
100
+ '_type' => 'direct_link'
101
+ ));
102
+ return $url_frontend.'Transparente/standard/Oauth/validacao/'.$validacao.'/';
103
+ }
104
+ public function getUrlEnableWebhooks(){
105
+ $validacao = Mage::getSingleton('transparente/standard')->getConfigData('validador_retorno');
106
+ $url_frontend = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB, array(
107
+ '_nosid' => true,
108
+ 'store_scope' => 'default',
109
+ '_secure' => true,
110
+ '_type' => 'direct_link'
111
+ ));
112
+ return $url_frontend.'Transparente/standard/EnableWebhooks/validacao/'.$validacao.'/';
113
+ }
114
+ public function getRedirectUri(){
115
+ $redirectUri = $this->getUrlOuathMoip();
116
+ $redirectUri = urlencode($redirectUri);
117
+ $redirectUri = "http://moip.o2ti.com/magento/redirect/?client_id=".$redirectUri; //Aqui voce pode construir sua url URI no entanto precisa estar exatamente como indicado no app construido...
118
+ return $redirectUri;
119
+ }
120
 
121
+ public function getLinkMoipApp(){
122
+
123
+ if(Mage::getSingleton('transparente/standard')->getConfigData('ambiente') == "teste"){
124
+ $endpoint = self::EndPointDev;
125
+ $responseType = self::responseType;
126
+ $appId = self::AppIdDev;
127
+ $scope = self::SCOPE_APP;
128
+ $redirectUri = $this->getRedirectUri();
129
+ } else {
130
+ $endpoint = self::EndPointProd;
131
+ $responseType = self::responseType;
132
+ $appId = self::AppIdProd;
133
+ $scope = self::SCOPE_APP;
134
+ $redirectUri = $this->getRedirectUri();
135
+ }
136
 
137
+ $link = $endpoint.'?responseType='.$responseType.'&appId='.$appId.'&redirectUri='.$redirectUri.'&scope='.$scope;
138
+ return $link;
139
+ }
140
 
141
+ public function getSrcBtnMoipOauth(){
142
+ $src = $this->getSkinUrl('MOIP/transparente/imagem/btn-login-moip.png');
143
+ return $src;
144
+ }
145
 
146
+ public function getActionSetup(){
147
+ $validacao = Mage::getSingleton('transparente/standard')->getConfigData('validador_retorno');
148
+ $oauth = $this->getIfOauth();
149
+ $webhooks = $this->getifWebHooks();
150
+ if($validacao){
151
+ if($oauth){
152
+ if($webhooks){
153
+ $texto = "Apagar configuração de permissão do módulo.";
154
+ $acao = "Apagar Configuração Atuais";
155
+ $class_btn = 'danger';
156
+ $comentario = "Esse processo permite trocar a conta que receberá o pagamento, mas atenção, ele é IREVERSÌVEL. Para prosseguir clique no link:";
157
+ $link = $this->getUrlClearMoip();
158
+ } else {
159
+ $texto = "Configurar o Retorno de Transação do Moip para o seu Magento";
160
+ $acao = "Configurar retorno";
161
+ $class_btn = '';
162
+ $comentario = "Esse processo permite receber a notificação de pedido pago ou cancelado. Para prosseguir clique no link:";
163
+ $link = $this->getUrlEnableWebhooks();
164
+ }
165
+ } else {
166
+ $texto = "Criar permissão para o Moip realizar vendas em seu Magento";
167
+ $acao = "Autorizar Moip";
168
+ $class_btn = '';
169
+ $comentario = "Esse processo permite passar a receber transações com sua conta Moip. Para prosseguir Clique no link:";
170
+ $link = $this->getLinkMoipApp();
171
+ }
172
+ } else {
173
+ $texto = "Configuração inicial do Módulo";
174
+ $acao = "Precisa de Ajuda?";
175
+ $class_btn = 'help';
176
+ $comentario = "Escolha a sua chave de notificação";
177
+ $link = 'https://www.youtube.com/watch?v=5e5j407VLGI';
178
+ }
179
+ $action_setup = "<h4>{$texto}</h4>";
180
+ $action_setup .= "<p class='subheading-note' style='font-size:11px;font-style:italic;color:#666;'>{$comentario}</p>";
181
+ $action_setup .= "<p class='p-actin-moip'><a href='{$link}' class='btn-moip {$class_btn}'>{$acao}</a></p>";
182
+ return $action_setup;
183
  }
184
  }
185
  ?>
app/code/local/MOIP/Transparente/Block/Form/Cc.php CHANGED
@@ -17,14 +17,13 @@ class MOIP_Transparente_Block_Form_Cc extends Mage_Payment_Block_Form {
17
  parent::_construct();
18
  }
19
 
20
-
21
 
22
  public function getPublicKey(){
23
- if (Mage::getSingleton('transparente/standard')->getConfigData('ambiente') == "teste") {
24
- return Mage::getSingleton('transparente/standard')->getConfigData('publickey_dev');
25
- } else {
26
- return Mage::getSingleton('transparente/standard')->getConfigData('publickey_prod');
27
- }
28
  }
29
 
30
 
@@ -73,8 +72,8 @@ class MOIP_Transparente_Block_Form_Cc extends Mage_Payment_Block_Form {
73
 
74
 
75
  return $parcelas;
76
-
77
  }
 
78
  public function getVisaImage() {
79
  if (Mage::getStoreConfig('moipall/config/trocar_bandeira_cartao')) {
80
  return Mage::getBaseUrl('media') . "moip/alltransparente/". Mage::getStoreConfig('moipall/config/cartao_visa');
@@ -82,6 +81,7 @@ class MOIP_Transparente_Block_Form_Cc extends Mage_Payment_Block_Form {
82
  return $this->getSkinUrl('MOIP/transparente/imagem/Visa.png');
83
  }
84
  }
 
85
  public function getMastercardImage() {
86
  if (Mage::getStoreConfig('moipall/config/trocar_bandeira_cartao')) {
87
  return Mage::getBaseUrl('media') . "moip/alltransparente/". Mage::getStoreConfig('moipall/config/cartao_master');
@@ -89,6 +89,7 @@ class MOIP_Transparente_Block_Form_Cc extends Mage_Payment_Block_Form {
89
  return $this->getSkinUrl('MOIP/transparente/imagem/Mastercard.png');
90
  }
91
  }
 
92
  public function getDinersImage() {
93
  if (Mage::getStoreConfig('moipall/config/trocar_bandeira_cartao')) {
94
  return Mage::getBaseUrl('media') . "moip/alltransparente/". Mage::getStoreConfig('moipall/config/cartao_diners');
@@ -96,6 +97,7 @@ class MOIP_Transparente_Block_Form_Cc extends Mage_Payment_Block_Form {
96
  return $this->getSkinUrl('MOIP/transparente/imagem/Diners.png');
97
  }
98
  }
 
99
  public function getAmericanExpressImage() {
100
  if (Mage::getStoreConfig('moipall/config/trocar_bandeira_cartao')) {
101
  return Mage::getBaseUrl('media') . "moip/alltransparente/". Mage::getStoreConfig('moipall/config/cartao_american');
@@ -103,6 +105,7 @@ class MOIP_Transparente_Block_Form_Cc extends Mage_Payment_Block_Form {
103
  return $this->getSkinUrl('MOIP/transparente/imagem/AmericanExpress.png');
104
  }
105
  }
 
106
  public function getHipercardImage() {
107
  if (Mage::getStoreConfig('moipall/config/trocar_bandeira_cartao')) {
108
  return Mage::getBaseUrl('media') . "moip/alltransparente/". Mage::getStoreConfig('moipall/config/cartao_hipercard');
@@ -147,6 +150,7 @@ class MOIP_Transparente_Block_Form_Cc extends Mage_Payment_Block_Form {
147
  }
148
  return $image_brand;
149
  }
 
150
  public function getCofre() {
151
  if (Mage::getSingleton('customer/session')->isLoggedIn()) {
152
  $data_array = array();
@@ -201,7 +205,6 @@ class MOIP_Transparente_Block_Form_Cc extends Mage_Payment_Block_Form {
201
  }
202
 
203
  public function getNumberOrDDD($param_telefone, $param_ddd = false) {
204
-
205
  $cust_ddd = '11';
206
  $cust_telephone = preg_replace("/[^0-9]/", "", $param_telefone);
207
  $st = strlen($cust_telephone) - 8;
@@ -217,7 +220,8 @@ class MOIP_Transparente_Block_Form_Cc extends Mage_Payment_Block_Form {
217
  }
218
 
219
  return $retorno;
220
- }
 
221
  public function getCheckout() {
222
  return Mage::getSingleton('checkout/session');
223
  }
17
  parent::_construct();
18
  }
19
 
 
20
 
21
  public function getPublicKey(){
22
+ if (Mage::getSingleton('transparente/standard')->getConfigData('ambiente') == "teste") {
23
+ return Mage::getSingleton('transparente/standard')->getConfigData('publickey_dev');
24
+ } else {
25
+ return Mage::getSingleton('transparente/standard')->getConfigData('publickey_prod');
26
+ }
27
  }
28
 
29
 
72
 
73
 
74
  return $parcelas;
 
75
  }
76
+
77
  public function getVisaImage() {
78
  if (Mage::getStoreConfig('moipall/config/trocar_bandeira_cartao')) {
79
  return Mage::getBaseUrl('media') . "moip/alltransparente/". Mage::getStoreConfig('moipall/config/cartao_visa');
81
  return $this->getSkinUrl('MOIP/transparente/imagem/Visa.png');
82
  }
83
  }
84
+
85
  public function getMastercardImage() {
86
  if (Mage::getStoreConfig('moipall/config/trocar_bandeira_cartao')) {
87
  return Mage::getBaseUrl('media') . "moip/alltransparente/". Mage::getStoreConfig('moipall/config/cartao_master');
89
  return $this->getSkinUrl('MOIP/transparente/imagem/Mastercard.png');
90
  }
91
  }
92
+
93
  public function getDinersImage() {
94
  if (Mage::getStoreConfig('moipall/config/trocar_bandeira_cartao')) {
95
  return Mage::getBaseUrl('media') . "moip/alltransparente/". Mage::getStoreConfig('moipall/config/cartao_diners');
97
  return $this->getSkinUrl('MOIP/transparente/imagem/Diners.png');
98
  }
99
  }
100
+
101
  public function getAmericanExpressImage() {
102
  if (Mage::getStoreConfig('moipall/config/trocar_bandeira_cartao')) {
103
  return Mage::getBaseUrl('media') . "moip/alltransparente/". Mage::getStoreConfig('moipall/config/cartao_american');
105
  return $this->getSkinUrl('MOIP/transparente/imagem/AmericanExpress.png');
106
  }
107
  }
108
+
109
  public function getHipercardImage() {
110
  if (Mage::getStoreConfig('moipall/config/trocar_bandeira_cartao')) {
111
  return Mage::getBaseUrl('media') . "moip/alltransparente/". Mage::getStoreConfig('moipall/config/cartao_hipercard');
150
  }
151
  return $image_brand;
152
  }
153
+
154
  public function getCofre() {
155
  if (Mage::getSingleton('customer/session')->isLoggedIn()) {
156
  $data_array = array();
205
  }
206
 
207
  public function getNumberOrDDD($param_telefone, $param_ddd = false) {
 
208
  $cust_ddd = '11';
209
  $cust_telephone = preg_replace("/[^0-9]/", "", $param_telefone);
210
  $st = strlen($cust_telephone) - 8;
220
  }
221
 
222
  return $retorno;
223
+ }
224
+
225
  public function getCheckout() {
226
  return Mage::getSingleton('checkout/session');
227
  }
app/code/local/MOIP/Transparente/Block/Info/Boleto.php CHANGED
@@ -11,8 +11,7 @@ class MOIP_Transparente_Block_Info_Boleto extends Mage_Payment_Block_Info
11
  protected function _prepareInfo()
12
  {
13
 
14
-
15
- $order = $this->getInfo()->getOrder();
16
 
17
  $customer_order = Mage::getModel('customer/customer')->load($order->getCustomerId());
18
  $order = $order->getId();
@@ -21,6 +20,10 @@ class MOIP_Transparente_Block_Info_Boleto extends Mage_Payment_Block_Info
21
  $result = $model->load($order, 'mage_pay')->getData();
22
 
23
  return $result;
 
 
 
 
24
  }
25
  public function getMethodInstance()
26
  {
11
  protected function _prepareInfo()
12
  {
13
 
14
+ if($order = $this->getInfo()->getOrder()){
 
15
 
16
  $customer_order = Mage::getModel('customer/customer')->load($order->getCustomerId());
17
  $order = $order->getId();
20
  $result = $model->load($order, 'mage_pay')->getData();
21
 
22
  return $result;
23
+ } else {
24
+ return;
25
+ }
26
+
27
  }
28
  public function getMethodInstance()
29
  {
app/code/local/MOIP/Transparente/Block/Info/Cc.php CHANGED
@@ -9,8 +9,7 @@ class MOIP_Transparente_Block_Info_Cc extends Mage_Payment_Block_Info
9
  protected function _prepareInfo()
10
  {
11
 
12
-
13
- $order = $this->getInfo()->getOrder();
14
 
15
  $customer_order = Mage::getModel('customer/customer')->load($order->getCustomerId());
16
  $order = $order->getId();
@@ -19,6 +18,9 @@ class MOIP_Transparente_Block_Info_Cc extends Mage_Payment_Block_Info
19
  $result = $model->load($order, 'mage_pay')->getData();
20
 
21
  return $result;
 
 
 
22
  }
23
 
24
  /**
9
  protected function _prepareInfo()
10
  {
11
 
12
+ if($order = $this->getInfo()->getOrder()){
 
13
 
14
  $customer_order = Mage::getModel('customer/customer')->load($order->getCustomerId());
15
  $order = $order->getId();
18
  $result = $model->load($order, 'mage_pay')->getData();
19
 
20
  return $result;
21
+ } else {
22
+ return;
23
+ }
24
  }
25
 
26
  /**
app/code/local/MOIP/Transparente/Block/Info/Tef.php CHANGED
@@ -8,7 +8,8 @@ class MOIP_Transparente_Block_Info_Tef extends Mage_Payment_Block_Info
8
  }
9
  protected function _prepareInfo()
10
  {
11
- $order = $this->getInfo()->getOrder();
 
12
 
13
  $customer_order = Mage::getModel('customer/customer')->load($order->getCustomerId());
14
  $order = $order->getId();
@@ -17,5 +18,27 @@ class MOIP_Transparente_Block_Info_Tef extends Mage_Payment_Block_Info
17
  $result = $model->load($order, 'mage_pay')->getData();
18
 
19
  return $result;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
20
  }
 
21
  }
8
  }
9
  protected function _prepareInfo()
10
  {
11
+
12
+ if($order = $this->getInfo()->getOrder()){
13
 
14
  $customer_order = Mage::getModel('customer/customer')->load($order->getCustomerId());
15
  $order = $order->getId();
18
  $result = $model->load($order, 'mage_pay')->getData();
19
 
20
  return $result;
21
+ } else {
22
+ return;
23
+ }
24
+
25
+ }
26
+
27
+ public function getMethodInstance()
28
+ {
29
+ if (!$this->hasMethodInstance()) {
30
+ if ($this->getMethod()) {
31
+ $instance = Mage::helper('payment')->getMethodInstance($this->getMethod());
32
+ if ($instance) {
33
+ $instance->setInfoInstance($this);
34
+ $this->setMethodInstance($instance);
35
+ return $instance;
36
+ }
37
+ }
38
+ Mage::throwException(Mage::helper('payment')->__('The requested Payment Method is not available.'));
39
+ }
40
+
41
+ return $this->_getData('method_instance');
42
  }
43
+
44
  }
app/code/local/MOIP/Transparente/Block/Standard/Method/Boleto.php ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class MOIP_Transparente_Block_Standard_Method_Boleto extends Mage_Checkout_Block_Onepage_Success
3
+ {
4
+
5
+ public function getMoipPayment()
6
+ {
7
+ return $this->getCheckout()->getMoipData();
8
+ }
9
+ public function getBoletoLinks()
10
+ {
11
+ $pgto = $this->getMoipPayment();
12
+ $responseMoipJson = $pgto['response_moip'];
13
+ return $responseMoipJson->_links->payBoleto->redirectHref;
14
+ }
15
+ public function getBoletoCode()
16
+ {
17
+ $pgto = $this->getMoipPayment();
18
+ $responseMoipJson = $pgto['response_moip'];
19
+ return $responseMoipJson->fundingInstrument->boleto->lineCode;
20
+ }
21
+
22
+ public function getLinkReorder()
23
+ {
24
+ $order = $this->getOrder();
25
+ return $order->getId();
26
+ }
27
+ protected function getCheckout()
28
+ {
29
+ return Mage::getSingleton('checkout/session');
30
+ }
31
+
32
+ }
app/code/local/MOIP/Transparente/Block/Standard/Method/Cc.php ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class MOIP_Transparente_Block_Standard_Method_Cc extends Mage_Checkout_Block_Onepage_Success
3
+ {
4
+
5
+ public function getMoipPayment()
6
+ {
7
+ return $this->getCheckout()->getMoipData();
8
+ }
9
+ public function getCardStatus()
10
+ {
11
+ $pgto = $this->getMoipPayment();
12
+ $responseMoipJson = $pgto['response_moip'];
13
+ return $responseMoipJson->status;
14
+ }
15
+
16
+ public function getLinkReorder()
17
+ {
18
+ $order = $this->getOrder();
19
+ return $order->getId();
20
+ }
21
+ protected function getCheckout()
22
+ {
23
+ return Mage::getSingleton('checkout/session');
24
+ }
25
+ }
app/code/local/MOIP/Transparente/Block/Standard/Method/Tef.php ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ class MOIP_Transparente_Block_Standard_Method_Tef extends Mage_Checkout_Block_Onepage_Success
3
+ {
4
+
5
+ public function getMoipPayment()
6
+ {
7
+ return $this->getCheckout()->getMoipData();
8
+ }
9
+ public function getDebitLinks()
10
+ {
11
+ $pgto = $this->getMoipPayment();
12
+ $responseMoipJson = $pgto['response_moip'];
13
+ if ($pgto['banknumber_moip'] == '001') {
14
+ return $responseMoipJson->_links->payOnlineBankDebitBB->redirectHref;
15
+ } elseif ($pgto['banknumber_moip'] == '237') {
16
+ return $responseMoipJson->_links->payOnlineBankDebitBradesco->redirectHref;
17
+ } elseif ($pgto['banknumber_moip'] == '341') {
18
+ return $responseMoipJson->_links->payOnlineBankDebitItau->redirectHref;
19
+ } else {
20
+ return $responseMoipJson->_links->payOnlineBankDebitBanrisul->redirectHref;
21
+ }
22
+ }
23
+ public function getLinkReorder()
24
+ {
25
+ $order = $this->getOrder();
26
+ return $order->getId();
27
+ }
28
+ protected function getCheckout()
29
+ {
30
+ return Mage::getSingleton('checkout/session');
31
+ }
32
+ }
app/code/local/MOIP/Transparente/Block/Standard/Moip.php CHANGED
@@ -12,77 +12,69 @@ class MOIP_Transparente_Block_Standard_Moip extends Mage_Checkout_Block_Onepage_
12
  public function getSaveDate()
13
  {
14
  $order = $this->getOrder();
15
- $pgto = $this->getMoipPayment();
16
- $responseMoipJson = $pgto['response_moip'];
17
- $responseMoip = $pgto['response_moip'];
18
- $forma_pagamento = $order->getPayment()->getMethodInstance()->getCode();
19
- $orderIdMoip = $pgto['order_moip'];
20
- $mage_pay = $order->getId();
21
- $model_del = Mage::getModel('transparente/write');
22
- $model_del->load($mage_pay, 'mage_pay');
23
- if ($model_del->getMoipPay()) {
24
- $url = "sales/order/view/order_id/" . $mage_pay;
25
- return;
26
- }
27
- $email = $order->getBillingAddress()->getEmail();
28
- $customerId = $order->getCustomerId();
29
- $fees = $responseMoip->amount->fees;
30
- $moipidPay = $responseMoip->id;
31
- if ($forma_pagamento == "moip_boleto") {
32
- $href = $responseMoip->_links->payBoleto->redirectHref;
33
- $moip_boleto_expirationDate = $responseMoip->fundingInstrument->boleto->expirationDate;
34
- $moip_boleto_lineCode = $responseMoip->fundingInstrument->boleto->lineCode;
35
- $state_onhold = $this->initState('order_status_holded_boleto');
36
- $comment = "Aguardando confirmação automática de pagamento.";
37
-
38
- } elseif ($forma_pagamento == "moip_tef") {
39
- $href = $responseMoip->_links->payOnlineBankDebitBB->redirectHref;
40
- $moip_transf_expirationDate = $responseMoip->fundingInstrument->onlineBankDebit->expirationDate;
41
- $moip_transf_bankName = $responseMoip->fundingInstrument->onlineBankDebit->bankName;
42
- $state_onhold = $this->initState('order_status_holded_tef');
43
- $comment = "Aguardando confirmação automática de pagamento.";
44
- } elseif ($forma_pagamento == "moip_cc") {
45
- $status = $responseMoip->status;
46
- $moip_card_installmentCount = $responseMoip->installmentCount;
47
- $moip_card_brand = $responseMoip->fundingInstrument->creditCard->brand;
48
- if($pgto['save_card']){
49
- $moip_card_id = $responseMoip->fundingInstrument->creditCard->id;
50
  } else {
51
- $moip_card_id = null;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
52
  }
53
- $moip_card_first6 = $responseMoip->fundingInstrument->creditCard->first6;
54
- $moip_card_last4 = $responseMoip->fundingInstrument->creditCard->last4;
55
- $moip_card_birthdate = $responseMoip->fundingInstrument->creditCard->holder->birthdate;
56
- $moip_card_taxDocument = $responseMoip->fundingInstrument->creditCard->holder->taxDocument->number;
57
- $moip_card_fullname = $responseMoip->fundingInstrument->creditCard->holder->fullname;
58
- $state_onhold = $this->initState('order_status_holded');
59
- $comment = "Aguardando confirmação automática de pagamento.";
60
- }
61
- $model = Mage::getModel('transparente/write');
62
- if (Mage::getSingleton('transparente/standard')->getConfigData('ambiente') == "teste")
63
- $ambiente = "teste";
64
- else
65
- $ambiente = "producao";
66
- $order_moip = str_replace("ORD-", "", $orderIdMoip);
67
- $model->setMagePay($mage_pay)->setMoipOrder($order_moip)->setCustomerEmail($email)->setCustomerId($customerId)->setFormaPagamento($forma_pagamento)->setMoipAmbiente($ambiente)->setMoipFees($fees)->setMoipPay($moipidPay);
68
- if ($forma_pagamento == "moip_boleto") {
69
- $model->setMoipHrefBoleto($href)->setMoipExpirationBoleto($moip_boleto_expirationDate)->setMoipLinecodeBoleto($moip_boleto_lineCode);
70
- $model->save();
71
- } elseif ($forma_pagamento == "moip_tef") {
72
- $model->setMoipHrefTrans($href)->setMoipBankNameTrans($moip_transf_bankName)->setMoipExpirationTrans($moip_transf_expirationDate);
73
- $model->save();
74
- } elseif ($forma_pagamento == "moip_cc") {
75
- $model->setMoipCardInstallment($moip_card_installmentCount)->setMoipCardBrand($moip_card_brand)->setMoipCardId($moip_card_id)->setMoipCardFirst6($moip_card_first6)->setMoipCardLast4($moip_card_last4)->setMoipCardBirthdate($moip_card_birthdate)->setMoipCardTaxdocument($moip_card_taxDocument)->setMoipCardFullname($moip_card_fullname);
76
  $model->save();
 
 
 
 
 
 
 
77
  }
78
- $order->setState(Mage_Sales_Model_Order::STATE_HOLDED, $state_onhold, $comment, $notified = false, $includeComment = true);
79
- $order->sendNewOrderEmail();
80
- $order->setEmailSent(true);
81
- $order->save();
82
- #$order->sendOrderUpdateEmail(true, $comment);
83
-
84
-
85
- return $this;
86
  }
87
 
88
 
@@ -94,50 +86,7 @@ class MOIP_Transparente_Block_Standard_Moip extends Mage_Checkout_Block_Onepage_
94
  {
95
  return $this->getCheckout()->getMoipData();
96
  }
97
- public function getCardStatus()
98
- {
99
- $pgto = $this->getMoipPayment();
100
- $responseMoipJson = $pgto['response_moip'];
101
- return $responseMoipJson->status;
102
- }
103
-
104
- public function getLinkReorder()
105
- {
106
- $order = $this->getOrder();
107
- return $order->getId();
108
- }
109
-
110
- public function getBoletoLinks()
111
- {
112
- $pgto = $this->getMoipPayment();
113
- $responseMoipJson = $pgto['response_moip'];
114
- return $responseMoipJson->_links->payBoleto->redirectHref;
115
- }
116
- public function getBoletoCode()
117
- {
118
- $pgto = $this->getMoipPayment();
119
- $responseMoipJson = $pgto['response_moip'];
120
- return $responseMoipJson->fundingInstrument->boleto->lineCode;
121
- }
122
- public function getDebitLinks()
123
- {
124
- $pgto = $this->getMoipPayment();
125
- $responseMoipJson = $pgto['response_moip'];
126
- if ($pgto['banknumber_moip'] == '001') {
127
- return $responseMoipJson->_links->payOnlineBankDebitBB->redirectHref;
128
- } elseif ($pgto['banknumber_moip'] == '237') {
129
- return $responseMoipJson->_links->payOnlineBankDebitBradesco->redirectHref;
130
- } elseif ($pgto['banknumber_moip'] == '341') {
131
- return $responseMoipJson->_links->payOnlineBankDebitItau->redirectHref;
132
- } else {
133
- return $responseMoipJson->_links->payOnlineBankDebitBanrisul->redirectHref;
134
- }
135
- }
136
-
137
- public function getDataMoip()
138
- {
139
- return $this->$_MoipData;
140
- }
141
  protected function _expireCart()
142
  {
143
  if (!Mage::getSingleton('checkout/session')->getLastRealOrderId()) {
@@ -145,6 +94,7 @@ class MOIP_Transparente_Block_Standard_Moip extends Mage_Checkout_Block_Onepage_
145
  exit;
146
  }
147
  }
 
148
  public function getUrlAmbiente()
149
  {
150
  if (Mage::getSingleton('transparente/standard')->getConfigData('ambiente') == "teste")
@@ -153,6 +103,7 @@ class MOIP_Transparente_Block_Standard_Moip extends Mage_Checkout_Block_Onepage_
153
  $url = "https://www.moip.com.br/";
154
  return $url;
155
  }
 
156
  public function getOrder()
157
  {
158
  $final = "";
@@ -166,6 +117,7 @@ class MOIP_Transparente_Block_Standard_Moip extends Mage_Checkout_Block_Onepage_
166
  }
167
  return $final;
168
  }
 
169
  public function getChildTemplate()
170
  {
171
  $order = $this->getOrder();
@@ -177,6 +129,7 @@ class MOIP_Transparente_Block_Standard_Moip extends Mage_Checkout_Block_Onepage_
177
  elseif ($info == "moip_cc")
178
  return $this->getChildHtml('transparente.cartao');
179
  }
 
180
  protected function getCheckout()
181
  {
182
  return Mage::getSingleton('checkout/session');
12
  public function getSaveDate()
13
  {
14
  $order = $this->getOrder();
15
+
16
+ if($order){
17
+ $mage_pay = $order->getId();
18
+ $forma_pagamento = $order->getPayment()->getMethodInstance()->getCode();
19
+ if ($forma_pagamento == "moip_boleto" || $forma_pagamento == "moip_tef" || $forma_pagamento == "moip_cc") {
20
+ $pgto = $this->getMoipPayment();
21
+ $responseMoip = $pgto['response_moip'];
22
+ $orderIdMoip = $pgto['order_moip'];
23
+ $email = $order->getBillingAddress()->getEmail();
24
+ $customerId = $order->getCustomerId();
25
+ $fees = $responseMoip->amount->fees;
26
+ $moipidPay = $responseMoip->id;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
27
  } else {
28
+ return;
29
+ }
30
+ if (Mage::getSingleton('transparente/standard')->getConfigData('ambiente') == "teste")
31
+ $ambiente = "teste";
32
+ else
33
+ $ambiente = "producao";
34
+ $model = Mage::getModel('transparente/write');
35
+ $order_moip = str_replace("ORD-", "", $orderIdMoip);
36
+ $model->setMagePay($mage_pay)->setMoipOrder($order_moip)->setCustomerEmail($email)->setCustomerId($customerId)->setFormaPagamento($forma_pagamento)->setMoipAmbiente($ambiente)->setMoipFees($fees)->setMoipPay($moipidPay);
37
+ if ($forma_pagamento == "moip_boleto") {
38
+ $href = $responseMoip->_links->payBoleto->redirectHref;
39
+ $moip_boleto_expirationDate = $responseMoip->fundingInstrument->boleto->expirationDate;
40
+ $moip_boleto_lineCode = $responseMoip->fundingInstrument->boleto->lineCode;
41
+ $state_onhold = $this->initState('order_status_holded_boleto');
42
+ $comment = "Aguardando confirmação automática de pagamento.";
43
+ $model->setMoipHrefBoleto($href)->setMoipExpirationBoleto($moip_boleto_expirationDate)->setMoipLinecodeBoleto($moip_boleto_lineCode);
44
+ } elseif ($forma_pagamento == "moip_tef") {
45
+ $href = $responseMoip->_links->payOnlineBankDebitBB->redirectHref;
46
+ $moip_transf_expirationDate = $responseMoip->fundingInstrument->onlineBankDebit->expirationDate;
47
+ $moip_transf_bankName = $responseMoip->fundingInstrument->onlineBankDebit->bankName;
48
+ $state_onhold = $this->initState('order_status_holded_tef');
49
+ $comment = "Aguardando confirmação automática de pagamento.";
50
+ $model->setMoipHrefTrans($href)->setMoipBankNameTrans($moip_transf_bankName)->setMoipExpirationTrans($moip_transf_expirationDate);
51
+ } elseif ($forma_pagamento == "moip_cc") {
52
+ $moip_card_installmentCount = $responseMoip->installmentCount;
53
+ $moip_card_brand = $responseMoip->fundingInstrument->creditCard->brand;
54
+ if($pgto['save_card']){
55
+ $moip_card_id = $responseMoip->fundingInstrument->creditCard->id;
56
+ } else {
57
+ $moip_card_id = null;
58
+ }
59
+ $moip_card_first6 = $responseMoip->fundingInstrument->creditCard->first6;
60
+ $moip_card_last4 = $responseMoip->fundingInstrument->creditCard->last4;
61
+ $moip_card_birthdate = $responseMoip->fundingInstrument->creditCard->holder->birthdate;
62
+ $moip_card_taxDocument = $responseMoip->fundingInstrument->creditCard->holder->taxDocument->number;
63
+ $moip_card_fullname = $responseMoip->fundingInstrument->creditCard->holder->fullname;
64
+ $state_onhold = $this->initState('order_status_holded');
65
+ $comment = "Aguardando confirmação automática de pagamento.";
66
+ $model->setMoipCardInstallment($moip_card_installmentCount)->setMoipCardBrand($moip_card_brand)->setMoipCardId($moip_card_id)->setMoipCardFirst6($moip_card_first6)->setMoipCardLast4($moip_card_last4)->setMoipCardBirthdate($moip_card_birthdate)->setMoipCardTaxdocument($moip_card_taxDocument)->setMoipCardFullname($moip_card_fullname);
67
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
68
  $model->save();
69
+ $order->sendNewOrderEmail();
70
+ $order->setState(Mage_Sales_Model_Order::STATE_HOLDED, $state_onhold, $comment, $notified = false, $includeComment = true);
71
+ $order->setEmailSent(true);
72
+ $order->save();
73
+
74
+ #$order->sendOrderUpdateEmail(true, $comment);
75
+ return $this;
76
  }
77
+
 
 
 
 
 
 
 
78
  }
79
 
80
 
86
  {
87
  return $this->getCheckout()->getMoipData();
88
  }
89
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
90
  protected function _expireCart()
91
  {
92
  if (!Mage::getSingleton('checkout/session')->getLastRealOrderId()) {
94
  exit;
95
  }
96
  }
97
+
98
  public function getUrlAmbiente()
99
  {
100
  if (Mage::getSingleton('transparente/standard')->getConfigData('ambiente') == "teste")
103
  $url = "https://www.moip.com.br/";
104
  return $url;
105
  }
106
+
107
  public function getOrder()
108
  {
109
  $final = "";
117
  }
118
  return $final;
119
  }
120
+
121
  public function getChildTemplate()
122
  {
123
  $order = $this->getOrder();
129
  elseif ($info == "moip_cc")
130
  return $this->getChildHtml('transparente.cartao');
131
  }
132
+
133
  protected function getCheckout()
134
  {
135
  return Mage::getSingleton('checkout/session');
app/code/local/MOIP/Transparente/Model/Api.php CHANGED
@@ -44,11 +44,11 @@ class MOIP_Transparente_Model_Api
44
  $documento = 'Content-Type: application/json; charset=utf-8';
45
  if (Mage::getSingleton('transparente/standard')->getConfigData('ambiente') == "teste") {
46
  $url = self::ENDPOINT_TEST."orders/{$IdMoip}/payments";
47
- $oauth = Mage::getSingleton('transparente/standard')->getConfigData('oauth_dev');
48
  $header = "Authorization: OAuth " . $oauth;
49
  } else {
50
  $url = self::ENDPOINT_PROD."orders/{$IdMoip}/payments";
51
- $oauth = Mage::getSingleton('transparente/standard')->getConfigData('oauth_prod');
52
  $header = "Authorization: OAuth " . $oauth;
53
  }
54
  $result = array();
@@ -272,11 +272,11 @@ class MOIP_Transparente_Model_Api
272
  $documento = 'Content-Type: application/json; charset=utf-8';
273
  if (Mage::getSingleton('transparente/standard')->getConfigData('ambiente') == "teste") {
274
  $url = self::ENDPOINT_TEST."orders/";
275
- $oauth = Mage::getSingleton('transparente/standard')->getConfigData('oauth_dev');
276
  $header = "Authorization: OAuth " . $oauth;
277
  } else {
278
  $url = self::ENDPOINT_PROD."orders/";
279
- $oauth = Mage::getSingleton('transparente/standard')->getConfigData('oauth_prod');
280
  $header = "Authorization: OAuth " . $oauth;
281
  }
282
  $result = array();
44
  $documento = 'Content-Type: application/json; charset=utf-8';
45
  if (Mage::getSingleton('transparente/standard')->getConfigData('ambiente') == "teste") {
46
  $url = self::ENDPOINT_TEST."orders/{$IdMoip}/payments";
47
+ $oauth = Mage::getStoreConfig('payment/moip_transparente_standard/oauth_dev');
48
  $header = "Authorization: OAuth " . $oauth;
49
  } else {
50
  $url = self::ENDPOINT_PROD."orders/{$IdMoip}/payments";
51
+ $oauth = Mage::getStoreConfig('payment/moip_transparente_standard/oauth_prod');
52
  $header = "Authorization: OAuth " . $oauth;
53
  }
54
  $result = array();
272
  $documento = 'Content-Type: application/json; charset=utf-8';
273
  if (Mage::getSingleton('transparente/standard')->getConfigData('ambiente') == "teste") {
274
  $url = self::ENDPOINT_TEST."orders/";
275
+ $oauth = Mage::getStoreConfig('payment/moip_transparente_standard/oauth_dev');
276
  $header = "Authorization: OAuth " . $oauth;
277
  } else {
278
  $url = self::ENDPOINT_PROD."orders/";
279
+ $oauth = Mage::getStoreConfig('payment/moip_transparente_standard/oauth_prod');
280
  $header = "Authorization: OAuth " . $oauth;
281
  }
282
  $result = array();
app/code/local/MOIP/Transparente/Model/Method/Boleto.php CHANGED
@@ -18,7 +18,22 @@ class MOIP_Transparente_Model_Method_Boleto extends Mage_Payment_Model_Method_Ab
18
  protected $_canSaveCc = false;
19
  protected $_allowCurrencyCode = array('BRL');
20
  protected $_canFetchTransactionInfo = true;
21
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
22
  public function assignData($data)
23
  {
24
  if (!($data instanceof Varien_Object)) {
18
  protected $_canSaveCc = false;
19
  protected $_allowCurrencyCode = array('BRL');
20
  protected $_canFetchTransactionInfo = true;
21
+ public function getPayment()
22
+ {
23
+ return $this->getQuote()->getPayment();
24
+ }
25
+ public function getSession()
26
+ {
27
+ return Mage::getSingleton('transparente/session');
28
+ }
29
+ public function getCheckout()
30
+ {
31
+ return Mage::getSingleton('checkout/session');
32
+ }
33
+ public function getQuote()
34
+ {
35
+ return $this->getCheckout()->getQuote();
36
+ }
37
  public function assignData($data)
38
  {
39
  if (!($data instanceof Varien_Object)) {
app/code/local/MOIP/Transparente/Model/Method/Tef.php CHANGED
@@ -18,6 +18,22 @@ class MOIP_Transparente_Model_Method_Tef extends Mage_Payment_Model_Method_Abstr
18
  protected $_canSaveCc = false;
19
  protected $_allowCurrencyCode = array('BRL');
20
  protected $_canFetchTransactionInfo = true;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
21
  public function assignData($data)
22
  {
23
  if (!($data instanceof Varien_Object)) {
18
  protected $_canSaveCc = false;
19
  protected $_allowCurrencyCode = array('BRL');
20
  protected $_canFetchTransactionInfo = true;
21
+ public function getPayment()
22
+ {
23
+ return $this->getQuote()->getPayment();
24
+ }
25
+ public function getSession()
26
+ {
27
+ return Mage::getSingleton('transparente/session');
28
+ }
29
+ public function getCheckout()
30
+ {
31
+ return Mage::getSingleton('checkout/session');
32
+ }
33
+ public function getQuote()
34
+ {
35
+ return $this->getCheckout()->getQuote();
36
+ }
37
  public function assignData($data)
38
  {
39
  if (!($data instanceof Varien_Object)) {
app/code/local/MOIP/Transparente/Model/Observer.php CHANGED
@@ -11,53 +11,59 @@ class Moip_Transparente_Model_Observer
11
  $api->generateLog($moip_pay, 'MOIP_CRON.log');
12
  $result = $model->load($order->getId(), 'mage_pay');
13
  $moip_pay = $result->getMoipPay();
14
- $url = "https://api.moip.com.br/v2/webhooks?resourceId=".$moip_pay;
15
- $oauth = Mage::getSingleton('transparente/standard')->getConfigData('oauth_prod');
16
- $header = "Authorization: OAuth " . $oauth;
17
- $documento = 'Content-Type: application/json; charset=utf-8';
18
- $result = array();
19
- $ch = curl_init();
20
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
21
- curl_setopt($ch, CURLOPT_URL, $url);
22
- curl_setopt($ch, CURLOPT_HTTPHEADER, array(
23
- $header
24
- ));
25
- curl_setopt($ch, CURLOPT_USERAGENT, 'MoipMagento/2.0.0');
26
- $responseBody = curl_exec($ch);
27
- $info_curl = curl_getinfo($ch);
28
- curl_close($ch);
29
- $api->generateLog($moip_pay, 'MOIP_CRON.log');
30
-
31
- foreach (json_decode($responseBody, true) as $key => $value) {
32
- foreach ($value as $key => $_value) {
33
- $api->generateLog($_value['event'], 'MOIP_CRON.log');
34
- if($_value['event'] == "PAYMENT.AUTHORIZED"){
35
- $paid = $standard->getConfigData('order_status_processing');
36
- $upOrder = $this->autorizaPagamento($order, $paid);
37
- $autorize_pagamento = 1;
38
- } elseif ($_value['event'] == "PAYMENT.CANCELLED") {
39
-
40
- if($order->canUnhold()) {
41
- $order->unhold()->save();
42
- }
43
-
44
- $order->cancel()->save();
45
- $link = Mage::getUrl('sales/order/reorder/');
46
- $link = $link.'order_id/'.$order->getEntityId();
47
- $comment = "Cancelado por tempo limite para a notificação de pagamento, caso já tenha feito o pagamento entre em contato com o nosso atendimento, se desejar poderá refazer o seu pedido acessando: ".$link;
48
- $status = 'canceled';
49
- $order->cancel();
50
- $state = Mage_Sales_Model_Order::STATE_CANCELED;
51
- $order->setState($state, $status, $comment, $notified = true, $includeComment = true);
52
- $order->sendOrderUpdateEmail(true, $comment);
53
- $order->save();
54
- } else {
55
- return;
 
 
56
  }
 
57
  }
58
-
 
 
59
  }
60
- return;
 
61
 
62
  }
63
 
@@ -91,7 +97,7 @@ class Moip_Transparente_Model_Observer
91
  $orders->addFieldToFilter('created_at', array('gteq' => $from_date))
92
  ->addFieldToFilter('created_at', array('lteq' => $to_date))
93
  ->addFieldToFilter('payment.method', array(array('eq' => 'moip_cc')))
94
- >addAttributeToFilter('status', array('neq' => array('canceled','complete','closed')));
95
 
96
  foreach($orders as $order){
97
  $order = Mage::getModel('sales/order')->load($order->getEntityId());
@@ -102,13 +108,9 @@ class Moip_Transparente_Model_Observer
102
 
103
 
104
  public function setStatusBoletoAll() {
105
- $api = $this->getApi();
106
- $api->generateLog("aciona", 'MOIP_CRON.log');
107
-
108
-
109
  $to = date('Y-m-d', time());
110
 
111
- $moip_boleto_vencimento = Mage::getStoreConfig('payment/moip_transparente_standard/vcmentoboleto') + 6;
112
  $time_boleto = '-'.(int)$moip_boleto_vencimento.' day';
113
 
114
 
@@ -118,20 +120,27 @@ class Moip_Transparente_Model_Observer
118
  $from_date = date('Y-m-d H:i:s', strtotime("$from_boleto 00:00:00"));
119
  $to_date = date('Y-m-d H:i:s', strtotime("$from_boleto 23:59:59"));
120
 
121
-
122
-
123
-
124
- $api->generateLog($from_date, 'MOIP_CRON.log');
125
- $api->generateLog($to_date, 'MOIP_CRON.log');
126
  $orders = Mage::getModel("sales/order")->getCollection()->join(
127
  array('payment' => 'sales/order_payment'),
128
  'main_table.entity_id=payment.parent_id',
129
  array('payment_method' => 'payment.method')
130
  );
131
- $orders->addFieldToFilter('created_at', array('gteq' => $from_date))
132
- ->addFieldToFilter('created_at', array('lteq' => $to_date))
133
- ->addFieldToFilter('payment.method', array(array('eq' => 'moip_boleto')))
134
- >addAttributeToFilter('status', array('neq' => array('canceled','complete','closed')));
 
 
 
 
 
 
 
 
 
135
 
136
  foreach($orders as $order){
137
  $order = Mage::getModel('sales/order')->load($order->getEntityId());
@@ -140,12 +149,6 @@ class Moip_Transparente_Model_Observer
140
  }
141
 
142
  public function setStatusTefAll() {
143
- $api = $this->getApi();
144
- $api->generateLog("aciona", 'MOIP_CRON.log');
145
-
146
-
147
- $to = date('Y-m-d', time());
148
-
149
  $moip_boleto_vencimento = Mage::getStoreConfig('payment/moip_transparente_standard/vcmentoboleto') + 5;
150
  $time_boleto = '-'.(int)$moip_boleto_vencimento.' day';
151
 
@@ -156,20 +159,27 @@ class Moip_Transparente_Model_Observer
156
  $from_date = date('Y-m-d H:i:s', strtotime("$from_boleto 00:00:00"));
157
  $to_date = date('Y-m-d H:i:s', strtotime("$from_boleto 23:59:59"));
158
 
159
-
160
-
161
-
162
- $api->generateLog($from_date, 'MOIP_CRON.log');
163
- $api->generateLog($to_date, 'MOIP_CRON.log');
164
  $orders = Mage::getModel("sales/order")->getCollection()->join(
165
  array('payment' => 'sales/order_payment'),
166
  'main_table.entity_id=payment.parent_id',
167
  array('payment_method' => 'payment.method')
168
  );
169
- $orders->addFieldToFilter('created_at', array('gteq' => $from_date))
170
- ->addFieldToFilter('created_at', array('lteq' => $to_date))
171
- ->addFieldToFilter('payment.method', array(array('eq' => 'moip_tef')))
172
- >addAttributeToFilter('status', array('neq' => array('canceled','complete','closed')));
 
 
 
 
 
 
 
 
 
173
 
174
  foreach($orders as $order){
175
  $order = Mage::getModel('sales/order')->load($order->getEntityId());
@@ -178,12 +188,6 @@ class Moip_Transparente_Model_Observer
178
  }
179
 
180
  public function setStatusAll() {
181
- $api = $this->getApi();
182
- $api->generateLog("aciona", 'MOIP_CRON.log');
183
-
184
-
185
- $to = date('Y-m-d', time());
186
-
187
  $moip_boleto_vencimento = Mage::getStoreConfig('payment/moip_transparente_standard/vcmentoboleto') + 7;
188
  $time_boleto = '-'.(int)$moip_boleto_vencimento.' day';
189
 
@@ -194,20 +198,27 @@ class Moip_Transparente_Model_Observer
194
  $from_date = date('Y-m-d H:i:s', strtotime("$from_boleto 00:00:00"));
195
  $to_date = date('Y-m-d H:i:s', strtotime("$from_boleto 23:59:59"));
196
 
197
-
198
-
199
-
200
- $api->generateLog($from_date, 'MOIP_CRON.log');
201
- $api->generateLog($to_date, 'MOIP_CRON.log');
202
  $orders = Mage::getModel("sales/order")->getCollection()->join(
203
  array('payment' => 'sales/order_payment'),
204
  'main_table.entity_id=payment.parent_id',
205
  array('payment_method' => 'payment.method')
206
  );
207
- $orders->addFieldToFilter('created_at', array('gteq' => $from_date))
208
- ->addFieldToFilter('created_at', array('lteq' => $to_date))
209
- ->addFieldToFilter('payment.method', array(array('eq' => 'moip_cc'), array('eq' => 'moip_boleto'), array('eq' => 'moip_tef')))
210
- >addAttributeToFilter('status', array('neq' => array('canceled','complete','closed')));
 
 
 
 
 
 
 
 
 
211
 
212
  foreach($orders as $order){
213
  $order = Mage::getModel('sales/order')->load($order->getEntityId());
@@ -217,36 +228,37 @@ class Moip_Transparente_Model_Observer
217
 
218
 
219
  public function setHoldedNotification(){
220
- $api = $this->getApi();
221
- $api->generateLog("----- Enviando Boleto a vencer -----", 'MOIP_CRON.log');
222
-
223
-
224
- $to = date('Y-m-d', time());
225
-
226
  $moip_boleto_vencimento = Mage::getStoreConfig('payment/moip_transparente_standard/vcmentoboleto');
227
- $time_boleto = '-'.(int)$moip_boleto_vencimento.' day';
228
-
229
-
230
- $from_boleto = date('Y-m-d',(strtotime($time_boleto, strtotime($to))));
231
-
232
-
233
- $from_date = date('Y-m-d H:i:s', strtotime("$from_boleto 00:00:00"));
234
- $to_date = date('Y-m-d H:i:s', strtotime("$from_boleto 23:59:59"));
235
 
236
 
 
237
 
 
 
 
238
 
239
- $api->generateLog($from_date, 'MOIP_CRON.log');
240
- $api->generateLog($to_date, 'MOIP_CRON.log');
241
- $orders = Mage::getModel("sales/order")->getCollection()->join(
242
- array('payment' => 'sales/order_payment'),
243
- 'main_table.entity_id=payment.parent_id',
244
- array('payment_method' => 'payment.method')
245
- );
246
- $orders->addFieldToFilter('created_at', array('gteq' => $from_date))
247
- ->addFieldToFilter('created_at', array('lteq' => $to_date))
248
- ->addFieldToFilter('payment.method', array(array('eq' => 'moip_boleto')))
249
- >addAttributeToFilter('status', array('neq' => array('canceled','complete','closed')));
 
 
 
 
 
 
 
 
 
 
250
 
251
  foreach($orders as $order){
252
  $order = Mage::getModel('sales/order')->load($order->getEntityId());
@@ -404,4 +416,4 @@ class Moip_Transparente_Model_Observer
404
  }
405
 
406
  }
407
- }
11
  $api->generateLog($moip_pay, 'MOIP_CRON.log');
12
  $result = $model->load($order->getId(), 'mage_pay');
13
  $moip_pay = $result->getMoipPay();
14
+ if($moip_pay){
15
+ $url = "https://api.moip.com.br/v2/webhooks?resourceId=".$moip_pay;
16
+ $oauth = Mage::getSingleton('transparente/standard')->getConfigData('oauth_prod');
17
+ $header = "Authorization: OAuth " . $oauth;
18
+ $documento = 'Content-Type: application/json; charset=utf-8';
19
+ $result = array();
20
+ $ch = curl_init();
21
+ curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
22
+ curl_setopt($ch, CURLOPT_URL, $url);
23
+ curl_setopt($ch, CURLOPT_HTTPHEADER, array(
24
+ $header
25
+ ));
26
+ curl_setopt($ch, CURLOPT_USERAGENT, 'MoipMagento/2.0.0');
27
+ $responseBody = curl_exec($ch);
28
+ $info_curl = curl_getinfo($ch);
29
+ curl_close($ch);
30
+ $api->generateLog($moip_pay, 'MOIP_CRON.log');
31
+
32
+ foreach (json_decode($responseBody, true) as $key => $value) {
33
+ foreach ($value as $key => $_value) {
34
+ $api->generateLog($_value['event'], 'MOIP_CRON.log');
35
+ if($_value['event'] == "PAYMENT.AUTHORIZED"){
36
+ $paid = $standard->getConfigData('order_status_processing');
37
+ $upOrder = $this->autorizaPagamento($order, $paid);
38
+ $autorize_pagamento = 1;
39
+ } elseif ($_value['event'] == "PAYMENT.CANCELLED") {
40
+
41
+ if($order->canUnhold()) {
42
+ $order->unhold()->save();
43
+ }
44
+
45
+ $order->cancel()->save();
46
+ $link = Mage::getUrl('sales/order/reorder/');
47
+ $link = $link.'order_id/'.$order->getEntityId();
48
+ $comment = "Cancelado por tempo limite para a notificação de pagamento, caso já tenha feito o pagamento entre em contato com o nosso atendimento, se desejar poderá refazer o seu pedido acessando: ".$link;
49
+ $status = 'canceled';
50
+ $order->cancel();
51
+ $state = Mage_Sales_Model_Order::STATE_CANCELED;
52
+ $order->setState($state, $status, $comment, $notified = true, $includeComment = true);
53
+ $order->sendOrderUpdateEmail(true, $comment);
54
+ $order->save();
55
+ } else {
56
+ return;
57
+ }
58
  }
59
+
60
  }
61
+ return;
62
+ } else {
63
+ return;
64
  }
65
+
66
+
67
 
68
  }
69
 
97
  $orders->addFieldToFilter('created_at', array('gteq' => $from_date))
98
  ->addFieldToFilter('created_at', array('lteq' => $to_date))
99
  ->addFieldToFilter('payment.method', array(array('eq' => 'moip_cc')))
100
+ ->addAttributeToFilter('status', array('neq' => array('canceled','complete','closed')));
101
 
102
  foreach($orders as $order){
103
  $order = Mage::getModel('sales/order')->load($order->getEntityId());
108
 
109
 
110
  public function setStatusBoletoAll() {
 
 
 
 
111
  $to = date('Y-m-d', time());
112
 
113
+ $moip_boleto_vencimento = Mage::getStoreConfig('payment/moip_transparente_standard/vcmentoboleto') + 7;
114
  $time_boleto = '-'.(int)$moip_boleto_vencimento.' day';
115
 
116
 
120
  $from_date = date('Y-m-d H:i:s', strtotime("$from_boleto 00:00:00"));
121
  $to_date = date('Y-m-d H:i:s', strtotime("$from_boleto 23:59:59"));
122
 
123
+ echo $from_date;
124
+ echo $to_date;
125
+
 
 
126
  $orders = Mage::getModel("sales/order")->getCollection()->join(
127
  array('payment' => 'sales/order_payment'),
128
  'main_table.entity_id=payment.parent_id',
129
  array('payment_method' => 'payment.method')
130
  );
131
+ $orders->addFieldToFilter('created_at', array('gteq' => $from_date))
132
+ ->addFieldToFilter('created_at', array('lteq' => $to_date))
133
+ ->addAttributeToFilter('status', array(
134
+ 'nin' => array(
135
+ Mage_Sales_Model_Order::STATE_COMPLETE,
136
+ Mage_Sales_Model_Order::STATE_PROCESSING,
137
+ Mage_Sales_Model_Order::STATE_CLOSED,
138
+ Mage_Sales_Model_Order::STATE_CANCELED
139
+ )
140
+ )
141
+
142
+ )
143
+ ->addAttributeToFilter('payment.method', array(array('eq' => 'moip_boleto')));
144
 
145
  foreach($orders as $order){
146
  $order = Mage::getModel('sales/order')->load($order->getEntityId());
149
  }
150
 
151
  public function setStatusTefAll() {
 
 
 
 
 
 
152
  $moip_boleto_vencimento = Mage::getStoreConfig('payment/moip_transparente_standard/vcmentoboleto') + 5;
153
  $time_boleto = '-'.(int)$moip_boleto_vencimento.' day';
154
 
159
  $from_date = date('Y-m-d H:i:s', strtotime("$from_boleto 00:00:00"));
160
  $to_date = date('Y-m-d H:i:s', strtotime("$from_boleto 23:59:59"));
161
 
162
+ echo $from_date;
163
+ echo $to_date;
164
+
 
 
165
  $orders = Mage::getModel("sales/order")->getCollection()->join(
166
  array('payment' => 'sales/order_payment'),
167
  'main_table.entity_id=payment.parent_id',
168
  array('payment_method' => 'payment.method')
169
  );
170
+ $orders->addFieldToFilter('created_at', array('gteq' => $from_date))
171
+ ->addFieldToFilter('created_at', array('lteq' => $to_date))
172
+ ->addAttributeToFilter('status', array(
173
+ 'nin' => array(
174
+ Mage_Sales_Model_Order::STATE_COMPLETE,
175
+ Mage_Sales_Model_Order::STATE_PROCESSING,
176
+ Mage_Sales_Model_Order::STATE_CLOSED,
177
+ Mage_Sales_Model_Order::STATE_CANCELED
178
+ )
179
+ )
180
+
181
+ )
182
+ ->addAttributeToFilter('payment.method', array(array('eq' => 'moip_tef')));
183
 
184
  foreach($orders as $order){
185
  $order = Mage::getModel('sales/order')->load($order->getEntityId());
188
  }
189
 
190
  public function setStatusAll() {
 
 
 
 
 
 
191
  $moip_boleto_vencimento = Mage::getStoreConfig('payment/moip_transparente_standard/vcmentoboleto') + 7;
192
  $time_boleto = '-'.(int)$moip_boleto_vencimento.' day';
193
 
198
  $from_date = date('Y-m-d H:i:s', strtotime("$from_boleto 00:00:00"));
199
  $to_date = date('Y-m-d H:i:s', strtotime("$from_boleto 23:59:59"));
200
 
201
+ echo $from_date;
202
+ echo $to_date;
203
+
 
 
204
  $orders = Mage::getModel("sales/order")->getCollection()->join(
205
  array('payment' => 'sales/order_payment'),
206
  'main_table.entity_id=payment.parent_id',
207
  array('payment_method' => 'payment.method')
208
  );
209
+ $orders->addFieldToFilter('created_at', array('gteq' => $from_date))
210
+ ->addFieldToFilter('created_at', array('lteq' => $to_date))
211
+ ->addAttributeToFilter('status', array(
212
+ 'nin' => array(
213
+ Mage_Sales_Model_Order::STATE_COMPLETE,
214
+ Mage_Sales_Model_Order::STATE_PROCESSING,
215
+ Mage_Sales_Model_Order::STATE_CLOSED,
216
+ Mage_Sales_Model_Order::STATE_CANCELED
217
+ )
218
+ )
219
+
220
+ )
221
+ ->addAttributeToFilter('payment.method', array(array('eq' => 'moip_cc'), array('eq' => 'moip_boleto'), array('eq' => 'moip_tef')));
222
 
223
  foreach($orders as $order){
224
  $order = Mage::getModel('sales/order')->load($order->getEntityId());
228
 
229
 
230
  public function setHoldedNotification(){
 
 
 
 
 
 
231
  $moip_boleto_vencimento = Mage::getStoreConfig('payment/moip_transparente_standard/vcmentoboleto');
232
+ $time_boleto = '-'.(int)$moip_boleto_vencimento.' day';
 
 
 
 
 
 
 
233
 
234
 
235
+ $from_boleto = date('Y-m-d',(strtotime($time_boleto, strtotime($to))));
236
 
237
+
238
+ $from_date = date('Y-m-d H:i:s', strtotime("$from_boleto 00:00:00"));
239
+ $to_date = date('Y-m-d H:i:s', strtotime("$from_boleto 23:59:59"));
240
 
241
+ echo $from_date;
242
+ echo $to_date;
243
+
244
+ $orders = Mage::getModel("sales/order")->getCollection()->join(
245
+ array('payment' => 'sales/order_payment'),
246
+ 'main_table.entity_id=payment.parent_id',
247
+ array('payment_method' => 'payment.method')
248
+ );
249
+ $orders->addFieldToFilter('created_at', array('gteq' => $from_date))
250
+ ->addFieldToFilter('created_at', array('lteq' => $to_date))
251
+ ->addAttributeToFilter('status', array(
252
+ 'nin' => array(
253
+ Mage_Sales_Model_Order::STATE_COMPLETE,
254
+ Mage_Sales_Model_Order::STATE_PROCESSING,
255
+ Mage_Sales_Model_Order::STATE_CLOSED,
256
+ Mage_Sales_Model_Order::STATE_CANCELED
257
+ )
258
+ )
259
+
260
+ )
261
+ ->addAttributeToFilter('payment.method', array(array('eq' => 'moip_boleto')));
262
 
263
  foreach($orders as $order){
264
  $order = Mage::getModel('sales/order')->load($order->getEntityId());
416
  }
417
 
418
  }
419
+ }
app/code/local/MOIP/Transparente/controllers/StandardController.php CHANGED
@@ -26,262 +26,99 @@ class MOIP_Transparente_StandardController extends Mage_Core_Controller_Front_Ac
26
  exit;
27
  }
28
  }
29
-
30
  public function getApi()
31
  {
32
  $api = Mage::getModel('transparente/api');
33
  return $api;
34
  }
35
 
36
- public function redirectAction() {
37
- $session = Mage::getSingleton('checkout/session');
38
- $getSaltes = Mage::getModel('sales/order');
39
- $session->setCurrent_order($getSaltes->load($session->getLastOrderId()));
40
- Mage::dispatchEvent('checkout_onepage_controller_success_action', array('order_ids' => array($session->getLastOrderId())));
41
- $this->loadLayout();
42
- $this->renderLayout();
43
- }
44
-
45
- protected function _getItemQtys()
46
- {
47
- $data = $this->getRequest()->getParam('invoice');
48
- if (isset($data['items'])) {
49
- $qtys = $data['items'];
50
- } else {
51
- $qtys = array();
52
- }
53
- return $qtys;
54
- }
55
-
56
- public function OauthAction() {
57
- $api = $this->getApi();
58
- $standard = $this->getStandard();
59
- $data = $this->getRequest()->getParams();
60
- $model = new Mage_Core_Model_Config();
61
- $api->generateLog($data['validacao'], 'MOIP_Oauth.log');
62
-
63
- $json_log = json_encode($data);
64
- $api->generateLog($json_log, 'MOIP_Oauth.log');
65
- if($data['validacao']== $standard->getConfigData('validador_retorno')){
66
- $store_id = $data['store_id'];
67
-
68
- if($data['store_id']){
69
- $store_code = $data['store_id'];
70
- } else {
71
- $store_code = 'default';
72
- }
73
- if (Mage::getSingleton('transparente/standard')->getConfigData('ambiente') == "teste") {
74
- $oauth = $this->getOauthAcess($data['code']);
75
- $oauth_decode = json_decode($oauth, true);
76
- $api->generateLog($oauth_decode['accessToken'], 'MOIP_Oauth.log');
77
- $model->saveConfig('payment/moip_transparente_standard/oauth_dev', $oauth_decode['accessToken'], $store_code, $store_id);
78
- $public_key = $this->getKeyPublic($oauth_decode['accessToken']);
79
- $model->saveConfig('payment/moip_transparente_standard/publickey_dev', $public_key, $store_code, $store_id);
80
- } else {
81
- $oauth = $this->getOauthAcess($data['code']);
82
- $oauth_decode = json_decode($oauth, true);
83
- $api->generateLog($oauth_decode['accessToken'], 'MOIP_Oauth.log');
84
- $model->saveConfig('payment/moip_transparente_standard/oauth_prod', (string)$oauth_decode['accessToken'], 'default', 0);
85
- $public_key = $this->getKeyPublic($oauth_decode['accessToken']);
86
- $model->saveConfig('payment/moip_transparente_standard/publickey_prod', $public_key, $store_code, 0);
87
- }
88
- Mage::getSingleton('core/session')->addSuccess('Configuração Concluída, por favor realize o seu teste.');
89
- $url = "";
90
- Mage::app()->getFrontController()->getResponse()->setRedirect(Mage::getUrl($url));
91
- } else {
92
- echo utf8_decode("ha ha ha... você não tem autorização para realizar pagamentos...");
93
  }
94
-
95
- }
96
-
97
- public function getOauthAcess($code) {
98
- $api = $this->getApi();
99
- $documento = 'Content-Type: application/json; charset=utf-8';
100
- $api->generateLog($code, 'MOIP_Oauth.log');
101
-
102
- if (Mage::getSingleton('transparente/standard')->getConfigData('ambiente') == "teste") {
103
- $url = "https://sandbox.moip.com.br/oauth/accesstoken";
104
- $header = "Authorization: Basic " . base64_encode(MOIP_Transparente_Model_Api::TOKEN_TEST . ":" . MOIP_Transparente_Model_Api::KEY_TEST);
105
- $array_json = array(
106
- 'appId' => 'APP-9MUFQ39Y4CQU', //Alterar aqui tb....
107
- 'appSecret' => '26xa86dbc7mhdyqq2w69vscvhz47cri', //Alterar aqui tb....
108
- 'redirectUri' => 'http://moip.o2ti.com/magento/redirect/',
109
- 'grantType' => 'authorization_code',
110
- 'code' => $code
111
- );
112
- $json = json_encode($array_json);
113
- }
114
- else {
115
- $url = "https://api.moip.com.br/oauth/accesstoken";
116
- $header = "Authorization: Basic " . base64_encode(MOIP_Transparente_Model_Api::TOKEN_PROD . ":" . MOIP_Transparente_Model_Api::KEY_PROD);
117
- $array_json = array(
118
- 'appId' => 'APP-AKYBMMVU1FL1', //Alterar aqui tb....
119
- 'appSecret' => 'db9pavx8542khvsyn3s0tpxyu2gom2m', //Alterar aqui tb....
120
- 'redirectUri' => 'http://moip.o2ti.com/magento/redirect/',
121
- 'grantType' => 'authorization_code',
122
- 'code' => $code
123
- );
124
- $json = json_encode($array_json);
125
- }
126
- $result = array();
127
- $ch = curl_init();
128
- curl_setopt($ch, CURLOPT_URL,$url);
129
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
130
- curl_setopt($ch, CURLOPT_TIMEOUT, 6000);
131
- curl_setopt($ch, CURLOPT_POST, true);
132
- curl_setopt($ch, CURLOPT_POSTFIELDS, $json);
133
- curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
134
- curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
135
- curl_setopt($ch, CURLOPT_HTTPHEADER, array($header, $documento));
136
- curl_setopt($ch,CURLOPT_USERAGENT,'MoipMagento/2.0.0');
137
-
138
- $res = curl_exec($ch);
139
- curl_close($ch);
140
- $api->generateLog($res, 'MOIP_Oauth.log');
141
-
142
- return $res;
143
- }
144
-
145
-
146
-
147
-
148
- public function getKeyPublic($oauth) {
149
- $api = $this->getApi();
150
- $api->generateLog($oauth, 'MOIP_Oauth.log');
151
- $documento = 'Content-Type: application/json; charset=utf-8';
152
-
153
- if (Mage::getSingleton('transparente/standard')->getConfigData('ambiente') == "teste") {
154
- $url = "https://sandbox.moip.com.br/v2/keys/";
155
- $header = "Authorization: OAuth " . $oauth;
156
- } else {
157
- $url = "https://api.moip.com.br/v2/keys/";
158
- $header = "Authorization: OAuth " . $oauth;
159
- }
160
- $result = array();
161
- $ch = curl_init();
162
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
163
- curl_setopt($ch, CURLOPT_URL, $url);
164
- curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
165
- curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
166
- curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
167
- curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
168
- curl_setopt($ch, CURLOPT_HTTPHEADER, array($header));
169
- curl_setopt($ch,CURLOPT_USERAGENT,'MoipMagento/2.0.0');
170
- $responseBody = curl_exec($ch);
171
- curl_close($ch);
172
-
173
- $api->generateLog($responseBody, 'MOIP_Oauth.log');
174
- $responseBody = json_decode($responseBody, true);
175
- $public_key = $responseBody['keys']['encryption'];
176
- $api->generateLog($public_key, 'MOIP_Oauth.log');
177
-
178
-
179
- return $public_key;
180
  }
181
 
182
- public function successAction() {
183
- error_reporting(E_ALL);
184
- ini_set("display_errors",1);
185
-
186
- $api = $this->getApi();
187
- $standard = $this->getStandard();
188
- $validacao = $this->getRequest()->getParams();
189
- $result = array('');
190
- $status_moip = "";
191
- $moip_ord = "";
192
- $json_moip = $this->getRequest()->getRawBody();
193
- if(!isset($validacao)){
194
- return;
195
- }
196
-
197
  $json_moip = json_decode($json_moip);
198
-
199
  if(isset($json_moip->resource->payment)){
200
-
201
- $moip_ord = (string)$json_moip->resource->payment->_links->order->title;
202
  $status_moip = (string)$json_moip->resource->payment->status;
203
-
204
  } else {
205
  $refundToStoreCreditAmount = null;
206
- $moip_ord = $json_moip->resource->order->id;
207
  $status_moip = (string)$json_moip->resource->order->status;
208
  if (isset($json_moip->resource->order->refunds)) {
209
-
210
  $refunds = $json_moip->resource->order->refunds;
211
  foreach ($refunds as $key => $value) {
212
  $refundToStoreCreditAmount = $value->amount->total;
213
  }
214
- $comment = "Reembolso para o Pedido: ".$moip_ord;
215
-
216
  $refundToStoreCreditAmount = $refundToStoreCreditAmount/100;
217
-
218
-
219
-
220
  }
221
-
222
  }
223
-
224
-
225
- $model = Mage::getModel('transparente/write');
226
- $order_moip = str_replace("ORD-", "",$moip_ord);
227
- $result = $model->load($order_moip, 'moip_order');
228
- $mage_ord = $result->getMagePay();
229
- $method = $result->getFormaPagamento();
230
-
231
  if($method == "moip_boleto"){
232
- $onhold = $standard->getConfigData('order_status_holded_boleto');
 
233
  } elseif ($method == "moip_cc"){
234
- $onhold = $standard->getConfigData('order_status_holded');
 
235
  } elseif($method == "moip_tef"){
236
- $onhold = $standard->getConfigData('order_status_holded_tef');
 
237
  } else {
238
- $onhold = $standard->getConfigData('order_status_holded');
239
  }
240
-
241
-
242
-
243
-
244
- if($validacao['validacao']== $standard->getConfigData('validador_retorno') && $status_moip != ""){
245
-
246
- $order = Mage::getModel('sales/order')->load($mage_ord);
247
- $order_status = $order->getStatus();
248
- $api->generateLog($json_moip, 'MOIP_WebHooks.log');
249
- $api->generateLog($status_moip, 'MOIP_WebHooks.log');
250
- $api->generateLog($order_moip, 'MOIP_WebHooks.log');
251
- $api->generateLog($mage_ord, 'MOIP_WebHooks.log');
252
- if($order->getId()){
253
- try {
254
- if($status_moip == "AUTHORIZED" && $order_status != "processing"){
255
- $paid = $standard->getConfigData('order_status_processing');
256
-
257
- $upOrder = $this->autorizaPagamento($order, $paid);
258
- return $upOrder;
259
- } elseif($status_moip == "WAITING" && $order_status == "pending") {
260
- $upOrder = $this->iniciaPagamento($order, $onhold);
261
- return $upOrder;
262
-
263
- } elseif($status_moip == "CANCELLED" && $order_status != "processing"){
264
- $details = $json_moip->resource->payment->cancellationDetails->description;
265
-
266
- $upOrder = $this->cancelaPagamento($order,$details);
267
- return $upOrder;
268
- } elseif($status_moip == "REFUNDED"){
269
- return $this->refundPagamento($order, $refundToStoreCreditAmount, $comment);
270
- } else{
271
- die();
272
- }
273
- } catch (Exception $order) {
274
- $api->generateLog($order, 'MOIP_WebHooksErro.log');
275
- }
276
-
277
- } else {
278
- Mage::throwException(Mage::helper('core')->__('Order não encontrada'));
279
- }
280
- }
281
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
282
 
 
283
 
 
 
 
 
 
 
 
 
 
 
 
 
284
  }
 
 
285
  public function cancelAction() {
286
  $session = Mage::getSingleton('checkout/session');
287
  $session->setQuoteId($session->getTransparenteStandardQuoteId(true));
@@ -301,14 +138,10 @@ class MOIP_Transparente_StandardController extends Mage_Core_Controller_Front_Ac
301
  }
302
 
303
 
304
- public function autorizaPagamento($order, $paid){
305
- sleep(5);
306
-
307
-
308
  if($order->canUnhold()) {
309
  $order->unhold()->save();
310
- }
311
-
312
  $invoice = $order->prepareInvoice();
313
  if ($this->getStandard()->canCapture())
314
  {
@@ -318,23 +151,11 @@ class MOIP_Transparente_StandardController extends Mage_Core_Controller_Front_Ac
318
  $invoice->sendEmail();
319
  $invoice->setEmailSent(true);
320
  $invoice->save();
321
-
322
-
323
-
324
- return;
325
  }
326
 
327
- public function iniciaPagamento($order, $onhold){
328
-
329
- $state = Mage_Sales_Model_Order::STATE_HOLDED;
330
- $status = $onhold;
331
- $comment = "Pagamento Iniciado, aguardando confirmação automática.";
332
- $update = $this->updateInOrder($order, $state, $status, $comment);
333
- return $update;
334
- }
335
-
336
- public function cancelaPagamento($order, $details){
337
- sleep(5);
338
  if($order->canUnhold()) {
339
  $order->unhold()->save();
340
  }
@@ -347,10 +168,11 @@ class MOIP_Transparente_StandardController extends Mage_Core_Controller_Front_Ac
347
  $order->setState($state, $status, $comment, $notified = true, $includeComment = true);
348
  $order->save();
349
  $order->sendOrderUpdateEmail(true, $comment);
350
- return $update;
351
- }
 
352
 
353
- public function refundPagamento($order, $refundToStoreCreditAmount, $comment)
354
  {
355
 
356
  if (!$order->getId()) {
@@ -368,7 +190,6 @@ class MOIP_Transparente_StandardController extends Mage_Core_Controller_Front_Ac
368
 
369
 
370
  if ($refundToStoreCreditAmount) {
371
-
372
  if ($order->getCustomerIsGuest()) {
373
  $this->_fault('cannot_refund_to_storecredit');
374
  }
@@ -382,17 +203,12 @@ class MOIP_Transparente_StandardController extends Mage_Core_Controller_Front_Ac
382
  $refundToStoreCreditAmount = $creditmemo->getStore()->roundPrice(
383
  $refundToStoreCreditAmount*$order->getStoreToOrderRate()
384
  );
385
- // this field can be used by customer balance observer
386
  $creditmemo->setBsCustomerBalTotalRefunded($refundToStoreCreditAmount);
387
- // setting flag to make actual refund to customer balance after credit memo save
388
  $creditmemo->setCustomerBalanceRefundFlag(true);
389
  }
390
  }
391
  $creditmemo->setPaymentRefundDisallowed(true)->register();
392
- // add comment to creditmemo
393
-
394
- $creditmemo->addComment($comment, 1);
395
-
396
  try {
397
  Mage::getModel('core/resource_transaction')
398
  ->addObject($creditmemo)
@@ -404,29 +220,14 @@ class MOIP_Transparente_StandardController extends Mage_Core_Controller_Front_Ac
404
  $this->_fault('data_invalid', $e->getMessage());
405
  }
406
  echo $creditmemo->getIncrementId();
407
-
408
-
409
-
410
  }
411
 
412
-
413
- public function updateInOrder($order, $state, $status, $comment){
414
- $order->setState($state, $status, $comment, $notified = true, $includeComment = true);
415
- $order->save();
416
- $order->sendOrderUpdateEmail(true, $comment);
417
- return true;
418
- }
419
-
420
-
421
  public function buscaCepAction() {
422
  $data = $this->getRequest()->getParams();
423
-
424
  if ($data['meio'] == "cep") {
425
-
426
  $cep = $data['cep'];
427
  $cep = substr(preg_replace("/[^0-9]/", "", $cep) . '00000000', 0, 8);
428
  $url = "http://endereco.ecorreios.com.br/app/enderecoCep.php?cep={$cep}";
429
-
430
  $result = array();
431
  $ch = curl_init();
432
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
@@ -434,99 +235,8 @@ class MOIP_Transparente_StandardController extends Mage_Core_Controller_Front_Ac
434
  curl_setopt($ch,CURLOPT_USERAGENT,'MoipMagento/2.0.0');
435
  $responseBody = curl_exec($ch);
436
  curl_close($ch);
437
-
438
-
439
  if($responseBody){
440
-
441
-
442
  $endereco = Mage::helper('core')->jsonDecode($responseBody);
443
-
444
- /*
445
- //Remover comentário para usar a versão em que o distrito federal está fora da ordem alfabética. Nesse caso lembre-se que precisa remover o switch de baixo.
446
- switch ($endereco['uf']) {
447
- case "AC":
448
- $endereco['ufid'] = 485;
449
- break;
450
- case "AL":
451
- $endereco['ufid'] = 486;
452
- break;
453
- case "AP":
454
- $endereco['ufid'] = 487;
455
- break;
456
- case "AM":
457
- $endereco['ufid'] = 488;
458
- break;
459
- case "BA":
460
- $endereco['ufid'] = 489;
461
- break;
462
- case "CE":
463
- $endereco['ufid'] = 490;
464
- break;
465
- case "DF":
466
- $endereco['ufid'] = 511;
467
- break;
468
- case "ES":
469
- $endereco['ufid'] = 491;
470
- break;
471
- case "GO":
472
- $endereco['ufid'] = 492;
473
- break;
474
- case "MA":
475
- $endereco['ufid'] = 493;
476
- break;
477
- case "MT":
478
- $endereco['ufid'] = 494;
479
- break;
480
- case "MS":
481
- $endereco['ufid'] = 495;
482
- break;
483
- case "MG":
484
- $endereco['ufid'] = 496;
485
- break;
486
- case "PA":
487
- $endereco['ufid'] = 497;
488
- break;
489
- case "PB":
490
- $endereco['ufid'] = 498;
491
- break;
492
- case "PR":
493
- $endereco['ufid'] = 499;
494
- break;
495
- case "PE":
496
- $endereco['ufid'] = 500;
497
- break;
498
- case "PI":
499
- $endereco['ufid'] = 501;
500
- break;
501
- case "RJ":
502
- $endereco['ufid'] = 502;
503
- break;
504
- case "RN":
505
- $endereco['ufid'] = 503;
506
- break;
507
- case "RS":
508
- $endereco['ufid'] = 504;
509
- break;
510
- case "RO":
511
- $endereco['ufid'] = 505;
512
- break;
513
- case "RR":
514
- $endereco['ufid'] = 506;
515
- break;
516
- case "SC":
517
- $endereco['ufid'] = 507;
518
- break;
519
- case "SP":
520
- $endereco['ufid'] = 508;
521
- break;
522
- case "SE":
523
- $endereco['ufid'] = 509;
524
- break;
525
- case "TO":
526
- $endereco['ufid'] = 510;
527
- break;
528
- }*/
529
-
530
  switch ($endereco['uf']) {
531
  case "AC":
532
  $endereco['ufid'] = 485;
@@ -652,13 +362,9 @@ class MOIP_Transparente_StandardController extends Mage_Core_Controller_Front_Ac
652
  curl_setopt($ch, CURLOPT_URL,$url);
653
  curl_setopt($ch, CURLOPT_POST, true);
654
  curl_setopt($ch, CURLOPT_POSTFIELDS, $json);
655
- curl_setopt($ch, CURLOPT_CONNECTTIMEOUT ,0);
656
- curl_setopt($ch, CURLOPT_TIMEOUT, 1000);
657
  curl_setopt($ch, CURLOPT_HTTPHEADER, array($header, $documento));
658
  curl_setopt($ch, CURLOPT_USERAGENT,'MoipMagento/2.0.0');
659
- curl_setopt($ch, CURLOPT_SSLVERSION, CURL_SSLVERSION_TLSv1_2);
660
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
661
-
662
  $res = curl_exec($ch);
663
  $info = curl_getinfo($ch);
664
  curl_close($ch);
@@ -682,6 +388,7 @@ class MOIP_Transparente_StandardController extends Mage_Core_Controller_Front_Ac
682
  if($responseBody['token']){
683
  echo "WebHooks configurado com sucesso.";
684
  }
 
685
  }
686
 
687
 
@@ -704,51 +411,121 @@ class MOIP_Transparente_StandardController extends Mage_Core_Controller_Front_Ac
704
  echo "Configurações atuais foram apagadas. Por favor, repita o processo de instalação.";
705
  }
706
  }
707
- public function DebugKeyPublicAction() {
708
 
 
 
 
709
  $data = $this->getRequest()->getParams();
710
- if (Mage::getSingleton('transparente/standard')->getConfigData('ambiente') == "teste") {
711
-
712
-
713
- if($data['oauth']){
714
- $oauth = $data['oauth'];
715
- } else {
716
- $oauth = Mage::getSingleton('transparente/standard')->getConfigData('oauth_dev') ;
717
- }
718
- $url = "https://sandbox.moip.com.br/v2/keys/";
719
- $header = "Authorization: OAuth " . $oauth;
720
- echo "oauth ".$oauth;
721
 
 
 
722
  } else {
723
- echo "in produtçao: ";
724
- $url = "https://api.moip.com.br/v2/keys/";
725
- if($data['oauth']){
726
- $oauth = $data['oauth'];
727
- echo "oauth ".$oauth;
728
- } else {
729
- $oauth = Mage::getSingleton('transparente/standard')->getConfigData('oauth_prod') ;
730
- }
731
-
732
- $header = "Authorization: OAuth " . $oauth;
 
 
 
 
 
 
733
  }
 
 
 
 
 
 
 
 
734
 
735
- $result = array();
736
- $ch = curl_init();
737
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
738
- curl_setopt($ch, CURLOPT_URL, $url);
739
- curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
740
- curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
741
- curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
742
- curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
743
- curl_setopt($ch, CURLOPT_HTTPHEADER, array($header));
744
- curl_setopt($ch,CURLOPT_USERAGENT,'MoipMagento/2.0.0');
745
- $responseBody = curl_exec($ch);
746
- curl_close($ch);
747
- $responseBody = json_decode($responseBody, true);
748
- $public_key = $responseBody['keys']['encryption'];
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
749
 
750
- return $public_key;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
751
  }
752
 
753
  }
754
-
26
  exit;
27
  }
28
  }
 
29
  public function getApi()
30
  {
31
  $api = Mage::getModel('transparente/api');
32
  return $api;
33
  }
34
 
35
+ public function successAction() {
36
+ error_reporting(E_ALL);
37
+ ini_set("display_errors",1);
38
+ $this->getResponse()->setHeader('HTTP/1.0','202',true);
39
+ $params = $this->getRequest()->getParams();
40
+ $json_moip = $this->getRequest()->getRawBody();
41
+ if($params['validacao']== $this->getStandard()->getConfigData('validador_retorno')){
42
+ return $this->getTransationMoip($json_moip);
43
+ }
44
+ else {
45
+ return $this->getResponse()->setHeader('HTTP/1.0','404',true);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
46
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
47
  }
48
 
49
+ public function getTransationMoip($json_moip){
 
 
 
 
 
 
 
 
 
 
 
 
 
 
50
  $json_moip = json_decode($json_moip);
 
51
  if(isset($json_moip->resource->payment)){
52
+ $moip_order = (string)$json_moip->resource->payment->_links->order->title;
 
53
  $status_moip = (string)$json_moip->resource->payment->status;
 
54
  } else {
55
  $refundToStoreCreditAmount = null;
56
+ $moip_order = $json_moip->resource->order->id;
57
  $status_moip = (string)$json_moip->resource->order->status;
58
  if (isset($json_moip->resource->order->refunds)) {
 
59
  $refunds = $json_moip->resource->order->refunds;
60
  foreach ($refunds as $key => $value) {
61
  $refundToStoreCreditAmount = $value->amount->total;
62
  }
63
+ $comment = "Reembolso para o Pedido: ".$moip_order;
 
64
  $refundToStoreCreditAmount = $refundToStoreCreditAmount/100;
 
 
 
65
  }
 
66
  }
67
+ $api = $this->getApi();
68
+ $standard = $this->getStandard();
69
+ $result_table = $this->findOrderMage($moip_order);
70
+ $mage_order = $result_table->getMagePay();
71
+ $method = $result_table->getFormaPagamento();
 
 
 
72
  if($method == "moip_boleto"){
73
+ $onhold = $standard->getConfigData('order_status_holded_boleto');
74
+ $details_cancel = "Prazo para pagamento excedido";
75
  } elseif ($method == "moip_cc"){
76
+ $onhold = $standard->getConfigData('order_status_holded');
77
+ $details_cancel = $json_moip->resource->payment->cancellationDetails->description;
78
  } elseif($method == "moip_tef"){
79
+ $onhold = $standard->getConfigData('order_status_holded_tef');
80
+ $details_cancel = "Prazo para pagamento excedido";
81
  } else {
82
+ $onhold = $standard->getConfigData('order_status_holded');
83
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
84
 
85
+ $order = Mage::getModel('sales/order')->load($mage_order);
86
+
87
+ if($order->getId()){
88
+ $order_status = $order->getStatus();
89
+ if($status_moip == "AUTHORIZED" && $order_status != Mage_Sales_Model_Order::STATE_COMPLETE && $order_status != Mage_Sales_Model_Order::STATE_PROCESSING && $order_status != Mage_Sales_Model_Order::STATE_CLOSED){
90
+ $upOrder = $this->autorizaPagamento($order);
91
+ return $upOrder;
92
+ } elseif($status_moip == "CANCELLED" && $order_status != Mage_Sales_Model_Order::STATE_COMPLETE && $order_status != Mage_Sales_Model_Order::STATE_PROCESSING && $order_status != Mage_Sales_Model_Order::STATE_CLOSED && $order_status != Mage_Sales_Model_Order::STATE_CANCELED){
93
+ $upOrder = $this->cancelaPagamento($order,$details_cancel);
94
+ return $upOrder;
95
+ } elseif($status_moip == "REFUNDED"){
96
+ return $this->refundPagamento($order, $refundToStoreCreditAmount, $comment);
97
+ } else{
98
+ die();
99
+ }
100
+ } else {
101
+ $api->generateLog($moip_order, 'Moip_OrderNaoLocalizada.log');
102
+ }
103
+ }
104
 
105
+ public function findOrderMage($moip_ord){
106
 
107
+
108
+ $result = Mage::getModel('transparente/write')->load(str_replace("ORD-", "",$moip_ord), 'moip_order');
109
+ if($result->getMagePay()){
110
+ return $result;
111
+ } else {
112
+ echo "aguarde...";
113
+ sleep(1);
114
+ $this->findOrderMage($moip_ord);
115
+ }
116
+
117
+
118
+
119
  }
120
+
121
+
122
  public function cancelAction() {
123
  $session = Mage::getSingleton('checkout/session');
124
  $session->setQuoteId($session->getTransparenteStandardQuoteId(true));
138
  }
139
 
140
 
141
+ public function autorizaPagamento($order){
 
 
 
142
  if($order->canUnhold()) {
143
  $order->unhold()->save();
144
+ }
 
145
  $invoice = $order->prepareInvoice();
146
  if ($this->getStandard()->canCapture())
147
  {
151
  $invoice->sendEmail();
152
  $invoice->setEmailSent(true);
153
  $invoice->save();
154
+ $this->getResponse()->setHeader('HTTP/1.0','200',true);
 
 
 
155
  }
156
 
157
+
158
+ public function cancelaPagamento($order, $details){
 
 
 
 
 
 
 
 
 
159
  if($order->canUnhold()) {
160
  $order->unhold()->save();
161
  }
168
  $order->setState($state, $status, $comment, $notified = true, $includeComment = true);
169
  $order->save();
170
  $order->sendOrderUpdateEmail(true, $comment);
171
+ $this->getResponse()->setHeader('HTTP/1.0','200',true);
172
+ return;
173
+ }
174
 
175
+ public function refundPagamento($order, $refundToStoreCreditAmount, $comment)
176
  {
177
 
178
  if (!$order->getId()) {
190
 
191
 
192
  if ($refundToStoreCreditAmount) {
 
193
  if ($order->getCustomerIsGuest()) {
194
  $this->_fault('cannot_refund_to_storecredit');
195
  }
203
  $refundToStoreCreditAmount = $creditmemo->getStore()->roundPrice(
204
  $refundToStoreCreditAmount*$order->getStoreToOrderRate()
205
  );
 
206
  $creditmemo->setBsCustomerBalTotalRefunded($refundToStoreCreditAmount);
 
207
  $creditmemo->setCustomerBalanceRefundFlag(true);
208
  }
209
  }
210
  $creditmemo->setPaymentRefundDisallowed(true)->register();
211
+ $creditmemo->addComment($comment, 1);
 
 
 
212
  try {
213
  Mage::getModel('core/resource_transaction')
214
  ->addObject($creditmemo)
220
  $this->_fault('data_invalid', $e->getMessage());
221
  }
222
  echo $creditmemo->getIncrementId();
 
 
 
223
  }
224
 
 
 
 
 
 
 
 
 
 
225
  public function buscaCepAction() {
226
  $data = $this->getRequest()->getParams();
 
227
  if ($data['meio'] == "cep") {
 
228
  $cep = $data['cep'];
229
  $cep = substr(preg_replace("/[^0-9]/", "", $cep) . '00000000', 0, 8);
230
  $url = "http://endereco.ecorreios.com.br/app/enderecoCep.php?cep={$cep}";
 
231
  $result = array();
232
  $ch = curl_init();
233
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
235
  curl_setopt($ch,CURLOPT_USERAGENT,'MoipMagento/2.0.0');
236
  $responseBody = curl_exec($ch);
237
  curl_close($ch);
 
 
238
  if($responseBody){
 
 
239
  $endereco = Mage::helper('core')->jsonDecode($responseBody);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
240
  switch ($endereco['uf']) {
241
  case "AC":
242
  $endereco['ufid'] = 485;
362
  curl_setopt($ch, CURLOPT_URL,$url);
363
  curl_setopt($ch, CURLOPT_POST, true);
364
  curl_setopt($ch, CURLOPT_POSTFIELDS, $json);
 
 
365
  curl_setopt($ch, CURLOPT_HTTPHEADER, array($header, $documento));
366
  curl_setopt($ch, CURLOPT_USERAGENT,'MoipMagento/2.0.0');
 
367
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
 
368
  $res = curl_exec($ch);
369
  $info = curl_getinfo($ch);
370
  curl_close($ch);
388
  if($responseBody['token']){
389
  echo "WebHooks configurado com sucesso.";
390
  }
391
+ Mage::app()->cleanCache();
392
  }
393
 
394
 
411
  echo "Configurações atuais foram apagadas. Por favor, repita o processo de instalação.";
412
  }
413
  }
 
414
 
415
+ public function OauthAction() {
416
+ $api = $this->getApi();
417
+ $standard = $this->getStandard();
418
  $data = $this->getRequest()->getParams();
419
+ $model = new Mage_Core_Model_Config();
420
+ $api->generateLog($data['validacao'], 'MOIP_Oauth.log');
421
+
422
+ $json_log = json_encode($data);
423
+ $api->generateLog($json_log, 'MOIP_Oauth.log');
424
+ if($data['validacao']== $standard->getConfigData('validador_retorno')){
425
+ $store_id = $data['store_id'];
 
 
 
 
426
 
427
+ if($data['store_id']){
428
+ $store_code = $data['store_id'];
429
  } else {
430
+ $store_code = 'default';
431
+ }
432
+ if (Mage::getSingleton('transparente/standard')->getConfigData('ambiente') == "teste") {
433
+ $oauth = $this->getOauthAcess($data['code']);
434
+ $oauth_decode = json_decode($oauth, true);
435
+ $api->generateLog($oauth_decode['accessToken'], 'MOIP_Oauth.log');
436
+ $model->saveConfig('payment/moip_transparente_standard/oauth_dev', $oauth_decode['accessToken'], 'default', 0);
437
+ $public_key = $this->getKeyPublic($oauth_decode['accessToken']);
438
+ $model->saveConfig('payment/moip_transparente_standard/publickey_dev', $public_key, 'default', 0);
439
+ } else {
440
+ $oauth = $this->getOauthAcess($data['code']);
441
+ $oauth_decode = json_decode($oauth, true);
442
+ $api->generateLog($oauth_decode['accessToken'], 'MOIP_Oauth.log');
443
+ $model->saveConfig('payment/moip_transparente_standard/oauth_prod', $oauth_decode['accessToken'], 'default', 0);
444
+ $public_key = $this->getKeyPublic($oauth_decode['accessToken']);
445
+ $model->saveConfig('payment/moip_transparente_standard/publickey_prod', $public_key, 'default', 0);
446
  }
447
+ Mage::getSingleton('core/session')->addSuccess('Configuração Concluída, por favor realize o seu teste.');
448
+ $url = "";
449
+ Mage::app()->getFrontController()->getResponse()->setRedirect(Mage::getUrl($url));
450
+ } else {
451
+ echo utf8_decode("rah rah rah... você não tem autorização para realizar pagamentos...");
452
+ }
453
+ Mage::app()->cleanCache();
454
+ }
455
 
456
+ public function getOauthAcess($code) {
457
+ $api = $this->getApi();
458
+ $documento = 'Content-Type: application/json; charset=utf-8';
459
+ $api->generateLog($code, 'MOIP_Oauth.log');
460
+ if (Mage::getSingleton('transparente/standard')->getConfigData('ambiente') == "teste") {
461
+ $url = "https://sandbox.moip.com.br/oauth/accesstoken";
462
+ $header = "Authorization: Basic " . base64_encode(MOIP_Transparente_Model_Api::TOKEN_TEST . ":" . MOIP_Transparente_Model_Api::KEY_TEST);
463
+ $array_json = array(
464
+ 'appId' => 'APP-9MUFQ39Y4CQU', //Alterar aqui tb....
465
+ 'appSecret' => '26xa86dbc7mhdyqq2w69vscvhz47cri', //Alterar aqui tb....
466
+ 'redirectUri' => 'http://moip.o2ti.com/magento/redirect/',
467
+ 'grantType' => 'authorization_code',
468
+ 'code' => $code
469
+ );
470
+ $json = json_encode($array_json);
471
+ }
472
+ else {
473
+ $url = "https://api.moip.com.br/oauth/accesstoken";
474
+ $header = "Authorization: Basic " . base64_encode(MOIP_Transparente_Model_Api::TOKEN_PROD . ":" . MOIP_Transparente_Model_Api::KEY_PROD);
475
+ $array_json = array(
476
+ 'appId' => 'APP-AKYBMMVU1FL1', //Alterar aqui tb....
477
+ 'appSecret' => 'db9pavx8542khvsyn3s0tpxyu2gom2m', //Alterar aqui tb....
478
+ 'redirectUri' => 'http://moip.o2ti.com/magento/redirect/',
479
+ 'grantType' => 'authorization_code',
480
+ 'code' => $code
481
+ );
482
+ $json = json_encode($array_json);
483
+ }
484
+ $result = array();
485
+ $ch = curl_init();
486
+ curl_setopt($ch, CURLOPT_URL,$url);
487
+ curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
488
+ curl_setopt($ch, CURLOPT_TIMEOUT, 6000);
489
+ curl_setopt($ch, CURLOPT_POST, true);
490
+ curl_setopt($ch, CURLOPT_POSTFIELDS, $json);
491
+ curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
492
+ curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
493
+ curl_setopt($ch, CURLOPT_HTTPHEADER, array($header, $documento));
494
+ curl_setopt($ch,CURLOPT_USERAGENT,'MoipMagento/2.0.0');
495
+ $res = curl_exec($ch);
496
+ curl_close($ch);
497
+ $api->generateLog($res, 'MOIP_Oauth.log');
498
+ return $res;
499
+ }
500
 
501
+ public function getKeyPublic($oauth) {
502
+ $api = $this->getApi();
503
+ $api->generateLog($oauth, 'MOIP_Oauth.log');
504
+ $documento = 'Content-Type: application/json; charset=utf-8';
505
+ if (Mage::getSingleton('transparente/standard')->getConfigData('ambiente') == "teste") {
506
+ $url = "https://sandbox.moip.com.br/v2/keys/";
507
+ $header = "Authorization: OAuth " . $oauth;
508
+ } else {
509
+ $url = "https://api.moip.com.br/v2/keys/";
510
+ $header = "Authorization: OAuth " . $oauth;
511
+ }
512
+ $result = array();
513
+ $ch = curl_init();
514
+ curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
515
+ curl_setopt($ch, CURLOPT_URL, $url);
516
+ curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
517
+ curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
518
+ curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
519
+ curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
520
+ curl_setopt($ch, CURLOPT_HTTPHEADER, array($header));
521
+ curl_setopt($ch,CURLOPT_USERAGENT,'MoipMagento/2.0.0');
522
+ $responseBody = curl_exec($ch);
523
+ curl_close($ch);
524
+ $api->generateLog($responseBody, 'MOIP_Oauth.log');
525
+ $responseBody = json_decode($responseBody, true);
526
+ $public_key = $responseBody['keys']['encryption'];
527
+ $api->generateLog($public_key, 'MOIP_Oauth.log');
528
+ return $public_key;
529
  }
530
 
531
  }
 
app/code/local/MOIP/Transparente/etc/system.xml CHANGED
@@ -6,17 +6,24 @@
6
  <moip_transparente_standard translate="label">
7
  <label><![CDATA[Moip Transparente - Configuração Inicial]]></label>
8
  <frontend_type>text</frontend_type>
9
- <frontend_model>MOIP_Transparente_Block_Adminhtml_System_Config_Form_Fieldset_Modules_Oauth</frontend_model>
10
  <sort_order>10000</sort_order>
11
  <show_in_default>1</show_in_default>
12
  <show_in_website>1</show_in_website>
13
  <show_in_store>1</show_in_store>
14
  <fields>
 
 
 
 
 
 
 
 
15
  <title_comunicacao translate="label">
16
- <label>Identificação e Ambiente</label>
17
-
18
  <frontend_model>transparente/adminhtml_system_config_form_fieldset_modules_header</frontend_model>
19
- <sort_order>0</sort_order>
20
  <show_in_default>1</show_in_default>
21
  <show_in_website>1</show_in_website>
22
  <show_in_store>1</show_in_store>
@@ -31,9 +38,10 @@
31
  <p>Ex. inválido: Nome Da Sua Loja 1313.</p>
32
  ]]>
33
  </comment>
34
- <validate>validate-alphanum</validate>
 
35
  <frontend_type>text</frontend_type>
36
- <sort_order>1</sort_order>
37
  <show_in_default>1</show_in_default>
38
  <show_in_website>1</show_in_website>
39
  <show_in_store>1</show_in_store>
@@ -41,11 +49,15 @@
41
 
42
  <ambiente translate="label">
43
  <label>Ambiente</label>
44
- <comment><![CDATA[Ambiente de teste pode ser usado pela MOIP.]]>
 
 
 
 
45
  </comment>
46
  <frontend_type>select</frontend_type>
47
  <source_model>MOIP_Transparente_Model_Source_Ambiente</source_model>
48
- <sort_order>2</sort_order>
49
  <show_in_default>1</show_in_default>
50
  <show_in_website>1</show_in_website>
51
  <show_in_store>1</show_in_store>
@@ -54,7 +66,7 @@
54
  <apelido translate="label">
55
  <label>Nome Fantasia da Loja</label>
56
  <frontend_type>text</frontend_type>
57
- <sort_order>3</sort_order>
58
  <show_in_default>1</show_in_default>
59
  <show_in_website>1</show_in_website>
60
  <show_in_store>1</show_in_store>
@@ -82,6 +94,7 @@
82
  <p>No entanto o pagamento ainda não foi processado ou válidado.</p>
83
  <p>Saiba mais <a href="https://youtu.be/qs9EBHFBptU">no video</a>.]]>
84
  </comment>
 
85
  <sort_order>11</sort_order>
86
  <show_in_default>1</show_in_default>
87
  <show_in_website>1</show_in_website>
@@ -91,6 +104,7 @@
91
  <order_status_holded translate="label">
92
  <label>Status em Análise</label>
93
  <frontend_type>select</frontend_type>
 
94
  <source_model>MOIP_Transparente_Model_Source_Holded</source_model>
95
  <comment><![CDATA[
96
  <p>Saiba mais <a href="https://youtu.be/qs9EBHFBptU">no video</a>.</p>
@@ -104,6 +118,7 @@
104
  <order_status_holded_boleto translate="label">
105
  <label>Status para Boleto em Aberto</label>
106
  <frontend_type>select</frontend_type>
 
107
  <source_model>MOIP_Transparente_Model_Source_Holded</source_model>
108
  <comment><![CDATA[
109
  <p>Saiba mais <a href="https://youtu.be/qs9EBHFBptU">no video</a>.</p>
@@ -117,6 +132,7 @@
117
  <order_status_holded_tef translate="label">
118
  <label>Status para Transferência em Aberto</label>
119
  <frontend_type>select</frontend_type>
 
120
  <source_model>MOIP_Transparente_Model_Source_Holded</source_model>
121
  <comment><![CDATA[
122
  <p>Saiba mais <a href="https://youtu.be/qs9EBHFBptU">no video</a>.</p>
@@ -580,14 +596,15 @@
580
  <show_in_website>1</show_in_website>
581
  <show_in_store>1</show_in_store>
582
  </vcmentoboleto>
583
- <sort_order>
584
- <label>Order de exibição no checkout:</label>
585
- <frontend_type>text</frontend_type>
 
586
  <sort_order>90</sort_order>
587
  <show_in_default>1</show_in_default>
588
  <show_in_website>1</show_in_website>
589
  <show_in_store>1</show_in_store>
590
- </sort_order>
591
  <min_order_total translate="label">
592
  <label>Minimum Order Total</label>
593
  <comment>O Moip não irá processar pagamentos abaixo de R$ 5.00</comment>
@@ -608,7 +625,7 @@
608
  <sort_order>
609
  <label>Order de exibição no checkout:</label>
610
  <frontend_type>text</frontend_type>
611
- <sort_order>90</sort_order>
612
  <show_in_default>1</show_in_default>
613
  <show_in_website>1</show_in_website>
614
  <show_in_store>1</show_in_store>
@@ -653,14 +670,15 @@
653
  <show_in_website>1</show_in_website>
654
  <show_in_store>1</show_in_store>
655
  </vcmentotef>
656
- <sort_order>
657
- <label>Order de exibição no checkout:</label>
658
- <frontend_type>text</frontend_type>
 
659
  <sort_order>90</sort_order>
660
  <show_in_default>1</show_in_default>
661
  <show_in_website>1</show_in_website>
662
  <show_in_store>1</show_in_store>
663
- </sort_order>
664
  <min_order_total translate="label">
665
  <label>Minimum Order Total</label>
666
  <comment>O Moip não irá processar pagamentos abaixo de R$ 5.00</comment>
@@ -681,7 +699,7 @@
681
  <sort_order>
682
  <label>Order de exibição no checkout:</label>
683
  <frontend_type>text</frontend_type>
684
- <sort_order>90</sort_order>
685
  <show_in_default>1</show_in_default>
686
  <show_in_website>1</show_in_website>
687
  <show_in_store>1</show_in_store>
@@ -839,6 +857,7 @@
839
  <order_status translate="label">
840
  <label>Status dos Pedidos Iniciados</label>
841
  <frontend_type>select</frontend_type>
 
842
  <source_model>adminhtml/system_config_source_order_status_new</source_model>
843
  <comment><![CDATA[
844
  <p>É o primeiro status de todo o pedido, ele signfica que foi recebida a ordem de compra.</p>
6
  <moip_transparente_standard translate="label">
7
  <label><![CDATA[Moip Transparente - Configuração Inicial]]></label>
8
  <frontend_type>text</frontend_type>
9
+
10
  <sort_order>10000</sort_order>
11
  <show_in_default>1</show_in_default>
12
  <show_in_website>1</show_in_website>
13
  <show_in_store>1</show_in_store>
14
  <fields>
15
+ <title_setup_moip>
16
+ <label>Instalação e Configuração</label>
17
+ <frontend_model>transparente/adminhtml_system_config_form_fieldset_modules_oauth</frontend_model>
18
+ <sort_order>0</sort_order>
19
+ <show_in_default>1</show_in_default>
20
+ <show_in_website>0</show_in_website>
21
+ <show_in_store>0</show_in_store>
22
+ </title_setup_moip>
23
  <title_comunicacao translate="label">
24
+ <label>Identificação e Escolha do Ambiente de transação</label>
 
25
  <frontend_model>transparente/adminhtml_system_config_form_fieldset_modules_header</frontend_model>
26
+ <sort_order>1</sort_order>
27
  <show_in_default>1</show_in_default>
28
  <show_in_website>1</show_in_website>
29
  <show_in_store>1</show_in_store>
38
  <p>Ex. inválido: Nome Da Sua Loja 1313.</p>
39
  ]]>
40
  </comment>
41
+ <tooltip><![CDATA[Isto é um código que irá compor algumas requisões para o módulo, siga as regras de validação para esse campo como descritas acima.]]></tooltip>
42
+ <validate>validate-alphanum required-entry</validate>
43
  <frontend_type>text</frontend_type>
44
+ <sort_order>2</sort_order>
45
  <show_in_default>1</show_in_default>
46
  <show_in_website>1</show_in_website>
47
  <show_in_store>1</show_in_store>
49
 
50
  <ambiente translate="label">
51
  <label>Ambiente</label>
52
+ <tooltip><![CDATA[Ambiente de teste exige outro login e senha diferente do ambiente de produção Moip. Caso queira usar o ambiente de teste você deferá criar uma conta.]]>
53
+ </tooltip>
54
+ <comment><![CDATA[
55
+ <p>Caso não conta tenha conta no Moip Sandbox (ambiente de teste Moip) e queira usar a função testes é necessário <a href="https://cadastro-sandbox.moip.com.br/">crie sua conta clicando aqui.</a></p>
56
+ ]]>
57
  </comment>
58
  <frontend_type>select</frontend_type>
59
  <source_model>MOIP_Transparente_Model_Source_Ambiente</source_model>
60
+ <sort_order>3</sort_order>
61
  <show_in_default>1</show_in_default>
62
  <show_in_website>1</show_in_website>
63
  <show_in_store>1</show_in_store>
66
  <apelido translate="label">
67
  <label>Nome Fantasia da Loja</label>
68
  <frontend_type>text</frontend_type>
69
+ <sort_order>4</sort_order>
70
  <show_in_default>1</show_in_default>
71
  <show_in_website>1</show_in_website>
72
  <show_in_store>1</show_in_store>
94
  <p>No entanto o pagamento ainda não foi processado ou válidado.</p>
95
  <p>Saiba mais <a href="https://youtu.be/qs9EBHFBptU">no video</a>.]]>
96
  </comment>
97
+ <validate>required-entry</validate>
98
  <sort_order>11</sort_order>
99
  <show_in_default>1</show_in_default>
100
  <show_in_website>1</show_in_website>
104
  <order_status_holded translate="label">
105
  <label>Status em Análise</label>
106
  <frontend_type>select</frontend_type>
107
+ <validate>required-entry</validate>
108
  <source_model>MOIP_Transparente_Model_Source_Holded</source_model>
109
  <comment><![CDATA[
110
  <p>Saiba mais <a href="https://youtu.be/qs9EBHFBptU">no video</a>.</p>
118
  <order_status_holded_boleto translate="label">
119
  <label>Status para Boleto em Aberto</label>
120
  <frontend_type>select</frontend_type>
121
+ <validate>required-entry</validate>
122
  <source_model>MOIP_Transparente_Model_Source_Holded</source_model>
123
  <comment><![CDATA[
124
  <p>Saiba mais <a href="https://youtu.be/qs9EBHFBptU">no video</a>.</p>
132
  <order_status_holded_tef translate="label">
133
  <label>Status para Transferência em Aberto</label>
134
  <frontend_type>select</frontend_type>
135
+ <validate>required-entry</validate>
136
  <source_model>MOIP_Transparente_Model_Source_Holded</source_model>
137
  <comment><![CDATA[
138
  <p>Saiba mais <a href="https://youtu.be/qs9EBHFBptU">no video</a>.</p>
596
  <show_in_website>1</show_in_website>
597
  <show_in_store>1</show_in_store>
598
  </vcmentoboleto>
599
+ <title_regra_magento translate="label">
600
+ <label>Definição regras convencionais do Magento</label>
601
+
602
+ <frontend_model>transparente/adminhtml_system_config_form_fieldset_modules_header</frontend_model>
603
  <sort_order>90</sort_order>
604
  <show_in_default>1</show_in_default>
605
  <show_in_website>1</show_in_website>
606
  <show_in_store>1</show_in_store>
607
+ </title_regra_magento>
608
  <min_order_total translate="label">
609
  <label>Minimum Order Total</label>
610
  <comment>O Moip não irá processar pagamentos abaixo de R$ 5.00</comment>
625
  <sort_order>
626
  <label>Order de exibição no checkout:</label>
627
  <frontend_type>text</frontend_type>
628
+ <sort_order>112</sort_order>
629
  <show_in_default>1</show_in_default>
630
  <show_in_website>1</show_in_website>
631
  <show_in_store>1</show_in_store>
670
  <show_in_website>1</show_in_website>
671
  <show_in_store>1</show_in_store>
672
  </vcmentotef>
673
+ <title_regra_magento translate="label">
674
+ <label>Definição regras convencionais do Magento</label>
675
+
676
+ <frontend_model>transparente/adminhtml_system_config_form_fieldset_modules_header</frontend_model>
677
  <sort_order>90</sort_order>
678
  <show_in_default>1</show_in_default>
679
  <show_in_website>1</show_in_website>
680
  <show_in_store>1</show_in_store>
681
+ </title_regra_magento>
682
  <min_order_total translate="label">
683
  <label>Minimum Order Total</label>
684
  <comment>O Moip não irá processar pagamentos abaixo de R$ 5.00</comment>
699
  <sort_order>
700
  <label>Order de exibição no checkout:</label>
701
  <frontend_type>text</frontend_type>
702
+ <sort_order>112</sort_order>
703
  <show_in_default>1</show_in_default>
704
  <show_in_website>1</show_in_website>
705
  <show_in_store>1</show_in_store>
857
  <order_status translate="label">
858
  <label>Status dos Pedidos Iniciados</label>
859
  <frontend_type>select</frontend_type>
860
+ <validate>required-entry</validate>
861
  <source_model>adminhtml/system_config_source_order_status_new</source_model>
862
  <comment><![CDATA[
863
  <p>É o primeiro status de todo o pedido, ele signfica que foi recebida a ordem de compra.</p>
app/design/frontend/base/default/layout/moip_transparente.xml CHANGED
@@ -276,9 +276,9 @@
276
  </reference>
277
  <reference name="checkout.success">
278
  <block type="MOIP_Transparente_Block_Standard_Moip" name="transparente.comum" template="MOIP/transparente/checkout/success/moip.phtml">
279
- <block type="MOIP_Transparente_Block_Standard_Moip" name="transparente.transferencia" template="MOIP/transparente/checkout/success/method/transferencia.phtml"></block>
280
- <block type="MOIP_Transparente_Block_Standard_Moip" name="transparente.boleto" template="MOIP/transparente/checkout/success/method/boleto.phtml"></block>
281
- <block type="MOIP_Transparente_Block_Standard_Moip" name="transparente.cartao" template="MOIP/transparente/checkout/success/method/cartao.phtml"></block>
282
  <block type="MOIP_Transparente_Block_Standard_Details" name="success.order.details" as="details" template="MOIP/transparente/checkout/success/details.phtml">
283
  <action method="addItemRender"><type>default</type><block>sales/order_item_renderer_default</block><template>MOIP/transparente/checkout/sales/order/items/renderer/default.phtml</template></action>
284
  <action method="addItemRender"><type>grouped</type><block>sales/order_item_renderer_grouped</block><template>MOIP/transparente/checkout/sales/order/items/renderer/default.phtml</template></action>
276
  </reference>
277
  <reference name="checkout.success">
278
  <block type="MOIP_Transparente_Block_Standard_Moip" name="transparente.comum" template="MOIP/transparente/checkout/success/moip.phtml">
279
+ <block type="MOIP_Transparente_Block_Standard_Method_Boleto" name="transparente.boleto" template="MOIP/transparente/checkout/success/method/boleto.phtml" />
280
+ <block type="MOIP_Transparente_Block_Standard_Method_Cc" name="transparente.cartao" template="MOIP/transparente/checkout/success/method/cartao.phtml" />
281
+ <block type="MOIP_Transparente_Block_Standard_Method_Tef" name="transparente.transferencia" template="MOIP/transparente/checkout/success/method/transferencia.phtml" />
282
  <block type="MOIP_Transparente_Block_Standard_Details" name="success.order.details" as="details" template="MOIP/transparente/checkout/success/details.phtml">
283
  <action method="addItemRender"><type>default</type><block>sales/order_item_renderer_default</block><template>MOIP/transparente/checkout/sales/order/items/renderer/default.phtml</template></action>
284
  <action method="addItemRender"><type>grouped</type><block>sales/order_item_renderer_grouped</block><template>MOIP/transparente/checkout/sales/order/items/renderer/default.phtml</template></action>
app/design/frontend/base/default/template/MOIP/onestepcheckout/cadastro/billing/billingform.phtml CHANGED
@@ -94,7 +94,7 @@
94
  <div class="field">
95
  <label for="billing:telephone" class="required">Telefone</label>
96
  <div class="input-box">
97
- <input autocomplete="off" type="text" name="billing[telephone]" value="<?php echo $this->htmlEscape($this->getAddress()->getTelephone()) ?>" title="Telefone" class="input-text validate-tel-national required-entry" id="billing:telephone" placeholder="Telefone">
98
  <script type="text/javascript">
99
  //<![CDATA[
100
  Validation.add('validate-tel-national', 'Entre com telefone válido: (99)9999-?9999', function(v) {
@@ -107,7 +107,7 @@
107
  <div class="field">
108
  <label for="billing:telephone" class="required">Celular</label>
109
  <div class="input-box">
110
- <input autocomplete="off" type="text" name="billing[fax]" value="<?php echo $this->htmlEscape($this->getAddress()->getFax()) ?>" title="Celular" class="input-text validate-cel-national input-text" id="billing:fax" placeholder="Celular">
111
  <script type="text/javascript">
112
  //<![CDATA[
113
  Validation.add('validate-cel-national', 'Entre com telefone válido: (99)9999-?9999', function(v) {
@@ -170,7 +170,7 @@
170
 
171
  <label for="billing:postcode" class="required">CEP</label>
172
  <div class="input-box">
173
- <input autocomplete="off" type="text" title="CEP" name="billing[postcode]" id="billing:postcode" value="<?php echo $this->htmlEscape($this->getAddress()->getPostcode()) ?>" class="input-text validate-zip-international required-entry moipzip" onchange="javascript: buscarEndereco('billing');" style="width: 100px;" placeholder="CEP">
174
  </div>
175
  <script type="text/javascript">
176
  //<![CDATA[
@@ -196,7 +196,7 @@
196
  <div class="field <?php echo $state_cep ?>">
197
  <label for="billing:street2" class="required">Número</label>
198
  <div class="input-box">
199
- <input autocomplete="off" type="text" title="Número" name="billing[street][1]" id="billing:street2" value="<?php echo $this->htmlEscape($this->getAddress()->getStreet(2)) ?>" class="input-text required-entry validate-length minimum-length-1 maximum-length-5" placeholder="Número">
200
  </div>
201
  </div>
202
  <div class="field <?php echo $state_cep ?>">
94
  <div class="field">
95
  <label for="billing:telephone" class="required">Telefone</label>
96
  <div class="input-box">
97
+ <input autocomplete="off" type="tel" name="billing[telephone]" value="<?php echo $this->htmlEscape($this->getAddress()->getTelephone()) ?>" title="Telefone" class="input-text validate-tel-national required-entry" id="billing:telephone" placeholder="Telefone">
98
  <script type="text/javascript">
99
  //<![CDATA[
100
  Validation.add('validate-tel-national', 'Entre com telefone válido: (99)9999-?9999', function(v) {
107
  <div class="field">
108
  <label for="billing:telephone" class="required">Celular</label>
109
  <div class="input-box">
110
+ <input autocomplete="off" type="tel" name="billing[fax]" value="<?php echo $this->htmlEscape($this->getAddress()->getFax()) ?>" title="Celular" class="input-text validate-cel-national input-text" id="billing:fax" placeholder="Celular">
111
  <script type="text/javascript">
112
  //<![CDATA[
113
  Validation.add('validate-cel-national', 'Entre com telefone válido: (99)9999-?9999', function(v) {
170
 
171
  <label for="billing:postcode" class="required">CEP</label>
172
  <div class="input-box">
173
+ <input autocomplete="off" type="tel" title="CEP" name="billing[postcode]" id="billing:postcode" value="<?php echo $this->htmlEscape($this->getAddress()->getPostcode()) ?>" class="input-text validate-zip-international required-entry moipzip" onchange="javascript: buscarEndereco('billing');" style="width: 100px;" placeholder="CEP">
174
  </div>
175
  <script type="text/javascript">
176
  //<![CDATA[
196
  <div class="field <?php echo $state_cep ?>">
197
  <label for="billing:street2" class="required">Número</label>
198
  <div class="input-box">
199
+ <input autocomplete="off" type="tel" title="Número" name="billing[street][1]" id="billing:street2" value="<?php echo $this->htmlEscape($this->getAddress()->getStreet(2)) ?>" class="input-text required-entry validate-length minimum-length-1 maximum-length-5" placeholder="Número">
200
  </div>
201
  </div>
202
  <div class="field <?php echo $state_cep ?>">
app/design/frontend/base/default/template/MOIP/onestepcheckout/daskboard/onepage/billing/billingform.phtml CHANGED
@@ -133,7 +133,7 @@
133
  <div class="field">
134
  <label for="billing:telephone" class="required"><em>*</em>Telefone</label>
135
  <div class="input-box">
136
- <input autocomplete="off" type="text" name="billing[telephone]" value="<?php echo $this->htmlEscape($this->getAddress()->getTelephone()) ?>" title="Telefone" class="input-text validate-tel-national required-entry" id="billing:telephone" placeholder="Telefone">
137
  <script type="text/javascript">
138
  //<![CDATA[
139
  Validation.add('validate-tel-national', 'Entre com telefone válido: (99)9999-?9999', function(v) {
@@ -146,7 +146,7 @@
146
  <div class="field">
147
  <label for="billing:telephone" class="required"><em>*</em>Celular</label>
148
  <div class="input-box">
149
- <input autocomplete="off" type="text" name="billing[fax]" value="<?php echo $this->htmlEscape($this->getAddress()->getFax()) ?>" title="Celular" class="input-text validate-cel-national input-text" id="billing:fax" placeholder="Celular">
150
  <script type="text/javascript">
151
  //<![CDATA[
152
  Validation.add('validate-cel-national', 'Entre com telefone válido: (99)9999-?9999', function(v) {
@@ -178,7 +178,7 @@
178
 
179
  <label for="billing:postcode" class="required"><em>*</em>CEP</label>
180
  <div class="input-box">
181
- <input autocomplete="off" type="text" title="CEP" name="billing[postcode]" id="billing:postcode" value="<?php echo $this->htmlEscape($this->getAddress()->getPostcode()) ?>" class="input-text validate-zip-international required-entry moipzip" onchange="javascript: buscarEndereco('billing');" style="width: 100px;" placeholder="CEP">
182
  </div>
183
  <script type="text/javascript">
184
  //<![CDATA[
133
  <div class="field">
134
  <label for="billing:telephone" class="required"><em>*</em>Telefone</label>
135
  <div class="input-box">
136
+ <input autocomplete="off" type="tel" name="billing[telephone]" value="<?php echo $this->htmlEscape($this->getAddress()->getTelephone()) ?>" title="Telefone" class="input-text validate-tel-national required-entry" id="billing:telephone" placeholder="Telefone">
137
  <script type="text/javascript">
138
  //<![CDATA[
139
  Validation.add('validate-tel-national', 'Entre com telefone válido: (99)9999-?9999', function(v) {
146
  <div class="field">
147
  <label for="billing:telephone" class="required"><em>*</em>Celular</label>
148
  <div class="input-box">
149
+ <input autocomplete="off" type="tel" name="billing[fax]" value="<?php echo $this->htmlEscape($this->getAddress()->getFax()) ?>" title="Celular" class="input-text validate-cel-national input-text" id="billing:fax" placeholder="Celular">
150
  <script type="text/javascript">
151
  //<![CDATA[
152
  Validation.add('validate-cel-national', 'Entre com telefone válido: (99)9999-?9999', function(v) {
178
 
179
  <label for="billing:postcode" class="required"><em>*</em>CEP</label>
180
  <div class="input-box">
181
+ <input autocomplete="off" type="tel" title="CEP" name="billing[postcode]" id="billing:postcode" value="<?php echo $this->htmlEscape($this->getAddress()->getPostcode()) ?>" class="input-text validate-zip-international required-entry moipzip" onchange="javascript: buscarEndereco('billing');" style="width: 100px;" placeholder="CEP">
182
  </div>
183
  <script type="text/javascript">
184
  //<![CDATA[
app/design/frontend/base/default/template/MOIP/transparente/form/cc.phtml CHANGED
@@ -81,17 +81,11 @@
81
  <li class="HP">Hipper</li>
82
  </ul>
83
  </li>
84
- <li class="wide">
85
- <label for="<?php echo $_code ?>_fullname" class="required"><?php echo $this->__('Nome do Impresso Cartão') ?></label>
86
- <div class="input-box">
87
- <input type="text" name="payment[<?php echo $_code ?>_owner]" value="" class="input-text required-entry" title="Nome Impresso em seu Cartão" id="credito_portador_nome" placeholder="Nome Impresso no Cartão">
88
-
89
- </div>
90
- </li>
91
  <li class="fields card-number">
92
  <label for="<?php echo $_code ?>_number" class="required"><?php echo $this->__('Número do Cartão') ?></label>
93
  <div class="input-box">
94
- <input type="text" id="<?php echo $_code ?>_number" pattern="\d*" title="Número do seu Cartão de Crédito" class="required-entry input-text" placeholder="Número do Cartão" value="">
95
  </div>
96
  </li>
97
 
@@ -99,7 +93,10 @@
99
  <label for="<?php echo $_code ?>_cid" class="required"><?php echo $this->__('Cod. de Segurança') ?></label>
100
  <div class="input-box">
101
  <div class="v-fix">
102
- <input type="text" pattern="\d*" title="Código de Seguranção do Seu Cartão" class="input-text cvv validate-length minimum-length-3 maximum-length-4 required-entry" id="<?php echo $_code ?>_cid" placeholder="CVV" value=""><a href="#" class="cvv-what-is-this">?</a>
 
 
 
103
  </div>
104
 
105
  </div>
@@ -164,6 +161,14 @@
164
  </select>
165
  </div>
166
  </li>
 
 
 
 
 
 
 
 
167
  <li class="wide">
168
  <label><input type="checkbox" name="payment[<?php echo $_code ?>_personal_info]" id="personal-card-info-control" title="Você é o Titular do Cartão" value="0" class=" validate-number input-checkbox" checked>Sou o Titular do Cartão</label>
169
  </li>
@@ -174,12 +179,15 @@
174
  <input type="text" name="payment[<?php echo $_code ?>_taxdocument]" value="<?php echo $this->getDateCard('taxvat') ?>" class="input-text required-entry" title="CPF do Titular de seu Cartão" id="credito_portador_cpf" placeholder="CPF do Titular do Cartão" >
175
  </div>
176
  </li>
 
 
177
 
178
 
179
 
180
  <li class="wide">
181
  <label>
182
- <input type="checkbox" name="payment[<?php echo $_code ?>_save_card]" title="Salvar Cartão Para Próximas Compras?" value="" class=" validate-number input-checkbox save-card" > Salvar Cartão</label>
 
183
  </li>
184
 
185
 
@@ -200,21 +208,24 @@
200
  <?php endif; ?>
201
  </ul>
202
  <script type="text/javascript">
203
- //<![CDATA[
204
 
205
  jQuery(document).ready(function(){
206
  MoipPagamentosCc();
 
 
207
  });
208
 
209
- //]]>
 
210
  </script>
211
  <?php $cofre = $this->getCofre(); ?>
212
  <?php if($cofre != "false"): ?>
213
  <script type="text/javascript">
214
- //<![CDATA[
215
  jQuery(document).ready(function(){
216
  SetCofre();
217
  });
218
- //]]>
219
  </script>
220
  <?php endif; ?>
81
  <li class="HP">Hipper</li>
82
  </ul>
83
  </li>
84
+
 
 
 
 
 
 
85
  <li class="fields card-number">
86
  <label for="<?php echo $_code ?>_number" class="required"><?php echo $this->__('Número do Cartão') ?></label>
87
  <div class="input-box">
88
+ <input type="tel" pattern="[0-9]*" maxlength="19" minlength="14" id="<?php echo $_code ?>_number" title="Número do seu Cartão de Crédito" class="required-entry input-text validate-number validate-length minimum-length-14 maximum-length-19" placeholder="Número do Cartão" value="">
89
  </div>
90
  </li>
91
 
93
  <label for="<?php echo $_code ?>_cid" class="required"><?php echo $this->__('Cod. de Segurança') ?></label>
94
  <div class="input-box">
95
  <div class="v-fix">
96
+ <input type="tel" pattern="[0-9]*" pattern="\d*" title="Código de Seguranção do Seu Cartão" class="input-text cvv validate-length minimum-length-3 maximum-length-4 required-entry" id="<?php echo $_code ?>_cid" placeholder="CVV" value="" maxlength="4" minlength="3">
97
+ </div>
98
+ <div class="v-fix">
99
+ <a href="javascript:void(0)" title="Código de segurança" data-toggle="popover" data-placement="top" data-content="O CVV é o código de segurança do seu cartão, ele fica localizado na parte de trás do seu cartão, é um número de 3 dígitos."><i class="fa fa-question-circle" aria-hidden="true"></i></a>
100
  </div>
101
 
102
  </div>
161
  </select>
162
  </div>
163
  </li>
164
+ <div class="bg-destaque">
165
+ <li class="wide">
166
+ <label for="<?php echo $_code ?>_fullname" class="required"><?php echo $this->__('Nome Impresso no Cartão') ?></label>
167
+ <div class="input-box">
168
+ <input type="numero" name="payment[<?php echo $_code ?>_owner]" value="" class="input-text required-entry" title="Nome Impresso em seu Cartão" id="credito_portador_nome" placeholder="Nome Impresso no Cartão">
169
+
170
+ </div>
171
+ </li>
172
  <li class="wide">
173
  <label><input type="checkbox" name="payment[<?php echo $_code ?>_personal_info]" id="personal-card-info-control" title="Você é o Titular do Cartão" value="0" class=" validate-number input-checkbox" checked>Sou o Titular do Cartão</label>
174
  </li>
179
  <input type="text" name="payment[<?php echo $_code ?>_taxdocument]" value="<?php echo $this->getDateCard('taxvat') ?>" class="input-text required-entry" title="CPF do Titular de seu Cartão" id="credito_portador_cpf" placeholder="CPF do Titular do Cartão" >
180
  </div>
181
  </li>
182
+ </div>
183
+
184
 
185
 
186
 
187
  <li class="wide">
188
  <label>
189
+ <input type="checkbox" name="payment[<?php echo $_code ?>_save_card]" title="Salvar Cartão Para Próximas Compras?" value="" class=" validate-number input-checkbox save-card" > Salvar cartão para agilizar futuras compras </label><span> <a href="javascript:void(0)" title="Compra com 1 Clique" data-toggle="popover" data-placement="top" data-content=" Não salvaremos os dados de seu cartão. Para agilizar as próximas compras, apenas pegaremos uma autorização de sua operadora de cartão para você comprar passando somente o código de segurança do cartão."> &nbsp; <i class="fa fa-question-circle" aria-hidden="true"></i>
190
+ </a></span>
191
  </li>
192
 
193
 
208
  <?php endif; ?>
209
  </ul>
210
  <script type="text/javascript">
211
+
212
 
213
  jQuery(document).ready(function(){
214
  MoipPagamentosCc();
215
+
216
+
217
  });
218
 
219
+
220
+
221
  </script>
222
  <?php $cofre = $this->getCofre(); ?>
223
  <?php if($cofre != "false"): ?>
224
  <script type="text/javascript">
225
+
226
  jQuery(document).ready(function(){
227
  SetCofre();
228
  });
229
+
230
  </script>
231
  <?php endif; ?>
app/design/frontend/base/default/template/MOIP/transparente/info/boleto.phtml CHANGED
@@ -7,7 +7,16 @@
7
  <p><input type="text" value="<?php echo $info['moip_linecode_boleto'] ?>" readonly="disable" style="max-width: 200px; white-space: nowrap;overflow: hidden;text-overflow: ellipsis;"></p>
8
  <p>Vencimento: <?php echo date('d-m-Y', strtotime($info['moip_expiration_boleto'])) ?></p>
9
  </div>
 
 
 
 
 
 
 
 
 
10
  <?php else: ?>
11
- Pagamento via Boleto
12
  <?php endif; ?>
13
 
7
  <p><input type="text" value="<?php echo $info['moip_linecode_boleto'] ?>" readonly="disable" style="max-width: 200px; white-space: nowrap;overflow: hidden;text-overflow: ellipsis;"></p>
8
  <p>Vencimento: <?php echo date('d-m-Y', strtotime($info['moip_expiration_boleto'])) ?></p>
9
  </div>
10
+ <?php elseif( Mage::app()->getRequest()->getActionName() == "success"): ?>
11
+ <?php $info = $this->_prepareInfo(); ?>
12
+ <div class="box-content">
13
+ <p><?php echo $this->escapeHtml($this->getMethod()->getTitle()) ?></p>
14
+ <p><a class="button btn-checkout btn-default" title="Finalizar compra" href="<?php echo $info['moip_href_boleto'] ?>" target="_blank" style="max-width: 200px;">Imprimir Boleto</a></p>
15
+ <p>Código de Barras</p>
16
+ <p><input type="text" value="<?php echo $info['moip_linecode_boleto'] ?>" readonly="disable" style="max-width: 200px; white-space: nowrap;overflow: hidden;text-overflow: ellipsis;"></p>
17
+ <p>Vencimento: <?php echo $info['moip_expiration_boleto']; ?></p>
18
+ </div>
19
  <?php else: ?>
20
+ <p><?php echo $this->escapeHtml($this->getMethod()->getTitle()) ?></p>
21
  <?php endif; ?>
22
 
app/design/frontend/base/default/template/MOIP/transparente/info/tef.phtml CHANGED
@@ -2,8 +2,12 @@
2
  <?php $info = $this->_prepareInfo(); ?>
3
  <div class="box-content">
4
  <p><?php echo $this->escapeHtml($this->getMethod()->getTitle()) ?></p>
5
- <p><a class="button btn-checkout btn-default" title="Finalizar compra" href="<?php echo $info['moip_href_trans'] ?>" target="_blank">Ir Ao banco</a></p>
6
  </div>
 
 
 
 
7
  <?php else: ?>
8
  Pagamento via Transf. Eletrônica
9
  <?php endif; ?>
2
  <?php $info = $this->_prepareInfo(); ?>
3
  <div class="box-content">
4
  <p><?php echo $this->escapeHtml($this->getMethod()->getTitle()) ?></p>
5
+ <p><a class="button btn-checkout btn-default" title="Finalizar compra" href="<?php echo $info['moip_href_trans'] ?>" target="_blank">Pagar agora</a></p>
6
  </div>
7
+ <?php elseif( Mage::app()->getRequest()->getActionName() == "success"): ?>
8
+ <?php $info = $this->_prepareInfo(); ?>
9
+ <?php var_dump($info) ?>
10
+ <p><a class="button btn-checkout btn-default" title="Finalizar compra" href="<?php echo $info['moip_href_trans'] ?>" target="_blank">Pagar agora</a></p>
11
  <?php else: ?>
12
  Pagamento via Transf. Eletrônica
13
  <?php endif; ?>
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>o2ti_moip</name>
4
- <version>2.0.2</version>
5
  <stability>stable</stability>
6
  <license uri="http://moip.com/licensa_checkout_transparente.txt">Exclusivo para clientes Moip Pagamentos S/A</license>
7
  <channel>community</channel>
@@ -13,11 +13,12 @@ Solu&#xE7;&#xE3;o integrada para vendas via moip. gratuito e exclusivo para clie
13
  &#xD;
14
  &#xD;
15
  </description>
16
- <notes>Ajuste na ACL para Evento Consultar Status no Moip</notes>
 
17
  <authors><author><name>MOIP</name><user>moip</user><email>contato@o2ti.com</email></author></authors>
18
- <date>2016-07-11</date>
19
- <time>20:28:21</time>
20
- <contents><target name="magelocal"><dir name="MOIP"><dir name="All"><dir name="Helper"><file name="Data.php" hash="10b776758585cb50355c0d6d0a5fdd5b"/></dir><dir name="etc"><file name="config.xml" hash="f6612823c717080d755692bfa97f6e2f"/><file name="system.xml" hash="825545991621cd6e0fc34a19476d78cc"/></dir></dir><dir name="Onestepcheckout"><dir name="Block"><dir name="Adminhtml"><dir name="Onestepcheckout"><dir name="Sales"><dir name="Order"><dir name="View"><dir name="Tab"><dir name="Info"><file name="Customermessages.php" hash="ddb3c364bb288b2e48f5ca20dbaf262b"/></dir></dir></dir></dir></dir></dir><dir name="System"><dir name="Config"><file name="Editor.php" hash="620ffe2b11d51c059aae85d069d17dd9"/></dir></dir></dir><dir name="Checkout"><dir name="Cart"><file name="Promotion.php" hash="40ade64028b400796d0fb77060703370"/></dir><dir name="Onepage"><dir name="Billing"><file name="Sortbilling.php" hash="aac00cf619be021d627bc6d6e0632247"/></dir><file name="Billing.php" hash="c41241da962110ee7bca3c7656148bde"/><dir name="Review"><file name="Info.php" hash="8585d5415e0589c9ffc53c160921cdb0"/><file name="Options.php" hash="7e3a4f53f4d687536ae3ff80728c0cc4"/></dir><file name="Shipping.php" hash="40b5b13c8408bac25d7eb45f6ddbdc86"/></dir></dir><file name="Onestepcheckout.php" hash="f6a3bc3e394fbadd34985586f71ee782"/></dir><dir name="Helper"><file name="Data.php" hash="5c19376368e6b2f744b448f0012f693e"/></dir><dir name="Model"><dir name="Customer"><file name="Customer.php" hash="f038378053e082fea387c16056624540"/></dir><dir name="Mysql4"><dir name="Onestepcheckout"><file name="Collection.php" hash="cb452401f753d3cd63196488d2985e09"/></dir><file name="Onestepcheckout.php" hash="370e27b4bdd3d450fff995f94bc74ad3"/></dir><file name="Observer.php" hash="e8b37e9fb11cf2f47eb61d1629927ed1"/><file name="Onestepcheckout.php" hash="90db8eeb14fc762e79098edfac0684f8"/><dir name="Sales"><dir name="Quote"><file name="Address.php" hash="904bdc6b5836ccdbb91810dba55b4a4b"/></dir></dir><file name="Status.php" hash="cd2132bb22a1992e6ea762586391733b"/><dir name="System"><dir name="Config"><dir name="Source"><file name="Checkuncheck.php" hash="febcb4b243d5e09ae7b77d603af45d63"/><file name="Disablefield.php" hash="196dcdb92863dbe110a8edc0be4cf953"/><file name="Optionaddfield.php" hash="574f6f8d27245ab4f0d0362372f5082d"/><file name="Optionhidefield.php" hash="0cf65ef82933d93293eaada3125c3b1d"/><file name="Pagelayout.php" hash="b6ca9f9394e84806aecc39f5e62c11d5"/><dir name="Payment"><file name="Allowedmethods.php" hash="d1f4b5a2e79f2f9378fb58a88ce2732b"/></dir><file name="Subscribenewletter.php" hash="a4c99e4f5417aa1b6d42364f4c83258c"/></dir></dir></dir></dir><dir name="controllers"><file name="IndexController.php" hash="84956d00de1473ad3bf4a9098a037d46"/><file name="OrderController.php" hash="67f444751f3bc90bf9a4eca8e5e16c02"/><file name="TestController.php" hash="0ee82be0e1607d92fb4afa2bc6886b57"/></dir><dir name="etc"><file name="config.xml" hash="65ff724e6fe0f2e4125c9fb83afa3915"/><file name="system.xml" hash="494ffb0859c8616f2afc0002d2ab3e12"/></dir><dir name="sql"><dir name="moip_onestepcheckout_setup"><file name="mysql4-install-0.1.0.php" hash="31ccf46f0461f0c69d6af5962f69f4df"/><file name="mysql4-upgrade-0.1.0-0.2.0.php" hash="d41d8cd98f00b204e9800998ecf8427e"/></dir></dir></dir><dir name="Transparente"><dir name="Block"><dir name="Adminhtml"><dir name="Info"><file name="Boleto.php" hash="8839b160428c9bbe482c79a9637e9889"/><file name="Cc.php" hash="2e457a673e02024472f8145201cfb519"/><file name="Tef.php" hash="aaf85a2846426db34534c56eacbe3f01"/></dir><dir name="Sales"><dir name="Order"><dir name="Create"><dir name="Totals"><file name="Fee.php" hash="ff5c32dc11ba021ce5a08feece2c95c8"/></dir></dir></dir></dir><dir name="System"><dir name="Config"><dir name="Form"><dir name="Fieldset"><dir name="Modules"><file name="Header.php" hash="b0fd3aa33c52191c41a486f3077f3564"/><file name="Oauth.php" hash="0d7425a67467f24348edb88a15fef4ea"/><file name="Reset.php" hash="66b629c16de08ffaf1826df704ff3158"/></dir></dir></dir></dir></dir><dir name="moip"><dir name="Info"><file name="Boleto.php" hash="65cc077e82ff199700a2741ff9e4d128"/><file name="Cc.php" hash="386ec65663d683c611a6f53d7e90365d"/><file name="Info.php" hash="d41d8cd98f00b204e9800998ecf8427e"/><file name="Tef.php" hash="c93516fb7d7e308c1e09d9583164b17b"/></dir></dir></dir><dir name="Checkout"><dir name="Totals"><file name="Fee.php" hash="77b13900da5c1fbda76bc59d12c50c58"/></dir></dir><dir name="Form"><file name="Admin.php" hash="8e14d3f9688bb9276b289749ac103876"/><file name="Boleto.php" hash="838b429eb4963a6946570836cf248475"/><file name="Cc.php" hash="bf49ad37ddfd9c68c705ca0ed4b41072"/><file name="Recurring.php" hash="3b05247c93000b5348f48a0924d916e9"/><file name="Tef.php" hash="ddbe5dfafbdcb22ec9d4fb901452f879"/></dir><dir name="Info"><file name="Admin.php" hash="d9f032feed4a4b8a4cd2ba920556ddee"/><file name="Boleto.php" hash="65cc077e82ff199700a2741ff9e4d128"/><file name="Boletorecurring.php" hash="3c2cefde47b7fd19361402dd8330c9f7"/><file name="Cc.php" hash="1a10028a49805b73db3a621a8171e605"/><file name="Tef.php" hash="c93516fb7d7e308c1e09d9583164b17b"/></dir><dir name="Onclick"><file name="Button.php" hash="2f1b70163cae117458228219cd37b790"/><file name="MoipOnclick.php" hash="ed325429be5a897762b89e860064e6bd"/><file name="PaymentMethod.php" hash="ab03241a3dc85f8537df83e5e294d385"/><file name="ShippingAddress.php" hash="bd069a1a705a60688fed1184ac84e76f"/><file name="ShippingMethods.php" hash="3084994424c4adcc12e700ad3f5c1226"/><file name="UpdateParcelas.php" hash="e5eb7e7ac75fbfcc8fc369e95ad3811a"/></dir><dir name="Product"><dir name="List"><file name="Parcelas.php" hash="df5d74cbf099971722dede2e279afc6c"/></dir><file name="List.php" hash="881a94bac6f0dfd100c39c1416c54b07"/><dir name="View"><file name="Discount.php" hash="e6b117d907f624e50b63594435f208e9"/><file name="Parcelas.php" hash="1b2c92b9e10da86523341cdb1e4bb4a7"/></dir><file name="View.php" hash="54f00539a0ce45c0aecdbd05d3a0323d"/></dir><dir name="Sales"><dir name="Order"><file name="Fee.php" hash="cef1608deab17b77a7351be6666ecf47"/><file name="Grid.php" hash="f62513609fae2fa70206c81b79349ed6"/></dir></dir><dir name="Standard"><file name="Cancel.php" hash="e7ebf3cdb13dcb613a57c28c05786db5"/><file name="CartSave.php" hash="12122d801ff6b8be4e1011bb5b0a2fac"/><file name="Details.php" hash="469e5a429afa6d24c079f8ca496049a0"/><file name="Form.php" hash="f3e3e6eb00a562c2c9d9982002d919b9"/><file name="Info.php" hash="c8b5f6584a4f9509465543eff575b9bf"/><file name="Moip.php" hash="611509d1e4c6c95b75cf6e1b940d026e"/></dir></dir><dir name="Helper"><file name="Data.php" hash="c8446f51a9fff30e01b8dbafe5011d3f"/></dir><dir name="Model"><file name="Admin.php" hash="fbf30f6692af7accab65fc510ed1c324"/><dir name="Adminhtml"><dir name="Method"><file name="Boleto.php" hash="e18c37bc0809131bfcd2cd48e3ba26c6"/><file name="Cc.php" hash="9d7ea1d6ee3211b8b773c75caa186895"/><file name="Tef.php" hash="a9cd73fc05421ab5a57455e35be6449c"/></dir></dir><file name="Api.php" hash="0523f5f5fbc04d7946cd7f9b296a6955"/><dir name="Method"><file name="Boleto.php" hash="d2ef98ff810961c9c31740585355f314"/><file name="BoletoRecurring.php" hash="367edcc2f3261d8fb35ae05b30ce684c"/><file name="Cc.php" hash="61240ba55ad0312370f3d387da10c7b5"/><file name="CcRecurring.php" hash="01d8ef7c71289a9d6ae5ac5934c5e683"/><file name="Tef.php" hash="58d09e3bff62924c748349daf611477b"/></dir><dir name="Mysql4"><file name="Collection.php" hash="97a5f80b4f89f83884481284785e2eeb"/><file name="Write.php" hash="d942fb856c2c7eaceac6866d88d85c54"/></dir><file name="Observer.php" hash="dc343f6fbe9df1d5b8e1f221df9a32bc"/><file name="Orders.php" hash="8de01cfc16794f2ded44c7a04be987a3"/><file name="Recurringapi.php" hash="7ef528c88d5d5e0cdb85ca45d8a3f190"/><dir name="Resource"><file name="Custommodel.php" hash="660a4b13ed53781dca0776830d2f44ed"/></dir><dir name="Sales"><dir name="Order"><dir name="Total"><dir name="Creditmemo"><file name="Fee.php" hash="b67ac4751127fbe629f3dd18b106da4e"/></dir><dir name="Invoice"><file name="Fee.php" hash="5e48ddfd32f32b33158457ab846a474c"/></dir></dir></dir><dir name="Quote"><dir name="Address"><dir name="Total"><file name="Fee.php" hash="99d0f73104760235f7bca635427c466e"/></dir></dir></dir></dir><dir name="Source"><file name="Ambiente.php" hash="612fa8389aad13680c784e8f514547ce"/><file name="FormasPagamento.php" hash="9edf4a675cd6340a5fabd19996361eb4"/><file name="Holded.php" hash="91b7d0376723f0533b024eafae411f82"/><file name="Layout.php" hash="212b1597bdbc653a2c7c0ad94e710474"/></dir><file name="Standard.php" hash="22b3c0983156d5d1c181281c8d483f38"/><file name="Write.php" hash="2fa2858e62c781d368e9f53faa578dc5"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="StatusmoipController.php" hash="ca0b2e77090644296acdbe4b3a20fe27"/></dir><file name="IndexController.php" hash="1dec7ee7a57f7b2b86f0a6765bc6d85f"/><file name="RecurringController.php" hash="97a239da6a985ae20acf5068590b35d3"/><file name="StandardController.php" hash="7d100a1343454f05b895431420e2fb55"/></dir><dir name="etc"><file name="adminhtml.xml" hash="a35a4bd1ffac3b9e1001dce6a4d857ea"/><file name="config.xml" hash="ea9e7bf9f9ff5d8695795c0ff6ac5b54"/><file name="system.xml" hash="d2ff234ae84dcaffae3dccf621071fb6"/></dir><dir name="sql"><dir name="transparente_setup"><file name="mysql4-install-0.1.0.php" hash="a670fdca751bdf66c3420cab5b05e2a9"/><file name="mysql4-upgrade-0.1.0-0.2.0.php" hash="81fca0fb48f978b4bfd697f17d7da05c"/><file name="mysql4-upgrade-0.1.0-0.2.2.php" hash="45596eaf03c16ff5ead4d8c6166876dd"/><file name="mysql4-upgrade-0.2.0-0.2.1.php" hash="595c8684baa681ec619f5a0d335a4a33"/><file name="mysql4-upgrade-0.2.0-0.2.3.php" hash="596bb5051a36e2b89c57d6e65752b8d3"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="moip_transparente.xml" hash="c93fe33e811520f8423448da4c19ec7d"/><file name="moip_onestepcheckout.xml" hash="d9c83c04973ad72160796f1c6859cb44"/></dir><dir name="template"><dir name="MOIP"><dir name="customer"><dir name="address"><file name="book.phtml" hash="07747e72a21de6cc5ba6afa9ccc3aed1"/><file name="edit.phtml" hash="9ea60abf23fd6d0ca04c528d75f67e35"/></dir><dir name="widget"><file name="dob.phtml" hash="fc4646c6f8f786e2e72e473bbdaf94bc"/><file name="taxvat.phtml" hash="67333f779d3c7503209ce057a3b44c34"/></dir></dir><dir name="onestepcheckout"><dir name="cadastro"><file name="CreateAccount.phtml" hash="9171d497068f17c38bc19765bbc4e8d8"/><dir name="billing"><file name="billingform.phtml" hash="f7020c0f158575800cdc8d256a5ccfb0"/></dir><file name="billing.phtml" hash="601777b8bb81397682644f0b3a5bb48c"/><dir name="logged"><file name="forgotpassword.phtml" hash="01a4f512208b98042d8007151e2ae646"/><file name="login-pre.phtml" hash="c6fb46f65aa08edd7679c3b4e9277bf4"/></dir><file name="onepagejs.phtml" hash="bae17ddaed80f065bf5861a1b9a1e1bb"/></dir><dir name="daskboard"><dir name="onepage"><file name="agreements.phtml" hash="5b762aa76287b160fcbec8fed8b789e8"/><dir name="billing"><file name="billingform.phtml" hash="ab7c63247f6b3621e6113749dea1d631"/></dir><file name="billing.phtml" hash="601777b8bb81397682644f0b3a5bb48c"/><file name="coupon.phtml" hash="f53bbf81c555e3aa7f46c73e73233d16"/><file name="forgotpassword.phtml" hash="01a4f512208b98042d8007151e2ae646"/><file name="local.xml" hash="8d97f2c4d496b6a9ddf0a5453c861c80"/><file name="login.phtml" hash="08e7e9b4b3aa0b727d5ce35963de5db4"/><dir name="payment"><file name="methods.phtml" hash="1040c9c4592c1e37e955bbf7333e3d40"/></dir><file name="payment.phtml" hash="3460a788826602c1059c2c4181ac2d27"/><dir name="review"><file name="button.phtml" hash="4d5c7c5a2d70f85ec324e79c7e81946b"/><file name="info.phtml" hash="84647398b66c129520413a957b4cb053"/><file name="info_simple.phtml" hash="423835c379f4f48f92f59fbcbbe79919"/><file name="item.phtml" hash="0634a6ab2409000d64a7f7e766935795"/><dir name="options"><file name="additional.phtml" hash="c7623ae5c2736421c911ed77fce09d4b"/></dir><file name="options.phtml" hash="35d426f28c2b87a853f811ab7a18e544"/><file name="totals.phtml" hash="2ba2a0937b2a08cd1f1bff1c8cf15c14"/><file name="totals_simple.phtml" hash="2d9a81ef0db47332f0e9c2105121c5fa"/></dir><file name="review.phtml" hash="145c515f7353809bf75113b67d014ad2"/><dir name="shipping"><file name="shipping_form.phtml" hash="0830100d1cc18a3885c39e79a00f769f"/></dir><file name="shipping.phtml" hash="09747a1b91974d35412d774cc53deb99"/><dir name="shipping_method"><file name="available.phtml" hash="8d6072dcd22fd6b337446b431d51486f"/></dir><file name="shipping_method.phtml" hash="d2b6d4e99c21febfbd122e548464e011"/></dir></dir><file name="daskboard.phtml" hash="555f59fd6b84e6861f48c363e0db7787"/><file name="emptyupdate.phtml" hash="7bf34446254428a5c42740731127b435"/><file name="onepagejs.phtml" hash="d398d4313e4057cc2eb4786dc68870b2"/><dir name="page"><file name="1column.phtml" hash="696ed828b609ca6f681aec0b6ee2a6d1"/><file name="single-header.phtml" hash="be37e386b842ccefa64e84522b41cca9"/></dir><file name="progresso.phtml" hash="1c96e111ef12a90c9c401babf4b32bbd"/><dir name="sales"><dir name="order"><dir name="info"><file name="customermessages.phtml" hash="813c6150e0e309612f40c9aee0d63c84"/><file name="customermessages.phtml~" hash="aa6199bb564edbf6d950fa154b624c02"/><file name="deliverydate.phtml" hash="a188cdefd8c346c28dbe2737097b208e"/><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 name="product"><dir name="list"><file name="parcelas.phtml" hash="9949b22a379f0d3dd3280ac5ef2ec1aa"/></dir><dir name="view"><file name="discount.phtml" hash="cc889e15df4c86536c2e0315d1b87625"/><file name="parcelas.phtml" hash="819808c25f66211be0f4d8815c76ee0d"/></dir></dir><dir name="transparente"><file name="cartoes_my_account.phtml" hash="b344b81ca409096b299e7ed3b9ea5227"/><dir name="checkout"><dir name="sales"><dir name="order"><dir name="items"><dir name="renderer"><file name="default.phtml" hash="92632830eb4c9da086b5f0e6e009c91c"/></dir></dir><file name="totals.phtml" hash="6477e543bda9576c165c1f6535dd210e"/></dir></dir><dir name="success"><file name="details.phtml" hash="464b90a6102b99f22a291aed1f142e43"/><dir name="method"><file name="boleto.phtml" hash="579b57729746ce0f3917114480426c8a"/><file name="boletorecorrente.phtml" hash="1dcff92491bc4cc4690658d10ad1885d"/><file name="cartao.phtml" hash="8d28c1e2a1f61d068d1375d298533f28"/><file name="transferencia.phtml" hash="160f19c89fe4dfecafeb17b46154507e"/></dir><file name="moip.phtml" hash="9e490e0d0af3afcfb22c458b41835f16"/></dir></dir><dir name="form"><file name="boleto.phtml" hash="1ce47db3c03c369c210cf84d5faf71a8"/><file name="cc.phtml" hash="101df14905e2eebda9911cfd808b1399"/><file name="recurring.phtml" hash="328096b3dd3c33e5168ef589ede3e665"/><file name="tef.phtml" hash="007b06785147218cac812540df06bae6"/></dir><dir name="info"><file name="admin.phtml" hash="6d22084d77797f31ec3c2ddf1d553f18"/><file name="boleto.phtml" hash="e33fe64c9ebbcb6acf93f2443ad1b7a6"/><file name="boletorecurring.phtml" hash="4c2cb2221c73fc88bba2d5ec0b4f3778"/><file name="cc.phtml" hash="58875bd758527e9837cb763e3807d1d3"/><file name="tef.phtml" hash="946883a549fdabae0590dac1d6365d76"/></dir><dir name="onclick"><file name="Button.phtml" hash="d19fa9db94b23448838c4ba558b9ed0d"/><file name="LoginOnclick.phtml" hash="034b27d272993dce6664bf8e6b64d8d2"/><file name="MoipOnclick.phtml" hash="0a62dc2d7259a10705b664720cf604e0"/><file name="Parcelas.phtml" hash="566c445c3ab4c41e4c0ee1dad735883a"/><file name="PaymentMethod.phtml" hash="2f80a6d4709d3860cef1f1da4f07dc94"/><file name="ShippingAddress.phtml" hash="10ab67699295331027c985b9d89113a4"/><file name="ShippingMethods.phtml" hash="c8f4647232ef8f5a5efdbba19911ba16"/><file name="js.phtml" hash="19049dbed5e0369303430698b94e7062"/></dir></dir></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="MOIP"><dir name="onestepcheckout"><dir name="sales"><dir name="order"><dir name="view"><dir name="tab"><dir name="info"><file name="Customermessages.phtml" hash="336f1612d37946b870e3ac5e18e52dc1"/></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 name="transparente"><file name="Novaforma.phtml" hash="49d046daa42bae37c1c5e80ff88c3e0d"/><file name="SuccessDetails.phtml" hash="2835e1bad2aeb2c6da0f1a37698a0919"/><file name="boleto.phtml" hash="51e688993d1e51662b427fb8876d4543"/><file name="cartao.phtml" hash="ab138a2c019a14bcff47a9a24f9375ac"/><file name="cartoes_my_account.phtml" hash="1614656ebf335b419e727dc77ac1872f"/><file name="emptyupdate.phtml" hash="5504d0197f33a3db19ae9f75b5a43b86"/><dir name="form"><file name="admin.phtml" hash="aeb89bec1f82fac1fa489aa8b649ba51"/><file name="boleto.phtml" hash="7837ded090d7162d8444abc92943c998"/><file name="cc.phtml" hash="36aad4686a0bbd6ccd49c82bf8aa3cc1"/><file name="cc_info.phtml" hash="1eb275e7c943dcca608c5a3038c2a41a"/><file name="tef.phtml" hash="48b06cf947ee26b27311aadae012c730"/><file name="tef_info.phtml" hash="1eb275e7c943dcca608c5a3038c2a41a"/></dir><file name="form.phtml" hash="2085219ca42621f5ab0172cba283ee1a"/><file name="horizontal_form.phtml" hash="0f662bb905c79187454513b73fce2184"/><dir name="info"><file name="admin.phtml" hash="e4d4c7d6fadf9849ba4de459a5670fcd"/><file name="boleto.phtml" hash="5ad35332c6e26388e315c939e90f1233"/><file name="cc.phtml" hash="722c9b18f1da1c58575dd0817dfca5da"/><file name="pdf.phtml" hash="4b61a33fa3736e6c461cf4e9fd983398"/><file name="tef.phtml" hash="eaf549920ac0c2e73e2222bfb82d9b82"/></dir><file name="info.phtml" hash="1eb275e7c943dcca608c5a3038c2a41a"/><dir name="redirect"><file name="boleto.phtml" hash="51e688993d1e51662b427fb8876d4543"/><file name="cartao.phtml" hash="ab138a2c019a14bcff47a9a24f9375ac"/><file name="layout_boleto.phtml" hash="8d91c7873e692648a7c1d9bd29091793"/><file name="transferencia.phtml" hash="bf869064e0542a95c6a2de98b276b1bc"/></dir><file name="redirect.phtml" hash="c6ca09427cccb6038b5eaac783d1ace7"/><file name="script.phtml" hash="1da65a08f8a6425a2f463e617d8ac9e0"/><file name="transferencia.phtml" hash="ba3d60beab741b28bdf0e037fe6730b5"/></dir></dir></dir><dir name="layout"><file name="moip_onestepcheckout.xml" hash="c560a0a699348e116b8ffeef56be490a"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="MOIP_All.xml" hash="5b4232633c10117c66c4054b95984c0d"/><file name="MOIP_Transparente.xml" hash="ab4257449d5d37535d98c590bc896443"/><file name="MOIP_Onestepcheckout.xml" hash="07ae6f8ec3e1bccc5001ae9a8386c3fc"/></dir></target><target name="magelocale"><dir><dir name="en_US"><file name="MOIP_Onestepcheckout.csv" hash="d7fd83d1c115af767311368be3b3a2e4"/></dir><dir name="pt_BR"><file name="MOIP_Onestepcheckout.csv" hash="d7fd83d1c115af767311368be3b3a2e4"/></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="MOIP"><dir name="core"><dir name="css"><file name="bootstrap-modal.css" hash="89d6e243998ccb3cd89ba523c3eefcdc"/><file name="bootstrap-popover.css" hash="08c4328bd5e5f8abda2f2d89f45bb2cc"/><file name="bootstrap-tabs.css" hash="6b3cdf6b171a0d6da7fdfe9f6c6ba7ec"/></dir></dir><dir name="onestepcheckout"><dir name="css"><file name="onestepcheckout.css" hash="c1c7da27794cbcd7c5eced7fb80fd1a9"/></dir><dir name="images"><file name="01.png" hash="4713bea09af9f742b6c2122f6fb59912"/><file name="02.png" hash="15cb983a16c4c1d8be6479ae5de625e6"/><file name="03.png" hash="3bc178975c6f25aecdaebbb7e86adaea"/><file name="04.png" hash="68ae3a414c70c12f340e7c801d854c53"/><file name="05.png" hash="6e8fe636f0593ed3cf00d140e68d2308"/><file name="ajax-loader-tr.gif" hash="6aadaa7b6f0a72ec38b7ca13c35e76f3"/><file name="bkg-giftmessage.png" hash="e0dc9f84c687af088bcc04e3ea200e0b"/><file name="bkg-step-review.png" hash="5acb4aba6f616dabbd8c94581d99122c"/><file name="error-icon.jpg" hash="8e44669e97a57d1d5cd00cb8b42fb506"/><file name="loja_segura.jpg" hash="327ad46c035ce265eaa5c5d85c0aa57a"/><file name="opc-ajax-loader.gif" hash="c289d3760794d891738c3de9a25bd298"/><file name="passed-icon.jpg" hash="c7b3467752d8ab38c8bcde4baaad505f"/><file name="validation_advice_bg.gif" hash="4903665d3dff3903fd31f87b82dffbd5"/></dir></dir><dir name="transparente"><dir name="css"><file name="cartao_save.css" hash="c6f20ba395b66de7abbec30b980de70d"/><file name="form.css" hash="228db5c73466c230944040e1de633632"/><file name="product_view.css" hash="e49cb7b48c97e92aef8db81e2111ca68"/><file name="redirect.css" hash="9e8385d037fa8690df6052ec051afc82"/></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="Elo.jpg" hash="d849a077b3033a5593b948c637ce99eb"/><file name="Elo.png" hash="dac4f02eb184c9e950bbcaf5d788f04d"/><file name="Hiper.jpg" hash="bce8dd2429c800aca14d9c5291a20abf"/><file name="Hiper.png" hash="fb470078d57f645fdbcc8405776a769e"/><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="ajax-loader.gif" hash="a6addc833d7e5401b13e3e6368854181"/><dir name="azul"><file name="ababoleto.png" hash="47e3ede4db46d5938a68f126bb68bcfe"/><file name="abacartao.png" hash="667954485c4082bafa84920073288453"/><file name="abatransf.png" hash="0623c4cf50653b9c13d12cca5eed43f6"/></dir><file name="banktransfer.png" hash="097193377d68a8d249534e7b097b17f3"/><file name="bb.png" hash="572914d1e4b635dc56cd507c6c46b023"/><file name="boleto.png" hash="270edbd8f289228beb39d300da96029e"/><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="24d2a4e6a39d33a263f2605bb1fdf9dd"/><file name="e-sedex.png" hash="19c04d68032987d594c4da51e3b66094"/><file name="pac.gif" hash="9e6328e16b3d29e94fcd6987c605ee90"/><file name="pac.png" hash="17aaff70f9924a8e37166429ceae549e"/><file name="sedex.gif" hash="9019cbbbf623e0ba58d5f3c7c81c3ee2"/><file name="sedex.png" hash="15e2831cad72756b9a9bf99a6e2af5e5"/></dir><file name="codigo-seguranca.png" hash="b1cdecab044511593083ff18033d4e4f"/><file name="freeshipping_freeshipping.gif" hash="cfc75257c8e52ff1b0a9e2f957667cec"/><file name="moip.png" hash="14273d22979881d4a57c960b952866e3"/><file name="moip_boleto.png" hash="c7619a9e9c0978df5a3b87b45dbc616f"/><file name="moip_boletorecurring.png" hash="c7619a9e9c0978df5a3b87b45dbc616f"/><file name="moip_brands_card.jpg" hash="a01377d0afa7ddd802a286c249ffcb90"/><file name="moip_cc.png" hash="cd1c4b1210235e1ec371370b185f75b1"/><file name="moip_ccrecurring.png" hash="cd1c4b1210235e1ec371370b185f75b1"/><file name="moip_tef.png" hash="097193377d68a8d249534e7b097b17f3"/><file name="moiphiper.png" hash="c25430ddd8e441cc2fc3ef68219e7668"/><file name="moipmaster.png" hash="836466c092121163320e9e6279f11f8b"/><file name="moipvisa.png" hash="cc0709d50773fa2815f7bfeb741a4219"/><dir name="preto"><file name="ababoleto.png" hash="a728ac886e7e57744e62bba2c7b0b969"/><file name="abacartao.png" hash="50b6103cb5b7e51a27f3c26eaa7411d0"/><file name="abatransf.png" hash="61eec388356aea3230fc5d811ef996ea"/></dir><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></dir></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="MOIP"><dir name="transparente"><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="Elo.jpg" hash="dac4f02eb184c9e950bbcaf5d788f04d"/><file name="Elo.png" hash="dac4f02eb184c9e950bbcaf5d788f04d"/><file name="Hiper.jpg" hash="fb470078d57f645fdbcc8405776a769e"/><file name="Hiper.png" hash="fb470078d57f645fdbcc8405776a769e"/><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="btn-login-moip.png" hash="3459add85a9d0d069cdf6ea0cc5d2814"/><file name="moip_brands_card.jpg" hash="738ed90e8f040993ef9ebfb1517482d6"/><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"/></dir></dir></dir></dir></dir></dir></target><target name="mageweb"><dir name="js"><dir name="MOIP"><dir name="core"><file name="bootstrap-modal.js" hash="33eee22cac655155b91eadd1e7b6e417"/><file name="bootstrap-tab.js" hash="ceef3daf42068b97915c25e392f81b8b"/><file name="bootstrap.min.js" hash="4becdc9104623e891fbb9d38bba01be4"/><file name="jquery.js" hash="315136162c3a659832e0f3bc79377315"/><file name="jquery_noconflict.js" hash="d41c4c89089b9e7e06a4a104ae37018f"/></dir><file name="jquery.js" hash="f8e2833ce2f57ec673b178be7eefbd82"/><file name="jquery.mask.min.js" hash="c5e89b28b44bdd0319c64fb6451a819d"/><file name="jquery_noconflict.js" hash="3edd24e3725ffc4569238df773b805f8"/><dir name="onestepcheckout"><file name="billing.js" hash="9d5f468c9e8d10e32781d347f2b8e41b"/><file name="change-events.js" hash="7a56dfda6d371393034912ff702f1830"/><file name="shipping.js" hash="d41d8cd98f00b204e9800998ecf8427e"/></dir><dir name="transparente"><file name="moip.js" hash="f81a74e8700d2b55fbec4d5e7d1ea601"/><file name="oneclick.js" hash="c57e4938898692222f825a2bb3ca0238"/></dir><file name="validacao.js" hash="d41d8cd98f00b204e9800998ecf8427e"/></dir></dir></target></contents>
21
  <compatible/>
22
- <dependencies><required><php><min>5.0.0</min><max>15.5.5</max></php><extension><name>openssl</name><min>1</min><max>1</max></extension><extension><name>apache</name><min>1</min><max>1</max></extension><extension><name>mcrypt</name><min>1</min><max>1</max></extension></required></dependencies>
23
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>o2ti_moip</name>
4
+ <version>2.0.3</version>
5
  <stability>stable</stability>
6
  <license uri="http://moip.com/licensa_checkout_transparente.txt">Exclusivo para clientes Moip Pagamentos S/A</license>
7
  <channel>community</channel>
13
  &#xD;
14
  &#xD;
15
  </description>
16
+ <notes>Melhorias para&#xD;
17
+ UX, Webhooks, Sucess</notes>
18
  <authors><author><name>MOIP</name><user>moip</user><email>contato@o2ti.com</email></author></authors>
19
+ <date>2016-08-03</date>
20
+ <time>15:38:07</time>
21
+ <contents><target name="magelocal"><dir name="MOIP"><dir name="All"><dir name="Helper"><file name="Data.php" hash="10b776758585cb50355c0d6d0a5fdd5b"/></dir><dir name="etc"><file name="config.xml" hash="f6612823c717080d755692bfa97f6e2f"/><file name="system.xml" hash="825545991621cd6e0fc34a19476d78cc"/></dir></dir><dir name="Onestepcheckout"><dir name="Block"><dir name="Adminhtml"><dir name="Onestepcheckout"><dir name="Sales"><dir name="Order"><dir name="View"><dir name="Tab"><dir name="Info"><file name="Customermessages.php" hash="ddb3c364bb288b2e48f5ca20dbaf262b"/></dir></dir></dir></dir></dir></dir><dir name="System"><dir name="Config"><file name="Editor.php" hash="620ffe2b11d51c059aae85d069d17dd9"/></dir></dir></dir><dir name="Checkout"><dir name="Cart"><file name="Promotion.php" hash="40ade64028b400796d0fb77060703370"/></dir><dir name="Onepage"><dir name="Billing"><file name="Sortbilling.php" hash="aac00cf619be021d627bc6d6e0632247"/></dir><file name="Billing.php" hash="c41241da962110ee7bca3c7656148bde"/><dir name="Review"><file name="Info.php" hash="8585d5415e0589c9ffc53c160921cdb0"/><file name="Options.php" hash="7e3a4f53f4d687536ae3ff80728c0cc4"/></dir><file name="Shipping.php" hash="40b5b13c8408bac25d7eb45f6ddbdc86"/></dir></dir><file name="Onestepcheckout.php" hash="f6a3bc3e394fbadd34985586f71ee782"/></dir><dir name="Helper"><file name="Data.php" hash="5c19376368e6b2f744b448f0012f693e"/></dir><dir name="Model"><dir name="Customer"><file name="Customer.php" hash="f038378053e082fea387c16056624540"/></dir><dir name="Mysql4"><dir name="Onestepcheckout"><file name="Collection.php" hash="cb452401f753d3cd63196488d2985e09"/></dir><file name="Onestepcheckout.php" hash="370e27b4bdd3d450fff995f94bc74ad3"/></dir><file name="Observer.php" hash="e8b37e9fb11cf2f47eb61d1629927ed1"/><file name="Onestepcheckout.php" hash="90db8eeb14fc762e79098edfac0684f8"/><dir name="Sales"><dir name="Quote"><file name="Address.php" hash="904bdc6b5836ccdbb91810dba55b4a4b"/></dir></dir><file name="Status.php" hash="cd2132bb22a1992e6ea762586391733b"/><dir name="System"><dir name="Config"><dir name="Source"><file name="Checkuncheck.php" hash="febcb4b243d5e09ae7b77d603af45d63"/><file name="Disablefield.php" hash="196dcdb92863dbe110a8edc0be4cf953"/><file name="Optionaddfield.php" hash="574f6f8d27245ab4f0d0362372f5082d"/><file name="Optionhidefield.php" hash="0cf65ef82933d93293eaada3125c3b1d"/><file name="Pagelayout.php" hash="b6ca9f9394e84806aecc39f5e62c11d5"/><dir name="Payment"><file name="Allowedmethods.php" hash="d1f4b5a2e79f2f9378fb58a88ce2732b"/></dir><file name="Subscribenewletter.php" hash="a4c99e4f5417aa1b6d42364f4c83258c"/></dir></dir></dir></dir><dir name="controllers"><file name="IndexController.php" hash="84956d00de1473ad3bf4a9098a037d46"/><file name="OrderController.php" hash="67f444751f3bc90bf9a4eca8e5e16c02"/><file name="TestController.php" hash="0ee82be0e1607d92fb4afa2bc6886b57"/></dir><dir name="etc"><file name="config.xml" hash="65ff724e6fe0f2e4125c9fb83afa3915"/><file name="system.xml" hash="494ffb0859c8616f2afc0002d2ab3e12"/></dir><dir name="sql"><dir name="moip_onestepcheckout_setup"><file name="mysql4-install-0.1.0.php" hash="31ccf46f0461f0c69d6af5962f69f4df"/><file name="mysql4-upgrade-0.1.0-0.2.0.php" hash="d41d8cd98f00b204e9800998ecf8427e"/></dir></dir></dir><dir name="Transparente"><dir name="Block"><dir name="Adminhtml"><dir name="Info"><file name="Boleto.php" hash="8839b160428c9bbe482c79a9637e9889"/><file name="Cc.php" hash="2e457a673e02024472f8145201cfb519"/><file name="Tef.php" hash="aaf85a2846426db34534c56eacbe3f01"/></dir><dir name="Sales"><dir name="Order"><dir name="Create"><dir name="Totals"><file name="Fee.php" hash="ff5c32dc11ba021ce5a08feece2c95c8"/></dir></dir></dir></dir><dir name="System"><dir name="Config"><dir name="Form"><dir name="Fieldset"><dir name="Modules"><file name="Header.php" hash="b0fd3aa33c52191c41a486f3077f3564"/><file name="Oauth.php" hash="f731590146972dc872849f9381034f9f"/><file name="Reset.php" hash="66b629c16de08ffaf1826df704ff3158"/></dir></dir></dir></dir></dir><dir name="moip"><dir name="Info"><file name="Boleto.php" hash="65cc077e82ff199700a2741ff9e4d128"/><file name="Cc.php" hash="386ec65663d683c611a6f53d7e90365d"/><file name="Info.php" hash="d41d8cd98f00b204e9800998ecf8427e"/><file name="Tef.php" hash="c93516fb7d7e308c1e09d9583164b17b"/></dir></dir></dir><dir name="Checkout"><dir name="Totals"><file name="Fee.php" hash="77b13900da5c1fbda76bc59d12c50c58"/></dir></dir><dir name="Form"><file name="Admin.php" hash="8e14d3f9688bb9276b289749ac103876"/><file name="Boleto.php" hash="838b429eb4963a6946570836cf248475"/><file name="Cc.php" hash="cff3706900d986481a71d10eb2dc0662"/><file name="Recurring.php" hash="3b05247c93000b5348f48a0924d916e9"/><file name="Tef.php" hash="ddbe5dfafbdcb22ec9d4fb901452f879"/></dir><dir name="Info"><file name="Admin.php" hash="d9f032feed4a4b8a4cd2ba920556ddee"/><file name="Boleto.php" hash="478cd41191bf414d9dfd6f1dca93f675"/><file name="Boletorecurring.php" hash="3c2cefde47b7fd19361402dd8330c9f7"/><file name="Cc.php" hash="bb80d6df12a4185a523eae62574e54ed"/><file name="Tef.php" hash="d0995621b02c1b450d1dd95ea9d814ee"/></dir><dir name="Onclick"><file name="Button.php" hash="2f1b70163cae117458228219cd37b790"/><file name="MoipOnclick.php" hash="ed325429be5a897762b89e860064e6bd"/><file name="PaymentMethod.php" hash="ab03241a3dc85f8537df83e5e294d385"/><file name="ShippingAddress.php" hash="bd069a1a705a60688fed1184ac84e76f"/><file name="ShippingMethods.php" hash="3084994424c4adcc12e700ad3f5c1226"/><file name="UpdateParcelas.php" hash="e5eb7e7ac75fbfcc8fc369e95ad3811a"/></dir><dir name="Product"><dir name="List"><file name="Parcelas.php" hash="df5d74cbf099971722dede2e279afc6c"/></dir><file name="List.php" hash="881a94bac6f0dfd100c39c1416c54b07"/><dir name="View"><file name="Discount.php" hash="e6b117d907f624e50b63594435f208e9"/><file name="Parcelas.php" hash="1b2c92b9e10da86523341cdb1e4bb4a7"/></dir><file name="View.php" hash="54f00539a0ce45c0aecdbd05d3a0323d"/></dir><dir name="Sales"><dir name="Order"><file name="Fee.php" hash="cef1608deab17b77a7351be6666ecf47"/><file name="Grid.php" hash="f62513609fae2fa70206c81b79349ed6"/></dir></dir><dir name="Standard"><file name="Cancel.php" hash="e7ebf3cdb13dcb613a57c28c05786db5"/><file name="CartSave.php" hash="12122d801ff6b8be4e1011bb5b0a2fac"/><file name="Details.php" hash="469e5a429afa6d24c079f8ca496049a0"/><file name="Form.php" hash="f3e3e6eb00a562c2c9d9982002d919b9"/><file name="Info.php" hash="c8b5f6584a4f9509465543eff575b9bf"/><dir name="Method"><file name="Boleto.php" hash="da9a7e7217226ab7e063e64d7b5ed2a8"/><file name="Cc.php" hash="288a21f2141996a994d8cb12cca3b558"/><file name="Tef.php" hash="57ff6f641a8f6d897c38381a8b527c80"/></dir><file name="Moip.php" hash="677a21d390ad65d8dd84fe4a3d045752"/></dir></dir><dir name="Helper"><file name="Data.php" hash="c8446f51a9fff30e01b8dbafe5011d3f"/></dir><dir name="Model"><file name="Admin.php" hash="fbf30f6692af7accab65fc510ed1c324"/><dir name="Adminhtml"><dir name="Method"><file name="Boleto.php" hash="e18c37bc0809131bfcd2cd48e3ba26c6"/><file name="Cc.php" hash="9d7ea1d6ee3211b8b773c75caa186895"/><file name="Tef.php" hash="a9cd73fc05421ab5a57455e35be6449c"/></dir></dir><file name="Api.php" hash="f787c49a851b72c9b433008e25d1108a"/><dir name="Method"><file name="Boleto.php" hash="a11bdbaa8b38f4cbb67a2b433842ec0e"/><file name="BoletoRecurring.php" hash="367edcc2f3261d8fb35ae05b30ce684c"/><file name="Cc.php" hash="61240ba55ad0312370f3d387da10c7b5"/><file name="CcRecurring.php" hash="01d8ef7c71289a9d6ae5ac5934c5e683"/><file name="Tef.php" hash="d44692928747c851223f492e3c0f713f"/></dir><dir name="Mysql4"><file name="Collection.php" hash="97a5f80b4f89f83884481284785e2eeb"/><file name="Write.php" hash="d942fb856c2c7eaceac6866d88d85c54"/></dir><file name="Observer.php" hash="a8128631df7a2d261196d5bcff583e6d"/><file name="Orders.php" hash="8de01cfc16794f2ded44c7a04be987a3"/><file name="Recurringapi.php" hash="7ef528c88d5d5e0cdb85ca45d8a3f190"/><dir name="Resource"><file name="Custommodel.php" hash="660a4b13ed53781dca0776830d2f44ed"/></dir><dir name="Sales"><dir name="Order"><dir name="Total"><dir name="Creditmemo"><file name="Fee.php" hash="b67ac4751127fbe629f3dd18b106da4e"/></dir><dir name="Invoice"><file name="Fee.php" hash="5e48ddfd32f32b33158457ab846a474c"/></dir></dir></dir><dir name="Quote"><dir name="Address"><dir name="Total"><file name="Fee.php" hash="99d0f73104760235f7bca635427c466e"/></dir></dir></dir></dir><dir name="Source"><file name="Ambiente.php" hash="612fa8389aad13680c784e8f514547ce"/><file name="FormasPagamento.php" hash="9edf4a675cd6340a5fabd19996361eb4"/><file name="Holded.php" hash="91b7d0376723f0533b024eafae411f82"/><file name="Layout.php" hash="212b1597bdbc653a2c7c0ad94e710474"/></dir><file name="Standard.php" hash="22b3c0983156d5d1c181281c8d483f38"/><file name="Write.php" hash="2fa2858e62c781d368e9f53faa578dc5"/></dir><dir name="controllers"><dir name="Adminhtml"><file name="StatusmoipController.php" hash="ca0b2e77090644296acdbe4b3a20fe27"/></dir><file name="IndexController.php" hash="1dec7ee7a57f7b2b86f0a6765bc6d85f"/><file name="RecurringController.php" hash="97a239da6a985ae20acf5068590b35d3"/><file name="StandardController.php" hash="c85137d66e9a73e57a4a2269382edc81"/></dir><dir name="etc"><file name="adminhtml.xml" hash="a35a4bd1ffac3b9e1001dce6a4d857ea"/><file name="config.xml" hash="ea9e7bf9f9ff5d8695795c0ff6ac5b54"/><file name="system.xml" hash="bb12e3168e1d12832eb2c4ad0df5f93e"/></dir><dir name="sql"><dir name="transparente_setup"><file name="mysql4-install-0.1.0.php" hash="a670fdca751bdf66c3420cab5b05e2a9"/><file name="mysql4-upgrade-0.1.0-0.2.0.php" hash="81fca0fb48f978b4bfd697f17d7da05c"/><file name="mysql4-upgrade-0.1.0-0.2.2.php" hash="45596eaf03c16ff5ead4d8c6166876dd"/><file name="mysql4-upgrade-0.2.0-0.2.1.php" hash="595c8684baa681ec619f5a0d335a4a33"/><file name="mysql4-upgrade-0.2.0-0.2.3.php" hash="596bb5051a36e2b89c57d6e65752b8d3"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="moip_transparente.xml" hash="f8802a79a3b537884738f0bc2a3c9045"/><file name="moip_onestepcheckout.xml" hash="d9c83c04973ad72160796f1c6859cb44"/></dir><dir name="template"><dir name="MOIP"><dir name="customer"><dir name="address"><file name="book.phtml" hash="07747e72a21de6cc5ba6afa9ccc3aed1"/><file name="edit.phtml" hash="9ea60abf23fd6d0ca04c528d75f67e35"/></dir><dir name="widget"><file name="dob.phtml" hash="fc4646c6f8f786e2e72e473bbdaf94bc"/><file name="taxvat.phtml" hash="67333f779d3c7503209ce057a3b44c34"/></dir></dir><dir name="onestepcheckout"><dir name="cadastro"><file name="CreateAccount.phtml" hash="9171d497068f17c38bc19765bbc4e8d8"/><dir name="billing"><file name="billingform.phtml" hash="58f5d7441fda4feecf7f2801fffe7558"/></dir><file name="billing.phtml" hash="601777b8bb81397682644f0b3a5bb48c"/><dir name="logged"><file name="forgotpassword.phtml" hash="01a4f512208b98042d8007151e2ae646"/><file name="login-pre.phtml" hash="c6fb46f65aa08edd7679c3b4e9277bf4"/></dir><file name="onepagejs.phtml" hash="bae17ddaed80f065bf5861a1b9a1e1bb"/></dir><dir name="daskboard"><dir name="onepage"><file name="agreements.phtml" hash="5b762aa76287b160fcbec8fed8b789e8"/><dir name="billing"><file name="billingform.phtml" hash="03a5661284184d28b60f686612507529"/></dir><file name="billing.phtml" hash="601777b8bb81397682644f0b3a5bb48c"/><file name="coupon.phtml" hash="f53bbf81c555e3aa7f46c73e73233d16"/><file name="forgotpassword.phtml" hash="01a4f512208b98042d8007151e2ae646"/><file name="local.xml" hash="8d97f2c4d496b6a9ddf0a5453c861c80"/><file name="login.phtml" hash="08e7e9b4b3aa0b727d5ce35963de5db4"/><dir name="payment"><file name="methods.phtml" hash="1040c9c4592c1e37e955bbf7333e3d40"/></dir><file name="payment.phtml" hash="3460a788826602c1059c2c4181ac2d27"/><dir name="review"><file name="button.phtml" hash="4d5c7c5a2d70f85ec324e79c7e81946b"/><file name="info.phtml" hash="84647398b66c129520413a957b4cb053"/><file name="info_simple.phtml" hash="423835c379f4f48f92f59fbcbbe79919"/><file name="item.phtml" hash="0634a6ab2409000d64a7f7e766935795"/><dir name="options"><file name="additional.phtml" hash="c7623ae5c2736421c911ed77fce09d4b"/></dir><file name="options.phtml" hash="35d426f28c2b87a853f811ab7a18e544"/><file name="totals.phtml" hash="2ba2a0937b2a08cd1f1bff1c8cf15c14"/><file name="totals_simple.phtml" hash="2d9a81ef0db47332f0e9c2105121c5fa"/></dir><file name="review.phtml" hash="145c515f7353809bf75113b67d014ad2"/><dir name="shipping"><file name="shipping_form.phtml" hash="0830100d1cc18a3885c39e79a00f769f"/></dir><file name="shipping.phtml" hash="09747a1b91974d35412d774cc53deb99"/><dir name="shipping_method"><file name="available.phtml" hash="8d6072dcd22fd6b337446b431d51486f"/></dir><file name="shipping_method.phtml" hash="d2b6d4e99c21febfbd122e548464e011"/></dir></dir><file name="daskboard.phtml" hash="555f59fd6b84e6861f48c363e0db7787"/><file name="emptyupdate.phtml" hash="7bf34446254428a5c42740731127b435"/><file name="onepagejs.phtml" hash="d398d4313e4057cc2eb4786dc68870b2"/><dir name="page"><file name="1column.phtml" hash="696ed828b609ca6f681aec0b6ee2a6d1"/><file name="single-header.phtml" hash="be37e386b842ccefa64e84522b41cca9"/></dir><file name="progresso.phtml" hash="1c96e111ef12a90c9c401babf4b32bbd"/><dir name="sales"><dir name="order"><dir name="info"><file name="customermessages.phtml" hash="813c6150e0e309612f40c9aee0d63c84"/><file name="customermessages.phtml~" hash="aa6199bb564edbf6d950fa154b624c02"/><file name="deliverydate.phtml" hash="a188cdefd8c346c28dbe2737097b208e"/><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 name="product"><dir name="list"><file name="parcelas.phtml" hash="9949b22a379f0d3dd3280ac5ef2ec1aa"/></dir><dir name="view"><file name="discount.phtml" hash="cc889e15df4c86536c2e0315d1b87625"/><file name="parcelas.phtml" hash="819808c25f66211be0f4d8815c76ee0d"/></dir></dir><dir name="transparente"><file name="cartoes_my_account.phtml" hash="b344b81ca409096b299e7ed3b9ea5227"/><dir name="checkout"><dir name="sales"><dir name="order"><dir name="items"><dir name="renderer"><file name="default.phtml" hash="92632830eb4c9da086b5f0e6e009c91c"/></dir></dir><file name="totals.phtml" hash="6477e543bda9576c165c1f6535dd210e"/></dir></dir><dir name="success"><file name="details.phtml" hash="464b90a6102b99f22a291aed1f142e43"/><dir name="method"><file name="boleto.phtml" hash="579b57729746ce0f3917114480426c8a"/><file name="boletorecorrente.phtml" hash="1dcff92491bc4cc4690658d10ad1885d"/><file name="cartao.phtml" hash="8d28c1e2a1f61d068d1375d298533f28"/><file name="transferencia.phtml" hash="160f19c89fe4dfecafeb17b46154507e"/></dir><file name="moip.phtml" hash="9e490e0d0af3afcfb22c458b41835f16"/></dir></dir><dir name="form"><file name="boleto.phtml" hash="1ce47db3c03c369c210cf84d5faf71a8"/><file name="cc.phtml" hash="4b866f8e70bb56028a5b17356abefcb7"/><file name="recurring.phtml" hash="328096b3dd3c33e5168ef589ede3e665"/><file name="tef.phtml" hash="007b06785147218cac812540df06bae6"/></dir><dir name="info"><file name="admin.phtml" hash="6d22084d77797f31ec3c2ddf1d553f18"/><file name="boleto.phtml" hash="464f2f44055487dd5cea719eec31c108"/><file name="boletorecurring.phtml" hash="4c2cb2221c73fc88bba2d5ec0b4f3778"/><file name="cc.phtml" hash="58875bd758527e9837cb763e3807d1d3"/><file name="tef.phtml" hash="41a0df570f4d9ba9be699c60251c1184"/></dir><dir name="onclick"><file name="Button.phtml" hash="d19fa9db94b23448838c4ba558b9ed0d"/><file name="LoginOnclick.phtml" hash="034b27d272993dce6664bf8e6b64d8d2"/><file name="MoipOnclick.phtml" hash="0a62dc2d7259a10705b664720cf604e0"/><file name="Parcelas.phtml" hash="566c445c3ab4c41e4c0ee1dad735883a"/><file name="PaymentMethod.phtml" hash="2f80a6d4709d3860cef1f1da4f07dc94"/><file name="ShippingAddress.phtml" hash="10ab67699295331027c985b9d89113a4"/><file name="ShippingMethods.phtml" hash="c8f4647232ef8f5a5efdbba19911ba16"/><file name="js.phtml" hash="19049dbed5e0369303430698b94e7062"/></dir></dir></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="MOIP"><dir name="onestepcheckout"><dir name="sales"><dir name="order"><dir name="view"><dir name="tab"><dir name="info"><file name="Customermessages.phtml" hash="336f1612d37946b870e3ac5e18e52dc1"/></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 name="transparente"><file name="Novaforma.phtml" hash="49d046daa42bae37c1c5e80ff88c3e0d"/><file name="SuccessDetails.phtml" hash="2835e1bad2aeb2c6da0f1a37698a0919"/><file name="boleto.phtml" hash="51e688993d1e51662b427fb8876d4543"/><file name="cartao.phtml" hash="ab138a2c019a14bcff47a9a24f9375ac"/><file name="cartoes_my_account.phtml" hash="1614656ebf335b419e727dc77ac1872f"/><file name="emptyupdate.phtml" hash="5504d0197f33a3db19ae9f75b5a43b86"/><dir name="form"><file name="admin.phtml" hash="aeb89bec1f82fac1fa489aa8b649ba51"/><file name="boleto.phtml" hash="7837ded090d7162d8444abc92943c998"/><file name="cc.phtml" hash="36aad4686a0bbd6ccd49c82bf8aa3cc1"/><file name="cc_info.phtml" hash="1eb275e7c943dcca608c5a3038c2a41a"/><file name="tef.phtml" hash="48b06cf947ee26b27311aadae012c730"/><file name="tef_info.phtml" hash="1eb275e7c943dcca608c5a3038c2a41a"/></dir><file name="form.phtml" hash="2085219ca42621f5ab0172cba283ee1a"/><file name="horizontal_form.phtml" hash="0f662bb905c79187454513b73fce2184"/><dir name="info"><file name="admin.phtml" hash="e4d4c7d6fadf9849ba4de459a5670fcd"/><file name="boleto.phtml" hash="5ad35332c6e26388e315c939e90f1233"/><file name="cc.phtml" hash="722c9b18f1da1c58575dd0817dfca5da"/><file name="pdf.phtml" hash="4b61a33fa3736e6c461cf4e9fd983398"/><file name="tef.phtml" hash="eaf549920ac0c2e73e2222bfb82d9b82"/></dir><file name="info.phtml" hash="1eb275e7c943dcca608c5a3038c2a41a"/><dir name="redirect"><file name="boleto.phtml" hash="51e688993d1e51662b427fb8876d4543"/><file name="cartao.phtml" hash="ab138a2c019a14bcff47a9a24f9375ac"/><file name="layout_boleto.phtml" hash="8d91c7873e692648a7c1d9bd29091793"/><file name="transferencia.phtml" hash="bf869064e0542a95c6a2de98b276b1bc"/></dir><file name="redirect.phtml" hash="c6ca09427cccb6038b5eaac783d1ace7"/><file name="script.phtml" hash="1da65a08f8a6425a2f463e617d8ac9e0"/><file name="transferencia.phtml" hash="ba3d60beab741b28bdf0e037fe6730b5"/></dir></dir></dir><dir name="layout"><file name="moip_onestepcheckout.xml" hash="c560a0a699348e116b8ffeef56be490a"/></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="MOIP_All.xml" hash="5b4232633c10117c66c4054b95984c0d"/><file name="MOIP_Transparente.xml" hash="ab4257449d5d37535d98c590bc896443"/><file name="MOIP_Onestepcheckout.xml" hash="07ae6f8ec3e1bccc5001ae9a8386c3fc"/></dir></target><target name="magelocale"><dir><dir name="en_US"><file name="MOIP_Onestepcheckout.csv" hash="d7fd83d1c115af767311368be3b3a2e4"/></dir><dir name="pt_BR"><file name="MOIP_Onestepcheckout.csv" hash="d7fd83d1c115af767311368be3b3a2e4"/></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="MOIP"><dir name="core"><dir name="css"><file name="bootstrap-modal.css" hash="89d6e243998ccb3cd89ba523c3eefcdc"/><file name="bootstrap-popover.css" hash="08c4328bd5e5f8abda2f2d89f45bb2cc"/><file name="bootstrap-tabs.css" hash="6b3cdf6b171a0d6da7fdfe9f6c6ba7ec"/></dir></dir><dir name="onestepcheckout"><dir name="css"><file name="onestepcheckout.css" hash="c1c7da27794cbcd7c5eced7fb80fd1a9"/></dir><dir name="images"><file name="01.png" hash="4713bea09af9f742b6c2122f6fb59912"/><file name="02.png" hash="15cb983a16c4c1d8be6479ae5de625e6"/><file name="03.png" hash="3bc178975c6f25aecdaebbb7e86adaea"/><file name="04.png" hash="68ae3a414c70c12f340e7c801d854c53"/><file name="05.png" hash="6e8fe636f0593ed3cf00d140e68d2308"/><file name="ajax-loader-tr.gif" hash="6aadaa7b6f0a72ec38b7ca13c35e76f3"/><file name="bkg-giftmessage.png" hash="e0dc9f84c687af088bcc04e3ea200e0b"/><file name="bkg-step-review.png" hash="5acb4aba6f616dabbd8c94581d99122c"/><file name="error-icon.jpg" hash="8e44669e97a57d1d5cd00cb8b42fb506"/><file name="loja_segura.jpg" hash="327ad46c035ce265eaa5c5d85c0aa57a"/><file name="opc-ajax-loader.gif" hash="c289d3760794d891738c3de9a25bd298"/><file name="passed-icon.jpg" hash="c7b3467752d8ab38c8bcde4baaad505f"/><file name="validation_advice_bg.gif" hash="4903665d3dff3903fd31f87b82dffbd5"/></dir></dir><dir name="transparente"><dir name="css"><file name="cartao_save.css" hash="c6f20ba395b66de7abbec30b980de70d"/><file name="form.css" hash="1b2d6b187cd830418b956b3c2678c130"/><file name="product_view.css" hash="e49cb7b48c97e92aef8db81e2111ca68"/><file name="redirect.css" hash="9e8385d037fa8690df6052ec051afc82"/></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="Elo.jpg" hash="d849a077b3033a5593b948c637ce99eb"/><file name="Elo.png" hash="dac4f02eb184c9e950bbcaf5d788f04d"/><file name="Hiper.jpg" hash="bce8dd2429c800aca14d9c5291a20abf"/><file name="Hiper.png" hash="fb470078d57f645fdbcc8405776a769e"/><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="ajax-loader.gif" hash="a6addc833d7e5401b13e3e6368854181"/><dir name="azul"><file name="ababoleto.png" hash="47e3ede4db46d5938a68f126bb68bcfe"/><file name="abacartao.png" hash="667954485c4082bafa84920073288453"/><file name="abatransf.png" hash="0623c4cf50653b9c13d12cca5eed43f6"/></dir><file name="banktransfer.png" hash="097193377d68a8d249534e7b097b17f3"/><file name="bb.png" hash="572914d1e4b635dc56cd507c6c46b023"/><file name="boleto.png" hash="270edbd8f289228beb39d300da96029e"/><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="24d2a4e6a39d33a263f2605bb1fdf9dd"/><file name="e-sedex.png" hash="19c04d68032987d594c4da51e3b66094"/><file name="pac.gif" hash="9e6328e16b3d29e94fcd6987c605ee90"/><file name="pac.png" hash="17aaff70f9924a8e37166429ceae549e"/><file name="sedex.gif" hash="9019cbbbf623e0ba58d5f3c7c81c3ee2"/><file name="sedex.png" hash="15e2831cad72756b9a9bf99a6e2af5e5"/></dir><file name="codigo-seguranca.png" hash="b1cdecab044511593083ff18033d4e4f"/><file name="freeshipping_freeshipping.gif" hash="cfc75257c8e52ff1b0a9e2f957667cec"/><file name="moip.png" hash="14273d22979881d4a57c960b952866e3"/><file name="moip_boleto.png" hash="c7619a9e9c0978df5a3b87b45dbc616f"/><file name="moip_boletorecurring.png" hash="c7619a9e9c0978df5a3b87b45dbc616f"/><file name="moip_brands_card.jpg" hash="a01377d0afa7ddd802a286c249ffcb90"/><file name="moip_cc.png" hash="cd1c4b1210235e1ec371370b185f75b1"/><file name="moip_ccrecurring.png" hash="cd1c4b1210235e1ec371370b185f75b1"/><file name="moip_tef.png" hash="097193377d68a8d249534e7b097b17f3"/><file name="moiphiper.png" hash="c25430ddd8e441cc2fc3ef68219e7668"/><file name="moipmaster.png" hash="836466c092121163320e9e6279f11f8b"/><file name="moipvisa.png" hash="cc0709d50773fa2815f7bfeb741a4219"/><dir name="preto"><file name="ababoleto.png" hash="a728ac886e7e57744e62bba2c7b0b969"/><file name="abacartao.png" hash="50b6103cb5b7e51a27f3c26eaa7411d0"/><file name="abatransf.png" hash="61eec388356aea3230fc5d811ef996ea"/></dir><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></dir></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="MOIP"><dir name="transparente"><dir name="css"><file name="moip.css" hash="d14b85820c52f99bd799bf7292f65ca7"/></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="Elo.jpg" hash="dac4f02eb184c9e950bbcaf5d788f04d"/><file name="Elo.png" hash="dac4f02eb184c9e950bbcaf5d788f04d"/><file name="Hiper.jpg" hash="fb470078d57f645fdbcc8405776a769e"/><file name="Hiper.png" hash="fb470078d57f645fdbcc8405776a769e"/><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="btn-login-moip.png" hash="3459add85a9d0d069cdf6ea0cc5d2814"/><file name="moip_brands_card.jpg" hash="738ed90e8f040993ef9ebfb1517482d6"/><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"/></dir></dir></dir></dir></dir></dir></target><target name="mageweb"><dir name="js"><dir name="MOIP"><dir name="core"><file name="bootstrap-modal.js" hash="33eee22cac655155b91eadd1e7b6e417"/><file name="bootstrap-tab.js" hash="ceef3daf42068b97915c25e392f81b8b"/><file name="bootstrap.min.js" hash="4becdc9104623e891fbb9d38bba01be4"/><file name="jquery.js" hash="315136162c3a659832e0f3bc79377315"/><file name="jquery_noconflict.js" hash="d41c4c89089b9e7e06a4a104ae37018f"/></dir><file name="jquery.js" hash="f8e2833ce2f57ec673b178be7eefbd82"/><file name="jquery.mask.min.js" hash="c5e89b28b44bdd0319c64fb6451a819d"/><file name="jquery_noconflict.js" hash="3edd24e3725ffc4569238df773b805f8"/><dir name="onestepcheckout"><file name="billing.js" hash="9d5f468c9e8d10e32781d347f2b8e41b"/><file name="change-events.js" hash="7a56dfda6d371393034912ff702f1830"/><file name="shipping.js" hash="d41d8cd98f00b204e9800998ecf8427e"/></dir><dir name="transparente"><file name="moip.js" hash="f81a74e8700d2b55fbec4d5e7d1ea601"/><file name="oneclick.js" hash="c57e4938898692222f825a2bb3ca0238"/></dir><file name="validacao.js" hash="d41d8cd98f00b204e9800998ecf8427e"/></dir></dir></target></contents>
22
  <compatible/>
23
+ <dependencies><required><php><min>5.0.0</min><max>15.5.5</max></php><extension><name>PDO</name><min>1</min><max>1</max></extension><extension><name>mcrypt</name><min>1</min><max>1</max></extension></required></dependencies>
24
  </package>
skin/adminhtml/default/default/MOIP/transparente/css/moip.css ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ a.btn-moip {
2
+ background: #3A95D1;
3
+ color: #fff;
4
+ text-decoration: none;
5
+ padding: 10px 20px;
6
+ border: 1px solid #3B89BD;
7
+ margin: 10px;
8
+ border-radius: 4px;
9
+ }
10
+ p.p-actin-moip {
11
+ line-height: 50px;
12
+ }
13
+ a.btn-moip.danger {
14
+ background-color: #FF0000;
15
+ border-color: #FF0000;
16
+ }
17
+ a.btn-moip.help {
18
+ background-color: #5cb85c;
19
+ border-color: #4cae4c;
20
+ }
21
+ .btn-moip:hover{
22
+ opacity: 0.7;
23
+ }
skin/frontend/base/default/MOIP/transparente/css/form.css CHANGED
@@ -214,3 +214,11 @@ input {
214
  width: 100% !important;
215
  }
216
  }
 
 
 
 
 
 
 
 
214
  width: 100% !important;
215
  }
216
  }
217
+
218
+ .bg-destaque {
219
+ background: #F7F7F7;
220
+ float: left;
221
+ width: 100%;
222
+ padding: 10px;
223
+ margin: 9px 0px;
224
+ }