Pagantis_Pagantis - Version 3.1.4

Version Notes

Add cancelled url

Download this release

Release Info

Developer Albert Fatsini
Extension Pagantis_Pagantis
Version 3.1.4
Comparing to
See all releases


Code changes from version 3.1.1 to 3.1.4

app/code/community/Pagantis/Pagantis/Helper/Data.php CHANGED
@@ -89,15 +89,16 @@ class Pagantis_Pagantis_Helper_Data extends Mage_Core_Helper_Abstract
89
  $language = $this->getConsumerLanguage($localeCode);
90
  $order = Mage::getModel('sales/order')->loadByIncrementId($orderId);
91
  $addressId = $order->getShippingAddress()->getId();
 
92
 
93
 
94
  $request = Mage::getModel('pagantis_pagantis/webservice_requestloan');
95
  $request->setOrderId($orderId);
96
  $request->setAmount($amount);
97
  $request->setLanguagePagantis($language);
98
- //$request->setUrlPagantis($this->_config['url_pagantis_mastarde']);
99
  $request->setUrlPagantis (Pagantis_Pagantis_Model_Payment::PMT_URL);
100
  $request->setUserData($addressId);
 
101
  $request->setOrderItems($orderId);
102
  $request->setAmount($amount);
103
  $request->setDiscount($this->_config['discount']);
@@ -115,6 +116,7 @@ class Pagantis_Pagantis_Helper_Data extends Mage_Core_Helper_Abstract
115
  }
116
  $request->setUrlOk();
117
  $request->setUrlKo();
 
118
  $request->setCacllbackUrl();
119
  $request->setFirma();
120
  return $request;
@@ -133,15 +135,16 @@ class Pagantis_Pagantis_Helper_Data extends Mage_Core_Helper_Abstract
133
  $language = $this->getConsumerLanguage($localeCode);
134
  $order = Mage::getModel('sales/order')->loadByIncrementId($orderId);
135
  $addressId = $order->getShippingAddress()->getId();
 
136
 
137
 
138
  $request = Mage::getModel('pagantis_pagantis/webservice_requestloan');
139
  $request->setOrderId($orderId);
140
  $request->setAmount($amount);
141
  $request->setLanguagePagantis($language);
142
- //$request->setUrlPagantis($this->_config['url_pagantis_mastarde']);
143
  $request->setUrlPagantis (Pagantis_Pagantis_Model_Payment::PMT_URL);
144
  $request->setUserData($addressId);
 
145
  $request->setOrderItems($orderId);
146
  $request->setAmount($amount);
147
  $request->setDiscount($this->_config['discount']);
@@ -159,6 +162,7 @@ class Pagantis_Pagantis_Helper_Data extends Mage_Core_Helper_Abstract
159
  }
160
  $request->setUrlOk();
161
  $request->setUrlKo();
 
162
  $request->setCacllbackUrl();
163
  $request->setFirma();
164
 
@@ -192,20 +196,7 @@ class Pagantis_Pagantis_Helper_Data extends Mage_Core_Helper_Abstract
192
 
193
 
194
  public function getUrlPagantis() {
195
-
196
  return Pagantis_Pagantis_Model_Payment::PMT_URL;
197
- //allways same url, no need to make this check
198
- /*
199
- $paymentDetails = $this->_getCheckoutSession()->getPaymentMethodDetail();
200
- switch($paymentDetails) {
201
- case Pagantis_Pagantis_Model_Payment::PAYMENT_UNIQUE:
202
- return $this->_config['url_pagantis'];
203
- break;
204
- case Pagantis_Pagantis_Model_Payment::PAYMENT_LOAN:
205
- return $this->_config['url_pagantis_mastarde'];
206
- break;
207
- }
208
- */
209
  }
210
 
