Tray_CheckoutRedir - Version 1.0.0.1

Version Notes

Primeira versão liberada no Magento Connect

Download this release

Release Info

Developer Igor
Extension Tray_CheckoutRedir
Version 1.0.0.1
Comparing to
See all releases


Code changes from version 1.0.0.0 to 1.0.0.1

app/code/community/Tray/CheckoutRedir/Helper/Adress.php ADDED
@@ -0,0 +1,142 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to suporte@tray.net.br so we can send you a copy immediately.
14
+ *
15
+ * @category Tray
16
+ * @package Tray_CheckoutRedir
17
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
18
+ */
19
+
20
+ class Tray_CheckoutRedir_Helper_Adress extends Mage_Core_Helper_Data
21
+ {
22
+
23
+ private $completion = array("casa", "ap", "apto", "apart", "frente", "fundos", "sala", "cj");
24
+ private $df = array("bloco", "setor", "quadra", "lote");
25
+ private $noDf = array("av", "avenida", "rua", "alameda", "al.", "travessa", "trv", "praça", "praca");
26
+ private $without = array("sem ", "s.", "s/", "s. ", "s/ ");
27
+ private $number = array('n.º', 'nº', "numero", "num", "número", "núm", "n");
28
+
29
+ /**
30
+ * getAdress
31
+ * @param string $adress
32
+ * @return array
33
+ */
34
+ public function getAdress($adress) {
35
+ if ($this->isDf($adress)) {
36
+ $number = 's/nº';
37
+ list($street, $completion) = $this->partCompletion($adress);
38
+ } else {
39
+ $splited = preg_split('/[-,]/', $adress);
40
+ if (in_array(sizeof($splited), array(2, 3))) {
41
+ list($street, $number, $completion) = $splited;
42
+ } else {
43
+ list($street, $number) = $this->reverse($adress);
44
+ }
45
+ $street = $this->cleanNumber($street);
46
+ if (strlen($completion)==0)
47
+ list($numberb,$completion) = $this->partNumber($number);
48
+ }
49
+ return array($this->endtrim($street), $this->endtrim($number), $this->endtrim($completion));
50
+ }
51
+
52
+ /**
53
+ * partNumber
54
+ * @param string $n
55
+ * @return array
56
+ */
57
+ public function partNumber($n) {
58
+ $withoutNumber = $this->withoutNumber();
59
+ $n = $this->endtrim($n);
60
+ foreach ($withoutNumber as $sn) {
61
+ if ($n == $sn)return array($n, '');
62
+ if (substr($n, 0, strlen($sn)) == $sn)
63
+ return array(substr($n, 0, strlen($sn)), substr($n, strlen($sn)));
64
+ }
65
+ $q = preg_split('/\D/', $n);
66
+ $pos = strlen($q[0]);
67
+ return array(substr($n, 0, $pos), substr($n,$pos));
68
+ }
69
+
70
+ /**
71
+ * partCompletion
72
+ * @param string $adress
73
+ * @return array
74
+ */
75
+ function partCompletion($adress) {
76
+ foreach ($this->$completion as $c)
77
+ if ($pos = strpos(strtolower($adress), $c))
78
+ return array(substr($adress, 0 ,$pos), substr($adress, $pos));
79
+ return array($adress, '');
80
+ }
81
+
82
+ /**
83
+ * @param string
84
+ * @return string
85
+ */
86
+ function endtrim($e){
87
+ return preg_replace('/^\W+|\W+$/', '', $e);
88
+ }
89
+
90
+ /**
91
+ * cleanNumber
92
+ * @param string $street Endereço a ser tratado
93
+ * @return string
94
+ */
95
+ function cleanNumber($street) {
96
+ foreach ($this->number as $n)
97
+ foreach (array(" $n"," $n ") as $N)
98
+ if (substr($street, -strlen($N)) == $N)
99
+ return substr($street, 0, -strlen($N));
100
+ return $street;
101
+ }
102
+
103
+ /**
104
+ * @param string $adress
105
+ * @return array
106
+ */
107
+ function reverse($adress) {
108
+ $find = substr($adress, -10);
109
+ for ($i = 0; $i < 10; $i++) {
110
+ if (is_numeric(substr($find, $i, 1))) {
111
+ return array( substr($adress, 0, -10+$i), substr($adress, -10+$i) );
112
+ }
113
+ }
114
+ }
115
+
116
+ /**
117
+ * @param string $adress
118
+ * @return bool
119
+ */
120
+ function isDf($adress) {
121
+ $df = false;
122
+ foreach ($this->df as $b)
123
+ if (strpos(strtolower($adress),$b) != false)
124
+ $df = true;
125
+ if ($df)
126
+ foreach ($this->noDf as $b)
127
+ if (strpos(strtolower($adress),$b) != false)
128
+ $df = false;
129
+ return $df;
130
+ }
131
+
132
+ /**
133
+ * @return array
134
+ */
135
+ function withoutNumber() {
136
+ foreach ($this->number as $n)
137
+ foreach ($this->without as $s)
138
+ $withoutNum[] = "$s$n";
139
+ return $withoutNum;
140
+ }
141
+
142
+ }
app/code/community/Tray/CheckoutRedir/Helper/Data.php CHANGED
@@ -17,7 +17,7 @@
17
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
18
  */