211
  /**
89
  $language = $this->getConsumerLanguage($localeCode);
90
  $order = Mage::getModel('sales/order')->loadByIncrementId($orderId);
91
  $addressId = $order->getShippingAddress()->getId();
92
+ $addressBillingId = $order->getBillingAddress()->getId();
93
 
94
 
95
  $request = Mage::getModel('pagantis_pagantis/webservice_requestloan');
96
  $request->setOrderId($orderId);
97
  $request->setAmount($amount);
98
  $request->setLanguagePagantis($language);
 
99
  $request->setUrlPagantis (Pagantis_Pagantis_Model_Payment::PMT_URL);
100
  $request->setUserData($addressId);
101
+ $request->setUserBillData($addressBillingId);
102
  $request->setOrderItems($orderId);
103
  $request->setAmount($amount);
104
  $request->setDiscount($this->_config['discount']);
116
  }
117
  $request->setUrlOk();
118
  $request->setUrlKo();
119
+ $request->setUrlCancelled();
120
  $request->setCacllbackUrl();
121
  $request->setFirma();
122
  return $request;
135
  $language = $this->getConsumerLanguage($localeCode);
136
  $order = Mage::getModel('sales/order')->loadByIncrementId($orderId);
137
  $addressId = $order->getShippingAddress()->getId();
138
+ $addressBillingId = $order->getBillingAddress()->getId();
139
 
140
 
141
  $request = Mage::getModel('pagantis_pagantis/webservice_requestloan');
142
  $request->setOrderId($orderId);
143
  $request->setAmount($amount);
144
  $request->setLanguagePagantis($language);
 
145
  $request->setUrlPagantis (Pagantis_Pagantis_Model_Payment::PMT_URL);
146
  $request->setUserData($addressId);
147
+ $request->setUserBillData($addressBillingId);
148
  $request->setOrderItems($orderId);
149
  $request->setAmount($amount);
150
  $request->setDiscount($this->_config['discount']);
162
  }
163
  $request->setUrlOk();
164
  $request->setUrlKo();
165
+ $request->setUrlCancelled();
166
  $request->setCacllbackUrl();
167
  $request->setFirma();
168
 
196
 
197
 
198
  public function getUrlPagantis() {
 
199
  return Pagantis_Pagantis_Model_Payment::PMT_URL;
 
 
 
 
 
 
 
 
 
 
 
 
200
  }
201
 
202
  /**
app/code/community/Pagantis/Pagantis/Model/Webservice/Request.php CHANGED
@@ -110,6 +110,7 @@ class Pagantis_Pagantis_Model_Webservice_Request
110
  $array['ok_url'] = $this->_urlOk;
111
  $array['nok_url'] = $this->_urlKo;
112
  $array['callback_url'] = $this->_callback_url;
 
113
  $array['iframe'] = $this->_iframe;
114
  //$array['urlPagantis'] = $this->_urlPagantis;
115
  $array['discount[full]'] = $this->_discount;
@@ -119,10 +120,14 @@ class Pagantis_Pagantis_Model_Webservice_Request
119
  $array['phone'] = $this->_userData['phone'];
120
  $array['full_name'] = $this->_userData['full_name'];
121
  $array['email'] = $this->_userData['email'];
122
- $array['address[street]'] = $this->_userData['street'];
123
- $array['address[city]'] = $this->_userData['city'];
124
- $array['address[province]'] = $this->_userData['province'];
125
- $array['address[zipcode]'] = $this->_userData['zipcode'];
 
 
 
 
126
  $array['dni'] = $this->_userData['dni'];
127
 
128
  foreach($this->_items as $key => $value){
@@ -222,6 +227,31 @@ class Pagantis_Pagantis_Model_Webservice_Request
222
  }
223
  }
224
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
225
  /**
226
  * Assign user data
227
  * @param string $addressId
@@ -367,6 +397,20 @@ class Pagantis_Pagantis_Model_Webservice_Request
367
  }
368
  }
369
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
370
  /**
371
  * @param string $urlnok
372
  * @throws Exception
@@ -389,9 +433,11 @@ class Pagantis_Pagantis_Model_Webservice_Request
389
  */
390
  public function setFirma()
391
  {
392
- $textToEncode = $this->_accountKey . $this->_accountCode . $this->_orderId . $this->_amount . $this->_currency . $this->_urlOk . $this->_urlKo . $this->_callback_url . $this->_discount;
393
  //encoding is SHA1
394
  $this->_firma = sha1($textToEncode);
 
 
395
  /*
396
  if (strlen(trim($textToEncode)) > 0) {
397
  // Retrieve del SHA1
110
  $array['ok_url'] = $this->_urlOk;
111
  $array['nok_url'] = $this->_urlKo;
112
  $array['callback_url'] = $this->_callback_url;
113
+ $array['cancelled_url'] = $this->_urlCancel;
114
  $array['iframe'] = $this->_iframe;
115
  //$array['urlPagantis'] = $this->_urlPagantis;
116
  $array['discount[full]'] = $this->_discount;
120
  $array['phone'] = $this->_userData['phone'];
121
  $array['full_name'] = $this->_userData['full_name'];
122
  $array['email'] = $this->_userData['email'];
123
+ $array['address[street]'] = $this->_userData['Bstreet'];
124
+ $array['address[city]'] = $this->_userData['Bcity'];
125
+ $array['address[province]'] = $this->_userData['Bprovince'];
126
+ $array['address[zipcode]'] = $this->_userData['Bzipcode'];
127
+ $array['shipping[street]'] = $this->_userData['street'];
128
+ $array['shipping[city]'] = $this->_userData['city'];
129
+ $array['shipping[province]'] = $this->_userData['province'];
130
+ $array['shipping[zipcode]'] = $this->_userData['zipcode'];
131
  $array['dni'] = $this->_userData['dni'];
132
 
133
  foreach($this->_items as $key => $value){
227
  }
228
  }
229
 
230
+ /**
231
+ * Assign user data
232
+ * @param string $addressId
233
+ * @throws Exception
234
+ */
235
+ public function setUserBillData($addressId)
236
+ {
237
+ if ($addressId) {
238
+ $address = Mage::getModel('sales/order_address')->load($addressId);
239
+ $street = $address->getStreet();
240
+ if ($street){
241
+ $this->_userData['Bstreet'] = $street[0];
242
+ }
243
+ $this->_userData['Bcity'] = $address->getCity();
244
+ $this->_userData['Bprovince'] = $address->getCity();
245
+ $this->_userData['Bzipcode'] = $address->getPostcode();
246
+ $this->_userData['Bdni'] = $address->getVatId();
247
+ $this->_userData['Bfull_name'] = $address->getFirstname() . ' ' . $address->getLastname();
248
+ $this->_userData['Bemail'] = $address->getEmail();
249
+ $this->_userData['Bphone'] = $address->getTelephone();
250
+ } else {
251
+ throw new \Exception('Missing user data info');
252
+ }
253
+ }
254
+
255
  /**
256
  * Assign user data
257
  * @param string $addressId
397
  }
398
  }
399
 
400
+ /**
401
+ * @param string $urlnok
402
+ * @throws Exception
403
+ */
404
+ public function setUrlCancelled($urlKo = '')
405
+ {
406
+ $urlCancel = Mage::helper('checkout/url')->getCheckoutUrl();
407
+ if (strlen(trim($urlCancel)) > 0) {
408
+ $this->_urlCancel = $urlCancel;
409
+ } else {
410
+ throw new \Exception('UrlKo not defined');
411
+ }
412
+ }
413
+
414
  /**
415
  * @param string $urlnok
416
  * @throws Exception
433
  */
434
  public function setFirma()
435
  {
436
+ $textToEncode = $this->_accountKey . $this->_accountCode . $this->_orderId . $this->_amount . $this->_currency . $this->_urlOk . $this->_urlKo . $this->_callback_url . $this->_discount. $this->_urlCancel;
437
  //encoding is SHA1
438
  $this->_firma = sha1($textToEncode);
439
+ //encoding is SHA512
440
+ $this->_firma = hash('sha512',$textToEncode);
441
  /*
442
  if (strlen(trim($textToEncode)) > 0) {
443
  // Retrieve del SHA1
app/code/community/Pagantis/Pagantis/Model/Webservice/Requestloan.php CHANGED
@@ -111,6 +111,7 @@ class Pagantis_Pagantis_Model_Webservice_Requestloan
111
  $array['ok_url'] = $this->_urlOk;
112
  $array['nok_url'] = $this->_urlKo;
113
  $array['callback_url'] = $this->_callback_url;
 
114
  $array['discount[full]'] = $this->_discount;
115
  $array['iframe'] = $this->_iframe;
116
  $array['end_of_month'] = $this->_end_of_month;
@@ -119,10 +120,14 @@ class Pagantis_Pagantis_Model_Webservice_Requestloan
119
  $array['mobile_phone'] = $this->_userData['mobile_phone'];
120
  $array['full_name'] = $this->_userData['full_name'];
121
  $array['email'] = $this->_userData['email'];
122
- $array['address[street]'] = $this->_userData['street'];
123
- $array['address[city]'] = $this->_userData['city'];
124
- $array['address[province]'] = $this->_userData['province'];
125
- $array['address[zipcode]'] = $this->_userData['zipcode'];
 
 
 
 
126
  $array['dni'] = $this->_userData['dni'];
127
  $array['dob'] = $this->_userData['dob'];
128
 
@@ -250,6 +255,33 @@ class Pagantis_Pagantis_Model_Webservice_Requestloan
250
  }
251
  }
252
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
253
  /**
254
  * Assign user data
255
  * @param string $addressId
@@ -383,6 +415,20 @@ class Pagantis_Pagantis_Model_Webservice_Requestloan
383
  }
384
  }
385
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
386
  /**
387
  * @param string $urlnok
388
  * @throws Exception
@@ -406,9 +452,11 @@ class Pagantis_Pagantis_Model_Webservice_Requestloan
406
  */
407
  public function setFirma()
408
  {
409
- $textToEncode = $this->_accountKey . $this->_accountCode . $this->_orderId . $this->_amount . $this->_currency . $this->_urlOk . $this->_urlKo . $this->_callback_url . $this->_discount;
410
  //encoding is SHA1
411
  $this->_firma = sha1($textToEncode);
 
 
412
  /*
413
  if (strlen(trim($textToEncode)) > 0) {
414
  // Retrieve del SHA1
111
  $array['ok_url'] = $this->_urlOk;
112
  $array['nok_url'] = $this->_urlKo;
113
  $array['callback_url'] = $this->_callback_url;
114
+ $array['cancelled_url'] = $this->_urlCancel;
115
  $array['discount[full]'] = $this->_discount;
116
  $array['iframe'] = $this->_iframe;
117
  $array['end_of_month'] = $this->_end_of_month;
120
  $array['mobile_phone'] = $this->_userData['mobile_phone'];
121
  $array['full_name'] = $this->_userData['full_name'];
122
  $array['email'] = $this->_userData['email'];
123
+ $array['address[street]'] = $this->_userData['Bstreet'];
124
+ $array['address[city]'] = $this->_userData['Bcity'];
125
+ $array['address[province]'] = $this->_userData['Bprovince'];
126
+ $array['address[zipcode]'] = $this->_userData['Bzipcode'];
127
+ $array['shipping[street]'] = $this->_userData['street'];
128
+ $array['shipping[city]'] = $this->_userData['city'];
129
+ $array['shipping[province]'] = $this->_userData['province'];
130
+ $array['shipping[zipcode]'] = $this->_userData['zipcode'];
131
  $array['dni'] = $this->_userData['dni'];
132
  $array['dob'] = $this->_userData['dob'];
133
 
255
  }
256
  }
257
 
258
+ /**
259
+ * Assign user data
260
+ * @param string $addressId
261
+ * @throws Exception
262
+ */
263
+ public function setUserBillData($addressId)
264
+ {
265
+ if ($addressId) {
266
+ $address = Mage::getModel('sales/order_address')->load($addressId);
267
+ $street = $address->getStreet();
268
+ if ($street){
269
+ $this->_userData['Bstreet'] = $street[0];
270
+ }
271
+ $this->_userData['Bcity'] = $address->getCity();
272
+ $this->_userData['Bprovince'] = $address->getCity();
273
+ $this->_userData['Bzipcode'] = $address->getPostcode();
274
+ $this->_userData['Bdni'] = $address->getVatId();
275
+ $this->_userData['Bfull_name'] = $address->getFirstname() . ' ' . $address->getLastname();
276
+ $this->_userData['Bemail'] = $address->getEmail();
277
+ $this->_userData['Bphone'] = $address->getTelephone();
278
+ } else {
279
+ throw new \Exception('Missing user data info');
280
+ }
281
+ }
282
+
283
+
284
+
285
  /**
286
  * Assign user data
287
  * @param string $addressId
415
  }
416
  }
417
 
418
+ /**
419
+ * @param string $urlnok
420
+ * @throws Exception
421
+ */
422
+ public function setUrlCancelled($urlKo = '')
423
+ {
424
+ $urlCancel = Mage::helper('checkout/url')->getCheckoutUrl();
425
+ if (strlen(trim($urlCancel)) > 0) {
426
+ $this->_urlCancel = $urlCancel;
427
+ } else {
428
+ throw new \Exception('UrlKo not defined');
429
+ }
430
+ }
431
+
432
  /**
433
  * @param string $urlnok
434
  * @throws Exception
452
  */
453
  public function setFirma()
454
  {
455
+ $textToEncode = $this->_accountKey . $this->_accountCode . $this->_orderId . $this->_amount . $this->_currency . $this->_urlOk . $this->_urlKo . $this->_callback_url . $this->_discount . $this->_urlCancel ;
456
  //encoding is SHA1
457
  $this->_firma = sha1($textToEncode);
458
+ //encoding is SHA512
459
+ $this->_firma = hash('sha512',$textToEncode);
460
  /*
461
  if (strlen(trim($textToEncode)) > 0) {
462
  // Retrieve del SHA1
app/code/community/Pagantis/Pagantis/controllers/PagantisController.php CHANGED
@@ -82,7 +82,8 @@ class Pagantis_Pagantis_PagantisController extends Mage_Core_Controller_Front_Ac
82
  break;
83
  }
84
  $signature_check = sha1($key.$temp['account_id'].$temp['api_version'].$temp['event'].$temp['data']['id']);
85
- if ($signature_check != $temp['signature'] ){
 
86
  //hack detected
87
  $this->cancelAction();
88
  return false;
82
  break;
83
  }
84
  $signature_check = sha1($key.$temp['account_id'].$temp['api_version'].$temp['event'].$temp['data']['id']);
85
+ $signature_check_sha512 = hash('sha512',$key.$temp['account_id'].$temp['api_version'].$temp['event'].$temp['data']['id']);
86
+ if ($signature_check != $temp['signature'] && $signature_check_sha512 != $temp['signature']){
87
  //hack detected
88
  $this->cancelAction();
89
  return false;
app/code/community/Pagantis/Pagantis/etc/config.xml CHANGED
@@ -58,8 +58,6 @@
58
  <model>pagantis_pagantis/payment</model>
59
  <order_status>1</order_status>
60
  <title>Paga Mas Tarde</title>
61
- <url_pagantis>https://psp.pagantis.com/2/charges</url_pagantis>
62
- <url_pagantis_mastarde>https://pmt.pagantis.com/v1/installments</url_pagantis_mastarde>
63
  <environment></environment>
64
  <language_payment_page>ES</language_payment_page>
65
  <auth_method>SHA1</auth_method>
58
  <model>pagantis_pagantis/payment</model>
59
  <order_status>1</order_status>
60
  <title>Paga Mas Tarde</title>
 
 
61
  <environment></environment>
62
  <language_payment_page>ES</language_payment_page>
63
  <auth_method>SHA1</auth_method>
app/code/community/Pagantis/Pagantis/etc/system.xml CHANGED
@@ -28,22 +28,6 @@
28
  <show_in_website>1</show_in_website>
29
  <show_in_store>1</show_in_store>
30
  </title>
31
- <!--<title_pagamastarde translate="label" module="pagantis_pagantis">
32
- <label>Título Paga Mas Tarde</label>
33
- <sort_order>3</sort_order>
34
- <show_in_default>1</show_in_default>
35
- <show_in_website>1</show_in_website>
36
- <show_in_store>1</show_in_store>
37
- </title_pagamastarde>-->
38
- <!-- remove pagantis payment, pmt url moved to settings and automatically enabled -->
39
- <!-- <url_pagantis translate="label" module="pagantis_pagantis">
40
- <label>URL Pago Cobro Único</label>
41
- <frontend_type>text</frontend_type>
42
- <sort_order>10</sort_order>
43
- <show_in_default>1</show_in_default>
44
- <show_in_website>1</show_in_website>
45
- <show_in_store>1</show_in_store>
46
- </url_pagantis>-->
47
  <!-- <end_of_month translate="label" module="pagantis_pagantis">
48
  <label>Activar forma de Pago Cobro al fin de mes</label>
49
  <comment>Habilitando esta forma de pago, el cliente podrá eligir pagar la compra al final del mes</comment>
@@ -54,25 +38,6 @@
54
  <show_in_website>1</show_in_website>
55
  <show_in_store>1</show_in_store>
56
  </end_of_month> -->
57
- <!-- <url_pagantis_mastarde translate="label" module="pagantis_pagantis">
58
- <label>URL Paga+Tarde</label>
59
- <frontend_type>text</frontend_type>
60
- <sort_order>12</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>
64
- </url_pagantis_mastarde>
65
- <url_pagantis_mastarde_activated translate="label" module="pagantis_pagantis">
66
- <label>Activar forma de Paga+Tarde</label>
67
- <comment>Abilitando esta forma de pago el cliente podrá eligirla al momento de la compra</comment>
68
- <frontend_type>select</frontend_type>
69
- <source_model>adminhtml/system_config_source_yesno</source_model>
70
- <sort_order>13</sort_order>
71
- <show_in_default>1</show_in_default>
72
- <show_in_website>1</show_in_website>
73
- <show_in_store>1</show_in_store>
74
- </url_pagantis_mastarde_activated>
75
- -->
76
  <environment translate="label" module="pagantis_pagantis">
77
  <label>Entorno</label>
78
  <comment>Elegir entorno de Test o Real</comment>
@@ -83,31 +48,6 @@
83
  <show_in_website>1</show_in_website>
84
  <show_in_store>1</show_in_store>
85
  </environment>
86
- <!-- we remove this to have easier config and same template in all modules, we try to get user locale -->
87
- <!--
88
- <language_payment_page translate="label" module="pagantis_pagantis">
89
- <label>Idioma Pagina De Pago</label>
90
- <comment>Elegir el idioma con el cual se abrirá la pagina de pago Pagantis. Por ejemplo ES, FR, EN</comment>
91
- <frontend_type>text</frontend_type>
92
- <sort_order>25</sort_order>
93
- <show_in_default>1</show_in_default>
94
- <show_in_website>1</show_in_website>
95
- <show_in_store>1</show_in_store>
96
- </language_payment_page>
97
-
98
- -->
99
- <!-- sha1 customer don't care about this -->
100
- <!--
101
- <auth_method translate="label" module="pagantis_pagantis">
102
- <label>Metodo de autenticación</label>
103
- <comment>Valor necesario para pagos con cobro único (SHA1)</comment>
104
- <frontend_type>text</frontend_type>
105
- <sort_order>15</sort_order>
106
- <show_in_default>1</show_in_default>
107
- <show_in_website>1</show_in_website>
108
- <show_in_store>1</show_in_store>
109
- </auth_method>
110
- -->
111
  <account_code_test translate="label" module="pagantis_pagantis">
112
  <label>TEST Public Key</label>
113
  <frontend_type>text</frontend_type>
@@ -124,17 +64,6 @@
124
  <show_in_website>1</show_in_website>
125
  <show_in_store>1</show_in_store>
126
  </account_key_test>
127
- <!-- api key not needed to perform payment -->
128
- <!--
129
- <account_api_key_test translate="label" module="pagantis_pagantis">
130
- <label>API Key Test</label>
131
- <frontend_type>text</frontend_type>
132
- <sort_order>19</sort_order>
133
- <show_in_default>1</show_in_default>
134
- <show_in_website>1</show_in_website>
135
- <show_in_store>1</show_in_store>
136
- </account_api_key_test>
137
- -->
138
  <account_code_real translate="label" module="pagantis_pagantis">
139
  <label>REAL Public Key</label>
140
  <frontend_type>text</frontend_type>
@@ -151,16 +80,6 @@
151
  <show_in_website>1</show_in_website>
152
  <show_in_store>1</show_in_store>
153
  </account_key_real>
154
- <!--
155
- <account_api_key_real translate="label" module="pagantis_pagantis">
156
- <label>API Key Real</label>
157
- <frontend_type>text</frontend_type>
158
- <sort_order>22</sort_order>
159
- <show_in_default>1</show_in_default>
160
- <show_in_website>1</show_in_website>
161
- <show_in_store>1</show_in_store>
162
- </account_api_key_real>
163
- -->
164
  <discount translate="label" module="pagantis_pagantis">
165
  <label>Descuento - asumir comisiones</label>
166
  <comment>Las comisiones están asumidas por el comercio si el parámetro está activo.</comment>
@@ -208,13 +127,6 @@
208
  <show_in_website>1</show_in_website>
209
  <show_in_store>1</show_in_store>
210
  </sort_order>
211
- <!--<cron_settings translate="label comment" module="pagantis_pagantis">
212
- <label>Cuantas veces quieres ejecutar el proceso de sincronización de los pedidos?</label>
213
- <frontend_type>text</frontend_type>
214
- <sort_order>60</sort_order>
215
- <comment>Utiliza el formato Crontab (p.e. "0 4 * * *" para cada día a las 4 a.m.)</comment>
216
- <show_in_default>1</show_in_default>
217
- </cron_settings>-->
218
  <min_order_total translate="label">
219
  <label>Precio mínimo</label>
220
  <frontend_type>text</frontend_type>
28
  <show_in_website>1</show_in_website>
29
  <show_in_store>1</show_in_store>
30
  </title>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
31
  <!-- <end_of_month translate="label" module="pagantis_pagantis">
32
  <label>Activar forma de Pago Cobro al fin de mes</label>
33
  <comment>Habilitando esta forma de pago, el cliente podrá eligir pagar la compra al final del mes</comment>
38
  <show_in_website>1</show_in_website>
39
  <show_in_store>1</show_in_store>
40
  </end_of_month> -->
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
41
  <environment translate="label" module="pagantis_pagantis">
42
  <label>Entorno</label>
43
  <comment>Elegir entorno de Test o Real</comment>
48
  <show_in_website>1</show_in_website>
49
  <show_in_store>1</show_in_store>
50
  </environment>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
51
  <account_code_test translate="label" module="pagantis_pagantis">
52
  <label>TEST Public Key</label>
53
  <frontend_type>text</frontend_type>
64
  <show_in_website>1</show_in_website>
65
  <show_in_store>1</show_in_store>
66
  </account_key_test>
 
 
 
 
 
 
 
 
 
 
 
67
  <account_code_real translate="label" module="pagantis_pagantis">
68
  <label>REAL Public Key</label>
69
  <frontend_type>text</frontend_type>
80
  <show_in_website>1</show_in_website>
81
  <show_in_store>1</show_in_store>
82
  </account_key_real>
 
 
 
 
 
 
 
 
 
 
83
  <discount translate="label" module="pagantis_pagantis">
84
  <label>Descuento - asumir comisiones</label>
85
  <comment>Las comisiones están asumidas por el comercio si el parámetro está activo.</comment>
127
  <show_in_website>1</show_in_website>
128
  <show_in_store>1</show_in_store>
129
  </sort_order>
 
 
 
 
 
 
 
130
  <min_order_total translate="label">
131
  <label>Precio mínimo</label>
132
  <frontend_type>text</frontend_type>
app/design/frontend/base/default/template/pagantis/pagantis.phtml CHANGED
@@ -3,7 +3,6 @@
3
  <?php $activeMethodEndOfMonth = Mage::getStoreConfig('payment/pagantis/end_of_month'); ?>
4
  <?php $discount = Mage::getStoreConfig('payment/pagantis/discount'); ?>
5
  <?php $activeMethodEndOfMonth = false; ?>
6
- <?php $activeMethodLoan = Mage::getStoreConfig('payment/pagantis/url_pagantis_mastarde_activated'); ?>
7
  </fieldset>
8
  <div id="payment_form_<?php echo $_code ?>" style="display: none">
9
  <div id="innerpagantis">
@@ -12,14 +11,14 @@
12
 
13
  <div class="PmtSimulator PmtSimulatorSelectable--claim" style="left:-10px; top: 5px;"
14
  data-pmt-num-quota="4" data-pmt-style="neutral" data-pmt-type="3" data-pmt-discount="<?=$discount?>"
15
- data-pmt-amount="<?=$this->total?>" data-pmt-expanded="no"></div>
16
 
17
  <input type="radio" class="pagantisradio" name="paymentdetail[]" value="end_of_month">Paga a fin de mes<br />
18
  <?php else: ?>
19
  <input type="hidden" class="pagantisradio" name="paymentdetail[]" value="financiacion">
20
  <div class="PmtSimulator PmtSimulatorSelectable--claim" style="left:-10px; top: 5px;"
21
  data-pmt-num-quota="4" data-pmt-style="neutral" data-pmt-type="3" data-pmt-discount="<?=$discount?>"
22
- data-pmt-amount="<?=$this->total?>" data-pmt-expanded="no"></div>
23
 
24
  <?php endif; ?>
25
 
3
  <?php $activeMethodEndOfMonth = Mage::getStoreConfig('payment/pagantis/end_of_month'); ?>
4
  <?php $discount = Mage::getStoreConfig('payment/pagantis/discount'); ?>
5
  <?php $activeMethodEndOfMonth = false; ?>
 
6
  </fieldset>
7
  <div id="payment_form_<?php echo $_code ?>" style="display: none">
8
  <div id="innerpagantis">
11
 
12
  <div class="PmtSimulator PmtSimulatorSelectable--claim" style="left:-10px; top: 5px;"
13
  data-pmt-num-quota="4" data-pmt-style="neutral" data-pmt-type="3" data-pmt-discount="<?=$discount?>"
14
+ data-pmt-amount="<?=$this->total?>" data-pmt-expanded="no" data-pmt-max-ins="12"></div>
15
 
16
  <input type="radio" class="pagantisradio" name="paymentdetail[]" value="end_of_month">Paga a fin de mes<br />
17
  <?php else: ?>
18
  <input type="hidden" class="pagantisradio" name="paymentdetail[]" value="financiacion">
19
  <div class="PmtSimulator PmtSimulatorSelectable--claim" style="left:-10px; top: 5px;"
20
  data-pmt-num-quota="4" data-pmt-style="neutral" data-pmt-type="3" data-pmt-discount="<?=$discount?>"
21
+ data-pmt-amount="<?=$this->total?>" data-pmt-expanded="no" data-pmt-max-ins="12"></div>
22
 
23
  <?php endif; ?>
24
 
package.xml CHANGED
@@ -1,18 +1,18 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Pagantis_Pagantis</name>
4
- <version>3.1.1</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.gnu.org/licenses/gpl-3.0.en.html">GPL</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>Modulo de Magento para habilitar la pasarela de pago Pagantis en Magento.</summary>
10
  <description>Con este m&#xF3;dulo se podr&#xE1; activar la pasarela de pago Pagantis en Magento y aceptar pago con tarjetas de debito.</description>
11
- <notes>Con este m&#xF3;dulo se podr&#xE1; activar la pasarela de pago Pagantis en Magento y aceptar pago con tarjetas de debito.</notes>
12
  <authors><author><name>Albert Fatsini</name><user>PagaMasTarde</user><email>afatsini@digitalorigin.com</email></author></authors>
13
- <date>2016-07-19</date>
14
- <time>09:38:28</time>
15
- <contents><target name="magecommunity"><dir name="Pagantis"><dir name="Pagantis"><dir name="Block"><dir name="Adminhtml"><dir name="System"><dir name="Config"><dir name="Fieldset"><file name="Payment.php" hash="7c2b0d3c7a7bf6d4a9ac02a5b6125af3"/></dir></dir></dir></dir><file name="Form.php" hash="89aded0a5a4754181ee2dd24f480cff9"/><file name="Redirect.php" hash="67d7cb6ddd3089cb5bba2a13c2b7493e"/></dir><dir name="Helper"><file name="Data.php" hash="04988465c4fd36e057bbc0296efa34be"/></dir><dir name="Model"><file name="Currency.php" hash="a5557e10938898b0213a90dd7be15540"/><file name="Observer.php" hash="fa0e7d5688701cae875a8d14f58a816e"/><file name="Payment.php" hash="559aa4aafc02a1b57426c8c5111369bf"/><dir name="Source"><dir name="Payment"><file name="Currency.php" hash="7e51124f09e2028198fb9587df820809"/><file name="Environment.php" hash="30d6400967acdd8975c5748994c100e6"/></dir></dir><dir name="Webservice"><file name="Client.php" hash="6a14e0ae7ef5180445a3a99aec4717bb"/><file name="Paymentrequest.php" hash="dcf473ea7211a82b55b5374549c3cfc0"/><file name="Request.php" hash="a62a749494157cecdd9252d9c7441494"/><file name="Requestloan.php" hash="d88ae5d268dc4843a3117e70460d73f1"/><file name="Response.php" hash="bb1ade5931c5580f4585fc0fdb2bc4b0"/></dir></dir><dir name="controllers"><file name="PagantisController.php" hash="49df809a11096d50242423b08607b385"/></dir><dir name="etc"><file name="config.xml" hash="534de8c63e9a5b96a45cab8be35a02e5"/><file name="system.xml" hash="08b5f5c89ba42be2d018d03d7a417a2d"/></dir><dir name="sql"><dir name="pagantis_setup"><file name="mysql4-install-1.0.0.php" hash="4ec10724709f8d381758409f55cff99d"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="pagantis.xml" hash="4328e44e218a0996f4e2412c545a8e9b"/></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="pagantis.xml" hash="3db74cdacc8db5d6f43f9addeba290b0"/></dir><dir name="template"><dir name="pagantis"><file name="form.phtml" hash="11cf70a55d8ec9e8ae3c1d94a832eeab"/><file name="pagantis.phtml" hash="522651953c95d6cb702d2537f1ab747f"/><file name="redirect.phtml" hash="6f8766760fc062aec4a185aa5657de59"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Pagantis_Pagantis.xml" hash="c57db60bd03314d7a45f27acc9a9475a"/></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="base"><dir name="default"><file name="pagantis.css" hash="7d1b6daea9f42c2552ebb5bd5c15596d"/></dir></dir><dir name="default"><dir name="default"><dir name="images"><dir name="pagantis"><file name="logopagamastarde.png" hash="d51fa42e42d9811653df55710a395d07"/><file name="pagantis.png" hash="292403ede1f62affccf06df004ddfe12"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="images"><dir name="pagantis"><file name="logopagamastarde.png" hash="d51fa42e42d9811653df55710a395d07"/><file name="pagantis-fav.png" hash="c4e162b51c0792ff25385506d7998818"/><file name="pagantis.png" hash="292403ede1f62affccf06df004ddfe12"/></dir></dir><dir name="js"><dir name="fancybox"><file name="CHANGELOG.md" hash="f7712236f40261059cd9d017022186d1"/><file name="README.md" hash="b10a4a6f56cae56f392ac9a3dde13b1a"/><file name="blank.gif" hash="325472601571f31e1bf00674c368d335"/><file name="fancybox_loading.gif" hash="328cc0f6c78211485058d460e80f4fa8"/><file name="fancybox_loading@2x.gif" hash="f92938639fa894a0e8ded1c3368abe98"/><file name="fancybox_overlay.png" hash="77aeaa52715b898b73c74d68c630330e"/><file name="fancybox_sprite.png" hash="783d4031fe50c3d83c960911e1fbc705"/><file name="fancybox_sprite@2x.png" hash="ed9970ce22242421e66ff150aa97fe5f"/><dir name="helpers"><file name="fancybox_buttons.png" hash="b448080f8615e664b7788c7003803b59"/><file name="jquery.fancybox-buttons.css" hash="cac75538c2e3ddfadef839feaca8e356"/><file name="jquery.fancybox-buttons.js" hash="f53c246661fb995a3f12e67fa38e0fa0"/><file name="jquery.fancybox-media.js" hash="c017067f48d97ec4a077ccdf056e6a2e"/><file name="jquery.fancybox-thumbs.css" hash="52ddd84a9f42c1d4cd86d518a7f7e8bc"/><file name="jquery.fancybox-thumbs.js" hash="cf1fc1df534eede4cb460c5cbd71aba6"/></dir><file name="jquery.fancybox.css" hash="6c55951ce1e3115711f63f99b7501f3a"/><file name="jquery.fancybox.js" hash="921e9cb04ad6e2559869ec845c5be39b"/><file name="jquery.fancybox.pack.js" hash="cc9e759f24ba773aeef8a131889d3728"/><dir name="lib"><file name="jquery-1.10.1.min.js" hash="33d85132f0154466fc017dd05111873d"/><file name="jquery-1.9.0.min.js" hash="0652da382b6fceb033dfe2b6c06d4d11"/><file name="jquery.mousewheel-3.0.6.pack.js" hash="fde6509fae2cafdb6d97e4a9a60cce66"/></dir><file name="sprite.psd" hash="ee49b495e957508bee6458f7101b5beb"/><file name=".gitattributes" hash="4ea979410c86e03f8c6f61892b28fb82"/></dir></dir></dir></dir></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.2.0</min><max>8.0.0</max></php></required></dependencies>
18
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>Pagantis_Pagantis</name>
4
+ <version>3.1.4</version>
5
  <stability>stable</stability>
6
  <license uri="http://www.gnu.org/licenses/gpl-3.0.en.html">GPL</license>
7
  <channel>community</channel>
8
  <extends/>
9
  <summary>Modulo de Magento para habilitar la pasarela de pago Pagantis en Magento.</summary>
10
  <description>Con este m&#xF3;dulo se podr&#xE1; activar la pasarela de pago Pagantis en Magento y aceptar pago con tarjetas de debito.</description>
11
+ <notes>Add cancelled url</notes>
12
  <authors><author><name>Albert Fatsini</name><user>PagaMasTarde</user><email>afatsini@digitalorigin.com</email></author></authors>
13
+ <date>2016-09-26</date>
14
+ <time>08:36:05</time>
15
+ <contents><target name="magecommunity"><dir name="Pagantis"><dir name="Pagantis"><dir name="Block"><dir name="Adminhtml"><dir name="System"><dir name="Config"><dir name="Fieldset"><file name="Payment.php" hash="7c2b0d3c7a7bf6d4a9ac02a5b6125af3"/></dir></dir></dir></dir><file name="Form.php" hash="89aded0a5a4754181ee2dd24f480cff9"/><file name="Redirect.php" hash="67d7cb6ddd3089cb5bba2a13c2b7493e"/></dir><dir name="Helper"><file name="Data.php" hash="87b502a4c1bf19e8de4bbf8e80b066df"/></dir><dir name="Model"><file name="Currency.php" hash="a5557e10938898b0213a90dd7be15540"/><file name="Observer.php" hash="fa0e7d5688701cae875a8d14f58a816e"/><file name="Payment.php" hash="559aa4aafc02a1b57426c8c5111369bf"/><dir name="Source"><dir name="Payment"><file name="Currency.php" hash="7e51124f09e2028198fb9587df820809"/><file name="Environment.php" hash="30d6400967acdd8975c5748994c100e6"/></dir></dir><dir name="Webservice"><file name="Client.php" hash="6a14e0ae7ef5180445a3a99aec4717bb"/><file name="Paymentrequest.php" hash="dcf473ea7211a82b55b5374549c3cfc0"/><file name="Request.php" hash="d475e0936c4f69572fcaaecc9fd97380"/><file name="Requestloan.php" hash="8746c7214929f05c6d05713a092e9f7d"/><file name="Response.php" hash="bb1ade5931c5580f4585fc0fdb2bc4b0"/></dir></dir><dir name="controllers"><file name="PagantisController.php" hash="a983c0bcb5b6b8b9d9ad28deb0f1a7df"/></dir><dir name="etc"><file name="config.xml" hash="ac4c7505180457b75b59d40691329db7"/><file name="system.xml" hash="a8a6b2cc704f825ad0688d49b783562c"/></dir><dir name="sql"><dir name="pagantis_setup"><file name="mysql4-install-1.0.0.php" hash="4ec10724709f8d381758409f55cff99d"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="pagantis.xml" hash="4328e44e218a0996f4e2412c545a8e9b"/></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="pagantis.xml" hash="3db74cdacc8db5d6f43f9addeba290b0"/></dir><dir name="template"><dir name="pagantis"><file name="form.phtml" hash="11cf70a55d8ec9e8ae3c1d94a832eeab"/><file name="pagantis.phtml" hash="99d4efe90cdd7bf3363f61066ad326f1"/><file name="redirect.phtml" hash="6f8766760fc062aec4a185aa5657de59"/></dir></dir></dir></dir></dir></target><target name="mageetc"><dir name="modules"><file name="Pagantis_Pagantis.xml" hash="c57db60bd03314d7a45f27acc9a9475a"/></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="base"><dir name="default"><file name="pagantis.css" hash="7d1b6daea9f42c2552ebb5bd5c15596d"/></dir></dir><dir name="default"><dir name="default"><dir name="images"><dir name="pagantis"><file name="logopagamastarde.png" hash="d51fa42e42d9811653df55710a395d07"/><file name="pagantis.png" hash="292403ede1f62affccf06df004ddfe12"/></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="images"><dir name="pagantis"><file name="logopagamastarde.png" hash="d51fa42e42d9811653df55710a395d07"/><file name="pagantis-fav.png" hash="c4e162b51c0792ff25385506d7998818"/><file name="pagantis.png" hash="292403ede1f62affccf06df004ddfe12"/></dir></dir><dir name="js"><dir name="fancybox"><file name="CHANGELOG.md" hash="f7712236f40261059cd9d017022186d1"/><file name="README.md" hash="b10a4a6f56cae56f392ac9a3dde13b1a"/><file name="blank.gif" hash="325472601571f31e1bf00674c368d335"/><file name="fancybox_loading.gif" hash="328cc0f6c78211485058d460e80f4fa8"/><file name="fancybox_loading@2x.gif" hash="f92938639fa894a0e8ded1c3368abe98"/><file name="fancybox_overlay.png" hash="77aeaa52715b898b73c74d68c630330e"/><file name="fancybox_sprite.png" hash="783d4031fe50c3d83c960911e1fbc705"/><file name="fancybox_sprite@2x.png" hash="ed9970ce22242421e66ff150aa97fe5f"/><dir name="helpers"><file name="fancybox_buttons.png" hash="b448080f8615e664b7788c7003803b59"/><file name="jquery.fancybox-buttons.css" hash="cac75538c2e3ddfadef839feaca8e356"/><file name="jquery.fancybox-buttons.js" hash="f53c246661fb995a3f12e67fa38e0fa0"/><file name="jquery.fancybox-media.js" hash="c017067f48d97ec4a077ccdf056e6a2e"/><file name="jquery.fancybox-thumbs.css" hash="52ddd84a9f42c1d4cd86d518a7f7e8bc"/><file name="jquery.fancybox-thumbs.js" hash="cf1fc1df534eede4cb460c5cbd71aba6"/></dir><file name="jquery.fancybox.css" hash="6c55951ce1e3115711f63f99b7501f3a"/><file name="jquery.fancybox.js" hash="921e9cb04ad6e2559869ec845c5be39b"/><file name="jquery.fancybox.pack.js" hash="cc9e759f24ba773aeef8a131889d3728"/><dir name="lib"><file name="jquery-1.10.1.min.js" hash="33d85132f0154466fc017dd05111873d"/><file name="jquery-1.9.0.min.js" hash="0652da382b6fceb033dfe2b6c06d4d11"/><file name="jquery.mousewheel-3.0.6.pack.js" hash="fde6509fae2cafdb6d97e4a9a60cce66"/></dir><file name="sprite.psd" hash="ee49b495e957508bee6458f7101b5beb"/><file name=".gitattributes" hash="4ea979410c86e03f8c6f61892b28fb82"/></dir></dir></dir></dir></dir></target></contents>
16
  <compatible/>
17
  <dependencies><required><php><min>5.2.0</min><max>8.0.0</max></php></required></dependencies>
18
  </package>