19
 
20
- class Tray_CheckoutRedir_Helper_Data extends Mage_Core_Helper_Data
21
  {
22
  public function prepareLineItems(Mage_Core_Model_Abstract $salesEntity, $discountTotalAsItem = true, $shippingTotalAsItem = false)
23
  {
17
  * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
18
  */
19
 
20
+ class Tray_CheckoutRedir_Helper_Data extends Tray_CheckoutRedir_Helper_Adress
21
  {
22
  public function prepareLineItems(Mage_Core_Model_Abstract $salesEntity, $discountTotalAsItem = true, $shippingTotalAsItem = false)
23
  {
app/code/community/Tray/CheckoutRedir/Model/Config.php CHANGED
@@ -44,34 +44,7 @@ class Tray_CheckoutRedir_Model_Config extends Varien_Object
44
  }
45
  return $this->_config_settings[$key][$storeId];
46
  }
47
-
48
- /* public function getAccount($store = null)
49
- {
50
- if (!$this->hasData('checkoutredir_account')) {
51
- $this->setData('checkoutredir_account', $this->getConfigData('account', $storeId));
52
- }
53
-
54
- return $this->getData('checkoutredir_account');
55
- }
56
-
57
- public function getToken($store = null)
58
- {
59
- if (!$this->hasData('checkoutredir_token')) {
60
- $this->setData('checkoutredir_token', $this->getConfigData('token', $storeId));
61
- }
62
-
63
- return $this->getData('checkoutredir_token');
64
- }
65
-
66
- public function getUrl($store = null)
67
- {
68
- if (!$this->hasData('checkoutredir_url')) {
69
- $this->setData('checkoutredir_url', $this->getConfigData('url', $storeId));
70
- }
71
-
72
- return $this->getData('checkoutredir_url');
73
- }
74
- */
75
  public function getExibitionWebCheckout($storeId = null)
76
  {
77
  if (!$this->hasData('exibitionmodal')) {
44
  }
45
  return $this->_config_settings[$key][$storeId];
46
  }
47
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
48
  public function getExibitionWebCheckout($storeId = null)
49
  {
50
  if (!$this->hasData('exibitionmodal')) {
app/code/community/Tray/CheckoutRedir/Model/Source/Parcelas2.php DELETED
@@ -1,58 +0,0 @@
1
- <?php
2
- /**
3
- * Magento
4
- *
5
- * NOTICE OF LICENSE
6
- *
7
- * This source file is subject to the Open Software License (OSL 3.0)
8
- * that is bundled with this package in the file LICENSE.txt.
9
- * It is also available through the world-wide-web at this URL:
10
- * http://opensource.org/licenses/osl-3.0.php
11
- * If you did not receive a copy of the license and are unable to
12
- * obtain it through the world-wide-web, please send an email
13
- * to suporte@tray.net.br so we can send you a copy immediately.
14
- *
15
- * @category Tray
16
- * @package Tray_CheckoutRedir
17
- * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
18
- */
19
-
20
- //class Tray_CheckoutRedir_Model_Source_Parcelas
21
- //{
22
- //
23
- // /**
24
- // * Options getter
25
- // *
26
- // * @return array
27
- // */
28
- // public function toOptionArray()
29
- // {
30
- // return array(
31
- // array('value' => 1, 'label'=>Mage::helper('adminhtml')->__('01')),
32
- // array('value' => 2, 'label'=>Mage::helper('adminhtml')->__('02')),
33
- // array('value' => 3, 'label'=>Mage::helper('adminhtml')->__('03')),
34
- // array('value' => 4, 'label'=>Mage::helper('adminhtml')->__('04')),
35
- // array('value' => 5, 'label'=>Mage::helper('adminhtml')->__('05')),
36
- // array('value' => 6, 'label'=>Mage::helper('adminhtml')->__('06')),
37
- // array('value' => 7, 'label'=>Mage::helper('adminhtml')->__('07')),
38
- // array('value' => 8, 'label'=>Mage::helper('adminhtml')->__('08')),
39
- // array('value' => 9, 'label'=>Mage::helper('adminhtml')->__('09')),
40
- // array('value' => 10, 'label'=>Mage::helper('adminhtml')->__('10')),
41
- // array('value' => 11, 'label'=>Mage::helper('adminhtml')->__('11')),
42
- // array('value' => 12, 'label'=>Mage::helper('adminhtml')->__('12')),
43
- // array('value' => 13, 'label'=>Mage::helper('adminhtml')->__('13')),
44
- // array('value' => 14, 'label'=>Mage::helper('adminhtml')->__('14')),
45
- // array('value' => 15, 'label'=>Mage::helper('adminhtml')->__('15')),
46
- // array('value' => 16, 'label'=>Mage::helper('adminhtml')->__('16')),
47
- // array('value' => 17, 'label'=>Mage::helper('adminhtml')->__('17')),
48
- // array('value' => 18, 'label'=>Mage::helper('adminhtml')->__('18')),
49
- // array('value' => 19, 'label'=>Mage::helper('adminhtml')->__('19')),
50
- // array('value' => 20, 'label'=>Mage::helper('adminhtml')->__('20')),
51
- // array('value' => 21, 'label'=>Mage::helper('adminhtml')->__('21')),
52
- // array('value' => 22, 'label'=>Mage::helper('adminhtml')->__('22')),
53
- // array('value' => 23, 'label'=>Mage::helper('adminhtml')->__('23')),
54
- // array('value' => 24, 'label'=>Mage::helper('adminhtml')->__('24')),
55
- // );
56
- // }
57
- //
58
- //}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/Tray/CheckoutRedir/Model/Standard.php CHANGED
@@ -127,6 +127,7 @@ class Tray_CheckoutRedir_Model_Standard extends Mage_Payment_Model_Method_Abstra
127
  return true;
128
  }
129
 
 
130
  public function getCheckoutFormFields()
131
  {
132
  $orderIncrementId = $this->getCheckout()->getLastRealOrderId();
@@ -162,21 +163,34 @@ class Tray_CheckoutRedir_Model_Standard extends Mage_Payment_Model_Method_Abstra
162
  $shipping_description = $order->getData('shipping_description');
163
 
164
  $sArr = array();
165
- $number = substr(str_replace(" ","",str_replace("(","",str_replace(")","",str_replace("-","",$a->getTelephone())))),0,2) . substr(str_replace(" ","",str_replace("-","",$a->getTelephone())),-8);
166
 
167
  $sArr['token_account']= $this->getConfigData('token');
168
  $sArr['order_number']= $this->getConfigData('prefixo').$orderIncrementId;
 
 
 
 
 
 
 
 
 
 
 
 
169
 
170
  $sArr['customer[name]']= $a->getFirstname() . ' ' . str_replace("(pj)", "", $a->getLastname());
171
  $sArr['customer[addresses][][postal_code]']= $postal_code;
172
- $sArr['customer[addresses][][street]']= $a->getStreet(1);
173
- $sArr['customer[addresses][][completion]']= "";
174
- $sArr['customer[addresses][][neighborhood]']=$a->getStreet(2);
 
175
  $sArr['customer[addresses][][city]']= $a->getCity();
176
  $sArr['customer[addresses][][state]']= $a->getRegionCode();
177
- $sArr['customer[contacts][][number_contact]']= $number;
 
178
  $sArr['customer[email]']= $a->getEmail();
179
- $sArr['payment[payment_method_id]']= $payment_type;
180
 
181
  if ($items) {
182
  $i = 0;
@@ -205,10 +219,10 @@ class Tray_CheckoutRedir_Model_Standard extends Mage_Payment_Model_Method_Abstra
205
  $sArr['shipping_type']= $shipping_description;
206
  $sArr['shipping_price']= $shipping;
207
 
208
- $sArr = array_merge($sArr, array('url_process' => Mage::getUrl('checkoutredir/standard/success', array('_secure' => true, 'type' => 'geral'))));
209
- $sArr = array_merge($sArr, array('url_cancel' => Mage::getUrl('checkoutredir/standard/success', array('_secure' => true, 'type' => 'geral'))));
210
- $sArr = array_merge($sArr, array('url_success' => Mage::getUrl('checkoutredir/standard/success', array('_secure' => true, 'type' => 'geral'))));
211
- $sArr = array_merge($sArr, array('url_notification' => Mage::getUrl('checkoutredir/standard/success', array('_secure' => true, 'type' => 'geral'))));
212
 
213
  $sReq = '';
214
  $rArr = array();
@@ -227,9 +241,8 @@ class Tray_CheckoutRedir_Model_Standard extends Mage_Payment_Model_Method_Abstra
227
  return 'http://checkout.sandbox.tray.com.br/payment/transaction';
228
  } else {
229
  return 'https://checkout.tray.com.br/payment/transaction';
230
- // return 'http://gpereira.checkout.traycheckout.desenvolvimento.tray.intranet/payment/transaction';
231
  }
232
 
233
  }
234
-
235
  }
127
  return true;
128
  }
129
 
130
+
131
  public function getCheckoutFormFields()
132
  {
133
  $orderIncrementId = $this->getCheckout()->getLastRealOrderId();
163
  $shipping_description = $order->getData('shipping_description');
164
 
165
  $sArr = array();
166
+ $number_contact = substr(str_replace(" ","",str_replace("(","",str_replace(")","",str_replace("-","",$a->getTelephone())))),0,2) . substr(str_replace(" ","",str_replace("-","",$a->getTelephone())),-8);
167
 
168
  $sArr['token_account']= $this->getConfigData('token');
169
  $sArr['order_number']= $this->getConfigData('prefixo').$orderIncrementId;
170
+
171
+ // Dados de endereço
172
+ if ($this->getConfigData('custom_address_model', $order->getStoreId())) {
173
+ $street = $a->getStreet(1);
174
+ $number = $a->getStreet(2);
175
+ $completion = $a->getStreet(3);
176
+ $neighborhood = $a->getStreet(4);
177
+ } else {
178
+ list($street, $number, $completion) = Mage::helper('checkoutredir')->getAdress($a->getStreet(1));
179
+
180
+ $neighborhood = $a->getStreet(2);
181
+ }
182
 
183
  $sArr['customer[name]']= $a->getFirstname() . ' ' . str_replace("(pj)", "", $a->getLastname());
184
  $sArr['customer[addresses][][postal_code]']= $postal_code;
185
+ $sArr['customer[addresses][][street]']= $street;
186
+ $sArr['customer[addresses][][number]']= $number;
187
+ $sArr['customer[addresses][][completion]']= $completion;
188
+ $sArr['customer[addresses][][neighborhood]']=$neighborhood;
189
  $sArr['customer[addresses][][city]']= $a->getCity();
190
  $sArr['customer[addresses][][state]']= $a->getRegionCode();
191
+ $sArr['customer[contacts][][number_contact]']= $number_contact;
192
+ $sArr['customer[contacts][][type_contact]']= "H";
193
  $sArr['customer[email]']= $a->getEmail();
 
194
 
195
  if ($items) {
196
  $i = 0;
219
  $sArr['shipping_type']= $shipping_description;
220
  $sArr['shipping_price']= $shipping;
221
 
222
+ $sArr = array_merge($sArr, array('url_process' => Mage::getUrl('checkoutredir/standard/return', array('_secure' => true))));
223
+ $sArr = array_merge($sArr, array('url_success' => Mage::getUrl('checkoutredir/standard/return', array('_secure' => true))));
224
+
225
+ $sArr = array_merge($sArr, array('url_notification' => Mage::getUrl('checkoutredir/standard/success', array('_secure' => true, 'type' => 'geral'))));
226
 
227
  $sReq = '';
228
  $rArr = array();
241
  return 'http://checkout.sandbox.tray.com.br/payment/transaction';
242
  } else {
243
  return 'https://checkout.tray.com.br/payment/transaction';
 
244
  }
245
 
246
  }
247
+
248
  }
app/code/community/Tray/CheckoutRedir/controllers/StandardController.php CHANGED
@@ -94,7 +94,7 @@ class Tray_CheckoutRedir_StandardController extends Mage_Core_Controller_Front_A
94
  }
95
 
96
  /**
97
- * Get singleton with pagamento digital standard order transaction information
98
  *
99
  * @return Tray_CheckoutRedir_Model_Api
100
  */
@@ -109,10 +109,6 @@ class Tray_CheckoutRedir_StandardController extends Mage_Core_Controller_Front_A
109
  */
110
  public function redirectAction()
111
  {
112
- /*
113
- * caso precise para identificar o tipo de modelo.
114
- * Ex: $this->getResponse()->setBody($this->getLayout()->createBlock('checkoutredir/redirect_{$type}}')->toHtml());
115
- */
116
 
117
  $type = $this->getRequest()->getParam('type', false);
118
 
@@ -128,7 +124,7 @@ class Tray_CheckoutRedir_StandardController extends Mage_Core_Controller_Front_A
128
  }
129
 
130
  /**
131
- * When a customer cancel payment from pagamento digital.
132
  */
133
  public function cancelAction()
134
  {
@@ -161,7 +157,7 @@ class Tray_CheckoutRedir_StandardController extends Mage_Core_Controller_Front_A
161
  }
162
 
163
  /**
164
- * when pagamento_digital returns
165
  * The order information at this point is in POST
166
  * variables. However, you don't want to "process" the order until you
167
  * get validation from the return post.
94
  }
95
 
96
  /**
97
+ * Get singleton with checkout standard order transaction information
98
  *
99
  * @return Tray_CheckoutRedir_Model_Api
100
  */
109
  */
110
  public function redirectAction()
111
  {
 
 
 
 
112
 
113
  $type = $this->getRequest()->getParam('type', false);
114
 
124
  }
125
 
126
  /**
127
+ * When a customer cancel payment from traycheckout .
128
  */
129
  public function cancelAction()
130
  {
157
  }
158
 
159
  /**
160
+ * when checkout returns
161
  * The order information at this point is in POST
162
  * variables. However, you don't want to "process" the order until you
163
  * get validation from the return post.
app/code/community/Tray/CheckoutRedir/etc/config.xml CHANGED
@@ -131,7 +131,6 @@
131
  </layout>
132
  </adminhtml>
133
  <default>
134
- <!-- incluir as configurações de acordo com cada modelo -->
135
  <payment>
136
  <checkoutredir_geral>
137
  <active>0</active>
@@ -139,7 +138,7 @@
139
  <order_status>pending</order_status>
140
  <title>Tray Checkout</title>
141
  <allowspecific>1</allowspecific>
142
- <retorno>http://www.urldoseusite.com.br/index.php/CheckoutRedir_PdGeral/standard/success/</retorno>
143
  </checkoutredir_geral>
144
  </payment>
145
  <checkoutredir>
131
  </layout>
132
  </adminhtml>
133
  <default>
 
134
  <payment>
135
  <checkoutredir_geral>
136
  <active>0</active>
138
  <order_status>pending</order_status>
139
  <title>Tray Checkout</title>
140
  <allowspecific>1</allowspecific>
141
+ <retorno>http://www.urldoseusite.com.br/index.php/CheckoutRedir_Geral/standard/success/</retorno>
142
  </checkoutredir_geral>
143
  </payment>
144
  <checkoutredir>
app/code/community/Tray/CheckoutRedir/etc/system.xml CHANGED
@@ -61,6 +61,16 @@
61
  <show_in_website>1</show_in_website>
62
  <show_in_store>0</show_in_store>
63
  </order_status>
 
 
 
 
 
 
 
 
 
 
64
  <token translate="label">
65
  <label>Token</label>
66
  <frontend_type>text</frontend_type>
@@ -70,7 +80,7 @@
70
  <show_in_store>0</show_in_store>
71
  </token>
72
  <acaopadraovirtual translate="label">
73
- <label>Gerar Fatura automaticamente para pedidos com produtos virtuais? (Completar)</label>
74
  <frontend_type>select</frontend_type>
75
  <sort_order>8</sort_order>
76
  <source_model>adminhtml/system_config_source_yesno</source_model>
@@ -113,7 +123,7 @@
113
  <show_in_store>1</show_in_store>
114
  </sort_order>
115
  <sandbox translate="label">
116
- <label>Ambiente de Teste(Sandbox)</label>
117
  <frontend_type>select</frontend_type>
118
  <source_model>adminhtml/system_config_source_yesno</source_model>
119
  <sort_order>200</sort_order>
@@ -123,8 +133,6 @@
123
  </sandbox>
124
  <masklabel>
125
  <label>Exibição do WebCheckout</label>
126
- <!-- <comment>descriptionnnnnn.</comment> -->
127
- <!-- <button_label>Adicionar</button_label> -->
128
  <frontend_model>checkoutredir/adminhtml_system_config_fieldset_label</frontend_model>
129
  <sort_order>1000</sort_order>
130
  <show_in_default>1</show_in_default>
61
  <show_in_website>1</show_in_website>
62
  <show_in_store>0</show_in_store>
63
  </order_status>
64
+ <custom_address_model translate="label, comment">
65
+ <label>Modelo de Endereço Personalizado</label>
66
+ <frontend_type>select</frontend_type>
67
+ <source_model>adminhtml/system_config_source_yesno</source_model>
68
+ <sort_order>5</sort_order>
69
+ <show_in_default>1</show_in_default>
70
+ <show_in_website>1</show_in_website>
71
+ <show_in_store>1</show_in_store>
72
+ <comment>Necessário disponibilizar quatro campos de endereço para habilitar.</comment>
73
+ </custom_address_model>
74
  <token translate="label">
75
  <label>Token</label>
76
  <frontend_type>text</frontend_type>
80
  <show_in_store>0</show_in_store>
81
  </token>
82
  <acaopadraovirtual translate="label">
83
+ <label>Gerar Fatura automaticamente para pedidos com produtos virtuais?</label>
84
  <frontend_type>select</frontend_type>
85
  <sort_order>8</sort_order>
86
  <source_model>adminhtml/system_config_source_yesno</source_model>
123
  <show_in_store>1</show_in_store>
124
  </sort_order>
125
  <sandbox translate="label">
126
+ <label>Ambiente de Teste (Sandbox)</label>
127
  <frontend_type>select</frontend_type>
128
  <source_model>adminhtml/system_config_source_yesno</source_model>
129
  <sort_order>200</sort_order>
133
  </sandbox>
134
  <masklabel>
135
  <label>Exibição do WebCheckout</label>
 
 
136
  <frontend_model>checkoutredir/adminhtml_system_config_fieldset_label</frontend_model>
137
  <sort_order>1000</sort_order>
138
  <show_in_default>1</show_in_default>
app/design/frontend/base/default/template/tray/checkoutredir/overlay.phtml CHANGED
@@ -20,7 +20,7 @@
20
 
21
  <div id="overlay-tc">
22
  <center>
23
- <div id="lightboxpd" style="padding: 10px;background-color: #fff;width: 980px;margin-top: 50px" >
24
  <img src="<?php echo $this->getSkinUrl('tray/checkoutredir/images/close.png'); ?>" style="position: relative;margin-left: 970px;margin-top: -20px;" />
25
  <iframe name="tc_frame" width="970" height="700" style="border:0px" ></iframe>
26
  </div>
20
 
21
  <div id="overlay-tc">
22
  <center>
23
+ <div id="lightboxtc" style="padding: 10px;background-color: #fff;width: 980px;margin-top: 50px" >
24
  <img src="<?php echo $this->getSkinUrl('tray/checkoutredir/images/close.png'); ?>" style="position: relative;margin-left: 970px;margin-top: -20px;" />
25
  <iframe name="tc_frame" width="970" height="700" style="border:0px" ></iframe>
26
  </div>
package.xml CHANGED
@@ -1,18 +1,18 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Tray_CheckoutRedir</name>
4
- <version>1.0.0.0</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>Extens&#xE3;o Tray Checkout para Magento</summary>
10
- <description>O TrayCheckout &#xE9; um facilitador de pagamento que oferece benef&#xED;cios aos lojistas e aos compradores. Focado em praticidade e convers&#xE3;o, possibilita que as lojas virtuais ofere&#xE7;am diversas formas de pagamento, sem burocracia ou necessidade de contrato com operadoras financeiras. </description>
11
  <notes>Primeira vers&#xE3;o liberada no Magento Connect</notes>
12
  <authors><author><name>Igor</name><user>igor</user><email>ifredi@tray.net.br</email></author></authors>
13
- <date>2013-02-06</date>
14
- <time>17:49:24</time>
15
- <contents><target name="magecommunity"><dir name="Tray"><dir name="CheckoutRedir"><dir name="Block"><dir name="Adminhtml"><dir name="System"><dir name="Config"><dir name="Fieldset"><file name="Label.php" hash="4b644caa67c70bbea2762ba16db35779"/></dir></dir></dir></dir><file name="Error.php" hash="eabab960a3c44358762cf531d04831fb"/><dir name="Form"><file name="Geral.php" hash="3964d2e6a2db70bc5a909009feb60103"/></dir><dir name="Info"><file name="Geral.php" hash="66bff552a355e90fefff155de67e043a"/></dir><file name="Link.php" hash="a019874d3407309ea721c818ae9dcf16"/><file name="Payment.php" hash="3f5291e1f400fee64fee340646648971"/><file name="Redirect.php" hash="a37c21f8d17b84c1c0cf61bfa1332fc9"/><file name="Return.php" hash="55c255d083acaff20252ba2ee99424d5"/></dir><dir name="Helper"><file name="Data.php" hash="25e24f25c063cb6af3085f59974ba7ec"/></dir><dir name="Model"><file name="Config.php" hash="7d91c6ebe4952f0a7c02339f8cb7c6ab"/><file name="Geral.php" hash="ff8e60aa1208f9e3a8f4561e94e97e25"/><dir name="Mysql4"><file name="Setup.php" hash="762ac20737d9a60e706458e2f0af4129"/></dir><file name="Observer.php" hash="1089a6badfbd0a6d49e9920730ecf123"/><dir name="Source"><file name="Country.php" hash="0d88f7c80aa95e3bce20e36364aba098"/><file name="Parcelas2.php" hash="e568d310c3cd99d5a60ba6799da7beb0"/><file name="Specificcountries.php" hash="c1ed7900cdb7400f40f63bd6aefdddf0"/><file name="Webcheckout.php" hash="f513de61d0582f7b541872cf8a0bbfaa"/></dir><file name="Standard.php" hash="8533d1ed9785cc401ba38189ea4d7407"/></dir><dir name="controllers"><file name="StandardController.php" hash="b4a5a49a117d1702f11a276b6cb3eecb"/></dir><dir name="etc"><file name="adminhtml.xml" hash="e8d5be5396fdb8177a327597cb863d94"/><file name="config.xml" hash="9e6990549a3b2406dfecee42c1cff83a"/><file name="system.xml" hash="1ff80e5e11c22d8ad825edff02c342b2"/></dir><dir name="sql"><dir name="checkoutredir_setup"><file name="mysql4-install-0.1.7.php" hash="5c2f7dbc2f38eea387c7bea0a53cae28"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="tray"><dir name="checkoutredir"><file name="error.phtml" hash="575e0c286c99e173619eb2be6ee9fde2"/><dir name="form"><file name="geral.phtml" hash="a2c7e26734d1082a4db9706ff785f560"/><dir name="images"><file name="overlay.png" hash="143d209e15051311fdae758b295036b5"/></dir></dir><file name="head.phtml" hash="1f4103303b8c7de8daf1fe23e118fadf"/><dir name="info"><file name="geral.phtml" hash="f7eb257a40bdf69931ba5514859de82a"/></dir><file name="overlay.phtml" hash="83785591a6614a1b6e83714db1725c13"/><file name="payment.phtml" hash="a8d5d3d2f7014711c8360c9dfc35ea92"/><file name="return.phtml" hash="07a60f0d3549e4fb49d7b3ab27917530"/></dir></dir></dir><dir name="layout"><file name="tray_checkoutredir.xml" hash="801629ab06f617f64f7a468ad06f80a6"/></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="tray"><dir name="checkoutredir"><dir name="form"><file name="geral.phtml" hash="7ea2cacf9c9eef1be914599bf6d00d23"/></dir><file name="getbaseurl.phtml" hash="17ceee44d6bb7af60e69baa39f031b0c"/><dir name="info"><file name="geral.phtml" hash="f7eb257a40bdf69931ba5514859de82a"/></dir></dir></dir></dir><dir name="layout"><file name="tray_checkoutredir.xml" hash="9215e9445b80df8e86c45383af64ab05"/></dir></dir></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="tray"><dir name="checkoutredir"><dir name="css"><file name="styles.css" hash="5d09463e234fd2f20622f63795019be6"/></dir><dir name="images"><file name="BannerTrayCheckout890px.png" hash="535d5a4a4f190d03df38664dcb6463f8"/><file name="banner_comlogo_formas.jpg" hash="e02a16c32109746786c24db177ddad3a"/><file name="banner_semlogo_formas.jpg" hash="4f13591f17ed96347f136eab09343121"/><file name="banner_semlogo_formas.png" hash="84a82c3d7ed9a42ade9660b8dd16511d"/><file name="close.png" hash="6e2879a324a76e9972ebc98201aae1d8"/><file name="overlay.png" hash="143d209e15051311fdae758b295036b5"/></dir></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="tray"><dir name="checkoutredir"><dir name="css"><file name="magentomodal.css" hash="2c6dd38e421f644475a121b8d6c96503"/></dir><dir name="images"><file name="btn_bg.gif" hash="37c51a4d48a92da9648dcd3ca011039f"/><file name="content_bg.gif" hash="21278ea0da2d4256f4ced96b6080ba2e"/><file name="top_bg.gif" hash="26f28090de87d64f9b01bf624f89bfe2"/><file name="window_close.png" hash="3af14f053f360bf31f8ba2df73ec7f1e"/></dir><dir name="js"><file name="exibitionsettingswebcheckout.js" hash="430c1ce2ecaab27f4ae1ab9a649667cd"/></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Tray_CheckoutRedir.xml" hash="7d1a3d97b6c809036a887699f05dc24a"/></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php><package><name>Mage_Core_Modules</name><channel>community</channel><min>1.6.0.0</min><max>1.7</max></package></required></dependencies>
18
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Tray_CheckoutRedir</name>
4
+ <version>1.0.0.1</version>
5
  <stability>stable</stability>
6
  <license uri="http://opensource.org/licenses/osl-3.0.php">OSL v3.0</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>Extens&#xE3;o Tray Checkout para Magento</summary>
10
+ <description>O TrayCheckout &#xE9; um facilitador de pagamento que oferece benef&#xED;cios aos lojistas e aos compradores. Focado em praticidade e convers&#xE3;o, possibilita que as lojas virtuais ofere&#xE7;am diversas formas de pagamento, sem burocracia ou necessidade de contrato com operadoras financeiras.</description>
11
  <notes>Primeira vers&#xE3;o liberada no Magento Connect</notes>
12
  <authors><author><name>Igor</name><user>igor</user><email>ifredi@tray.net.br</email></author></authors>
13
+ <date>2013-02-14</date>
14
+ <time>12:53:58</time>
15
+ <contents><target name="magecommunity"><dir name="Tray"><dir name="CheckoutRedir"><dir name="Block"><dir name="Adminhtml"><dir name="System"><dir name="Config"><dir name="Fieldset"><file name="Label.php" hash="4b644caa67c70bbea2762ba16db35779"/></dir></dir></dir></dir><file name="Error.php" hash="eabab960a3c44358762cf531d04831fb"/><dir name="Form"><file name="Geral.php" hash="3964d2e6a2db70bc5a909009feb60103"/></dir><dir name="Info"><file name="Geral.php" hash="66bff552a355e90fefff155de67e043a"/></dir><file name="Link.php" hash="a019874d3407309ea721c818ae9dcf16"/><file name="Payment.php" hash="3f5291e1f400fee64fee340646648971"/><file name="Redirect.php" hash="a37c21f8d17b84c1c0cf61bfa1332fc9"/><file name="Return.php" hash="55c255d083acaff20252ba2ee99424d5"/></dir><dir name="Helper"><file name="Adress.php" hash="5c7df6a36b8865b3f076dd4a23514878"/><file name="Data.php" hash="28e9413b57967b95d8626bbae5e58b14"/></dir><dir name="Model"><file name="Config.php" hash="b5ef28f69a0386cae6956a8c50409009"/><file name="Geral.php" hash="ff8e60aa1208f9e3a8f4561e94e97e25"/><dir name="Mysql4"><file name="Setup.php" hash="762ac20737d9a60e706458e2f0af4129"/></dir><file name="Observer.php" hash="1089a6badfbd0a6d49e9920730ecf123"/><dir name="Source"><file name="Country.php" hash="0d88f7c80aa95e3bce20e36364aba098"/><file name="Specificcountries.php" hash="c1ed7900cdb7400f40f63bd6aefdddf0"/><file name="Webcheckout.php" hash="f513de61d0582f7b541872cf8a0bbfaa"/></dir><file name="Standard.php" hash="f3aa4d90c13a6065930eb30c96351ef4"/></dir><dir name="controllers"><file name="StandardController.php" hash="d6442202bf71881dfb752f1fed6d20e3"/></dir><dir name="etc"><file name="adminhtml.xml" hash="e8d5be5396fdb8177a327597cb863d94"/><file name="config.xml" hash="2320bdb90bddf1fdf0717f7a3426f757"/><file name="system.xml" hash="3fbc4d4b6942747257f42bed8cf5507e"/></dir><dir name="sql"><dir name="checkoutredir_setup"><file name="mysql4-install-0.1.7.php" hash="5c2f7dbc2f38eea387c7bea0a53cae28"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="tray"><dir name="checkoutredir"><file name="error.phtml" hash="575e0c286c99e173619eb2be6ee9fde2"/><dir name="form"><file name="geral.phtml" hash="a2c7e26734d1082a4db9706ff785f560"/><dir name="images"><file name="overlay.png" hash="143d209e15051311fdae758b295036b5"/></dir></dir><file name="head.phtml" hash="1f4103303b8c7de8daf1fe23e118fadf"/><dir name="info"><file name="geral.phtml" hash="f7eb257a40bdf69931ba5514859de82a"/></dir><file name="overlay.phtml" hash="28af78c90dd64911b6f857d94b9dbc79"/><file name="payment.phtml" hash="a8d5d3d2f7014711c8360c9dfc35ea92"/><file name="return.phtml" hash="07a60f0d3549e4fb49d7b3ab27917530"/></dir></dir></dir><dir name="layout"><file name="tray_checkoutredir.xml" hash="801629ab06f617f64f7a468ad06f80a6"/></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="template"><dir name="tray"><dir name="checkoutredir"><dir name="form"><file name="geral.phtml" hash="7ea2cacf9c9eef1be914599bf6d00d23"/></dir><file name="getbaseurl.phtml" hash="17ceee44d6bb7af60e69baa39f031b0c"/><dir name="info"><file name="geral.phtml" hash="f7eb257a40bdf69931ba5514859de82a"/></dir></dir></dir></dir><dir name="layout"><file name="tray_checkoutredir.xml" hash="9215e9445b80df8e86c45383af64ab05"/></dir></dir></dir></dir></target><target name="mageskin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="tray"><dir name="checkoutredir"><dir name="css"><file name="styles.css" hash="5d09463e234fd2f20622f63795019be6"/></dir><dir name="images"><file name="BannerTrayCheckout890px.png" hash="535d5a4a4f190d03df38664dcb6463f8"/><file name="banner_comlogo_formas.jpg" hash="e02a16c32109746786c24db177ddad3a"/><file name="banner_semlogo_formas.jpg" hash="4f13591f17ed96347f136eab09343121"/><file name="banner_semlogo_formas.png" hash="84a82c3d7ed9a42ade9660b8dd16511d"/><file name="close.png" hash="6e2879a324a76e9972ebc98201aae1d8"/><file name="overlay.png" hash="143d209e15051311fdae758b295036b5"/></dir></dir></dir></dir></dir></dir><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="tray"><dir name="checkoutredir"><dir name="css"><file name="magentomodal.css" hash="2c6dd38e421f644475a121b8d6c96503"/></dir><dir name="images"><file name="btn_bg.gif" hash="37c51a4d48a92da9648dcd3ca011039f"/><file name="content_bg.gif" hash="21278ea0da2d4256f4ced96b6080ba2e"/><file name="top_bg.gif" hash="26f28090de87d64f9b01bf624f89bfe2"/><file name="window_close.png" hash="3af14f053f360bf31f8ba2df73ec7f1e"/></dir><dir name="js"><file name="exibitionsettingswebcheckout.js" hash="430c1ce2ecaab27f4ae1ab9a649667cd"/></dir></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Tray_CheckoutRedir.xml" hash="7d1a3d97b6c809036a887699f05dc24a"/></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php><package><name>Mage_Core_Modules</name><channel>community</channel><min>1.6.0.0</min><max>1.7</max></package></required></dependencies>
18
  </package>