Squeezol_Payment - Version 1.0.2

Version Notes

Frontend update

Download this release

Release Info

Developer Davide Costa
Extension Squeezol_Payment
Version 1.0.2
Comparing to
See all releases


Code changes from version 1.0.1 to 1.0.2

lib/README.md → README.md RENAMED
File without changes
app/code/local/Squeezol/Payment/Helper/Data.php CHANGED
@@ -61,7 +61,7 @@ class Squeezol_Payment_Helper_Data extends Mage_Core_Helper_Abstract {
61
  'description' => $product->getShortDescription(),
62
  'product_id' => $info['sku'],
63
  'url' => $product->getProductUrl(),
64
- 'price' => number_format($info['price'], 2),
65
  'price_currency' => $curr
66
  );
67
  }
@@ -88,6 +88,17 @@ class Squeezol_Payment_Helper_Data extends Mage_Core_Helper_Abstract {
88
  return json_decode($data['groups'], true);
89
  }
90
 
 
 
 
 
 
 
 
 
 
 
 
91
  public function getGroupByOrder($lastOrderId) {
92
  $sql = 'SELECT * FROM ' . $this->getGTableName() . ' WHERE order_id = :order';
93
  $bind = array(
61
  'description' => $product->getShortDescription(),
62
  'product_id' => $info['sku'],
63
  'url' => $product->getProductUrl(),
64
+ 'price' => number_format($info['price'], 2, '.', ''),
65
  'price_currency' => $curr
66
  );
67
  }
88
  return json_decode($data['groups'], true);
89
  }
90
 
91
+ public function getOrderByGroup($groupId) {
92
+ $sql = 'SELECT * FROM ' . $this->getGTableName() . ' WHERE group_id = :group';
93
+ $bind = array(
94
+ 'group' => $groupId
95
+ );
96
+
97
+ $group = Mage::getSingleton('core/resource') ->getConnection('core_read')->fetchRow($sql, $bind);
98
+
99
+ return $group;
100
+ }
101
+
102
  public function getGroupByOrder($lastOrderId) {
103
  $sql = 'SELECT * FROM ' . $this->getGTableName() . ' WHERE order_id = :order';
104
  $bind = array(
app/code/local/Squeezol/Payment/Model/Params.php CHANGED
@@ -3,20 +3,20 @@
3
  class Squeezol_Payment_Model_Params extends Mage_Core_Model_Abstract {
4
 
5
  const CALLBACK_URL = 'squeezol/index/oauth';
6
- const REQUEST_TOKEN_URL = 'https://test.squeezol.com/api/oauth2/request_token/';
7
- const ACCESS_TOKEN_URL = 'https://test.squeezol.com/api/oauth2/access_token/';
8
- const AUTHORIZATION_URL = 'https://test.squeezol.com/api/oauth2/authorize/';
9
 
10
  const PAY_PAGE = 'squeezol/index/pay';
11
  const REVIEW_PAGE = 'squeezol/index/review';
12
 
13
- const RESOURCE_USER_URL = 'https://test.squeezol.com/api/user/';
14
- const RESOURCE_GROUP_URL = 'https://test.squeezol.com/api/group/create/.json';
15
- const RESOURCE_PRODUCT_URL = 'https://test.squeezol.com/api/product/create/';
16
- const RESOURCE_DIGEST_URL = 'https://test.squeezol.com/api/group/digest/';
17
- const RESOURCE_INVITATION_URL = 'https://test.squeezol.com/api/group/invitation/';
18
- const RESOURCE_ADDPRODUCT_URL = 'https://test.squeezol.com/api/partner/add_product/';
19
- const RESOURCE_GET_GROUPS_URL = 'https://test.squeezol.com/api/groups/';
20
 
21
  public function __construct () {
22
  $this->_init('squeezol_payment/params');
3
  class Squeezol_Payment_Model_Params extends Mage_Core_Model_Abstract {
4
 
5
  const CALLBACK_URL = 'squeezol/index/oauth';
6
+ const REQUEST_TOKEN_URL = 'https://www.squeezol.com/api/oauth2/request_token/';
7
+ const ACCESS_TOKEN_URL = 'https://www.squeezol.com/api/oauth2/access_token/';
8
+ const AUTHORIZATION_URL = 'https://www.squeezol.com/api/oauth2/authorize/';
9
 
10
  const PAY_PAGE = 'squeezol/index/pay';
11
  const REVIEW_PAGE = 'squeezol/index/review';
12
 
13
+ const RESOURCE_USER_URL = 'https://www.squeezol.com/api/user/';
14
+ const RESOURCE_GROUP_URL = 'https://www.squeezol.com/api/group/create/.json';
15
+ const RESOURCE_PRODUCT_URL = 'https://www.squeezol.com/api/product/create/';
16
+ const RESOURCE_DIGEST_URL = 'https://www.squeezol.com/api/group/digest/';
17
+ const RESOURCE_INVITATION_URL = 'https://www.squeezol.com/api/group/invitation/';
18
+ const RESOURCE_ADDPRODUCT_URL = 'https://www.squeezol.com/api/partner/add_product/';
19
+ const RESOURCE_GET_GROUPS_URL = 'https://www.squeezol.com/api/groups/';
20
 
21
  public function __construct () {
22
  $this->_init('squeezol_payment/params');
app/code/local/Squeezol/Payment/controllers/IndexController.php CHANGED
@@ -232,11 +232,7 @@ class Squeezol_Payment_IndexController extends Mage_Core_Controller_Front_Action
232
  }
233
  else
234
  {
235
- $ret = $INVALID_FORM_ERROR;
236
- foreach($endpoint->getErrors() as $i => $value)
237
- {
238
- $ret[$i] = $value;
239
- }
240
  }
241
  } else {
242
  $ret = $UNAUTH_ERROR;
@@ -283,16 +279,17 @@ class Squeezol_Payment_IndexController extends Mage_Core_Controller_Front_Action
283
  $payload = file_get_contents('php://input');
284
  $data = json_decode($payload, true);
285
 
286
- $group = Mage::helper('squeezol_payment')->getGroupByOrder($data['group']);
287
-
288
  $order = Mage::getModel('sales/order')->loadByIncrementId($group['order_id']);
289
 
290
- if ($data['status'] == 'S') {
291
- $order->setStatus(Mage_Sales_Model_Order::STATE_COMPLETE);
292
- $order->save();
293
- } else {
294
- $order->setStatus(Mage_Sales_Model_Order::STATE_CANCELED);
295
- $order->cancel()->save();
 
 
296
  }
297
 
298
  echo 'OK';
232
  }
233
  else
234
  {
235
+ $ret = $res;
 
 
 
 
236
  }
237
  } else {
238
  $ret = $UNAUTH_ERROR;
279
  $payload = file_get_contents('php://input');
280
  $data = json_decode($payload, true);
281
 
282
+ $group = Mage::helper('squeezol_payment')->getOrderByGroup($data['group']);
 
283
  $order = Mage::getModel('sales/order')->loadByIncrementId($group['order_id']);
284
 
285
+ if ($order && $order->getId()) {
286
+ if ($data['status'] == 'S') {
287
+ $order->setStatus(Mage_Sales_Model_Order::STATE_COMPLETE);
288
+ $order->save();
289
+ } else {
290
+ $order->setStatus(Mage_Sales_Model_Order::STATE_CANCELED);
291
+ $order->cancel()->save();
292
+ }
293
  }
294
 
295
  echo 'OK';
app/design/frontend/base/default/layout/squeezol_payment.xml CHANGED
@@ -41,9 +41,8 @@
41
 
42
  <squeezol_payment_index_pay>
43
  <reference name="head">
44
- <action method="addCss"><stylesheet>css/bootstrap.min.css</stylesheet></action>
45
  <action method="addCss"><stylesheet>css/squeezol.css</stylesheet></action>
46
- <!--<action method="addCss"><stylesheet>css/_squeezol.css</stylesheet></action>-->
47
  <action method="addItem">
48
  <type>skin_js</type>
49
  <name>js/jquery.min.js</name>
@@ -61,7 +60,7 @@
61
  <name>js/_squeezol3.js</name>
62
  </action>
63
  </reference>
64
-
65
  <reference name="content">
66
  <block name="squeezol_payment.create" as="squeezol_payment_create" type="squeezol_payment/start" template="squeezol_payment/create.phtml" />
67
  </reference>
@@ -71,7 +70,6 @@
71
  <reference name="head">
72
  <action method="addCss"><stylesheet>css/bootstrap.min.css</stylesheet></action>
73
  <action method="addCss"><stylesheet>css/squeezol.css</stylesheet></action>
74
- <!--<action method="addCss"><stylesheet>css/_squeezol.css</stylesheet></action>-->
75
  <action method="addItem">
76
  <type>skin_js</type>
77
  <name>js/jquery.min.js</name>
@@ -99,7 +97,6 @@
99
  <reference name="head">
100
  <action method="addCss"><stylesheet>css/bootstrap.min.css</stylesheet></action>
101
  <action method="addCss"><stylesheet>css/squeezol.css</stylesheet></action>
102
- <!--<action method="addCss"><stylesheet>css/_squeezol.css</stylesheet></action>-->
103
  <action method="addItem">
104
  <type>skin_js</type>
105
  <name>js/jquery.min.js</name>
@@ -127,7 +124,6 @@
127
  <reference name="head">
128
  <action method="addCss"><stylesheet>css/bootstrap.min.css</stylesheet></action>
129
  <action method="addCss"><stylesheet>css/squeezol.css</stylesheet></action>
130
- <!--<action method="addCss"><stylesheet>css/_squeezol.css</stylesheet></action>-->
131
  <action method="addItem">
132
  <type>skin_js</type>
133
  <name>js/jquery.min.js</name>
@@ -150,22 +146,10 @@
150
  <block name="squeezol_payment.review" as="squeezol_payment_review" type="squeezol_payment/start" template="squeezol_payment/review.phtml" />
151
  </reference>
152
  </squeezol_payment_index_review>
 
153
  <checkout_onepage_index>
154
  <reference name="head">
155
- <action method="addCss"><stylesheet>css/bootstrap.min.css</stylesheet></action>
156
- <!--<action method="addCss"><stylesheet>css/_squeezol.css</stylesheet></action>-->
157
- <action method="addItem">
158
- <type>skin_js</type>
159
- <name>js/jquery.min.js</name>
160
- </action>
161
- <action method="addItem">
162
- <type>skin_js</type>
163
- <name>js/noconflict.js</name>
164
- </action>
165
- <action method="addItem">
166
- <type>skin_js</type>
167
- <name>js/bootstrap.min.js</name>
168
- </action>
169
  </reference>
170
  </checkout_onepage_index>
171
  </layout>
41
 
42
  <squeezol_payment_index_pay>
43
  <reference name="head">
 
44
  <action method="addCss"><stylesheet>css/squeezol.css</stylesheet></action>
45
+ <action method="addCss"><stylesheet>css/bootstrap.min.css</stylesheet></action>
46
  <action method="addItem">
47
  <type>skin_js</type>
48
  <name>js/jquery.min.js</name>
60
  <name>js/_squeezol3.js</name>
61
  </action>
62
  </reference>
63
+
64
  <reference name="content">
65
  <block name="squeezol_payment.create" as="squeezol_payment_create" type="squeezol_payment/start" template="squeezol_payment/create.phtml" />
66
  </reference>
70
  <reference name="head">
71
  <action method="addCss"><stylesheet>css/bootstrap.min.css</stylesheet></action>
72
  <action method="addCss"><stylesheet>css/squeezol.css</stylesheet></action>
 
73
  <action method="addItem">
74
  <type>skin_js</type>
75
  <name>js/jquery.min.js</name>
97
  <reference name="head">
98
  <action method="addCss"><stylesheet>css/bootstrap.min.css</stylesheet></action>
99
  <action method="addCss"><stylesheet>css/squeezol.css</stylesheet></action>
 
100
  <action method="addItem">
101
  <type>skin_js</type>
102
  <name>js/jquery.min.js</name>
124
  <reference name="head">
125
  <action method="addCss"><stylesheet>css/bootstrap.min.css</stylesheet></action>
126
  <action method="addCss"><stylesheet>css/squeezol.css</stylesheet></action>
 
127
  <action method="addItem">
128
  <type>skin_js</type>
129
  <name>js/jquery.min.js</name>
146
  <block name="squeezol_payment.review" as="squeezol_payment_review" type="squeezol_payment/start" template="squeezol_payment/review.phtml" />
147
  </reference>
148
  </squeezol_payment_index_review>
149
+
150
  <checkout_onepage_index>
151
  <reference name="head">
152
+
 
 
 
 
 
 
 
 
 
 
 
 
 
153
  </reference>
154
  </checkout_onepage_index>
155
  </layout>
app/design/frontend/base/default/template/squeezol_payment/logo.phtml CHANGED
@@ -1,51 +1,166 @@
1
- <img src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_SKIN); ?>/frontend/base/default/images/squeezol_payment/logo_min.png" style="height: 24px; margin-left:10px; margin-right: 10px; display:inline;" />
2
- <a id="squeezol_btn" target="_blank" style="float: left; margin-top: 7px; display:inline; cursor: pointer;">
3
- <div>
4
- <h4>Scopri come</h4>
5
- </div>
6
- </a>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7
 
8
  <div style="width: 100px; height: 1px; clear:both;"></div>
9
 
10
  <script>
11
- jQuery(document).ready(function () {
12
- var img_url = '<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_SKIN); ?>/frontend/base/default/images/squeezol_payment/';
13
- var div ='<div class="sq-row wizard">'+
14
- '<div class="sq-col-xs-4">'+
15
- '<img class="sq-img-responsive" src="' + img_url + 'btn2.jpg" alt="Think">'+
16
- '<h4 class="sq-text-center">1.Crea una colletta</h4>'+
17
- '</div>'+
18
- '<div class="sq-col-xs-4">'+
19
- '<img class="sq-img-responsive" src="' + img_url + 'busta2.jpg" alt="Find">'+
20
- '<h4 class="sq-text-center">2.Invita i tuoi amici</h4>'+
21
- '</div>'+
22
- '<div class="sq-col-xs-4">'+
23
- '<img class="sq-img-responsive" src="' + img_url + 'salva2.jpg" alt="Fun">'+
24
- '<h4 class="sq-text-center">3. Versa la tua quota</h4>'+
25
- '</div>'+
26
- '</div>'+
27
- '<div class="sq-row">'+
28
- '<h4 class="sq-text-center"> Dividi l\'acquisto con i tuoi amici senza anticipare... &egrave; gratis!</h4>'+
29
- '</div>';
30
- jQuery('#squeezol_btn').popover({ title:'Come funziona',
31
- html:true ,
32
- content: div,
33
- delay: { show: 100, hide:100 },
34
- placement: {top: 100, left: 100},
35
- trigger: 'manual'
36
- });
37
-
38
- jQuery('#squeezol_btn').on('click', function(){
39
- jQuery('#squeezol_btn').popover('toggle');
40
- });
41
- jQuery('#squeezol_btn').on('shown.bs.popover', function(){
42
- jQuery('.sq-popover').attr('style','display: block; top: -20px; left: 127px;max-width:500px;');
43
- });
44
- jQuery('#squeezol_btn').on('hidden.bs.popover', function(){
45
- jQuery('.sq-popover').attr('style','');
46
- jQuery(this).css("display", "");
47
- });
48
-
49
- });
 
 
 
 
 
 
 
 
50
 
 
 
51
  </script>
1
+ <style>
2
+ .sq-pop-container {
3
+ position: relative;
4
+ height: 32px;
5
+ padding: 8px 12px 8px 8px;
6
+ display: inline-block;
7
+ vertical-align: baseline;
8
+ zoom: 1;
9
+ *display: inline;
10
+ *vertical-align: auto;
11
+ }
12
+
13
+ .sq-pop-container:hover .sq-popover {
14
+ visibility: visible !important;
15
+ opacity: 1;
16
+ padding: 4px 0 6px;
17
+ }
18
+ .sq-pop-container .sq-popover {
19
+ visibility: hidden !important;
20
+ opacity: 0;
21
+ position: absolute;
22
+ top: 100%;
23
+ left: 0;
24
+ right: 0;
25
+ border: 2px solid;
26
+ border-color: #0AB3C6;
27
+ border-radius: 4px;
28
+ -webkit-transition-property: opacity, padding, visibility;
29
+ -moz-transition-property: opacity, padding, visibility;
30
+ -ms-transition-property: opacity, padding, visibility;
31
+ -o-transition-property: opacity, padding, visibility;
32
+ transition-property: opacity, padding, visibility;
33
+ -webkit-transition: 0.3s ease-out;
34
+ -moz-transition: 0.3s ease-out;
35
+ -ms-transition: 0.3s ease-out;
36
+ -o-transition: 0.3s ease-out;
37
+ transition: 0.3s ease-out;
38
+ background-color: #FFF;
39
+ -webkit-box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.9), 0 1px 2px rgba(0, 0, 0, 0.1);
40
+ box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.9), 0 1px 2px rgba(0, 0, 0, 0.1);
41
+ }
42
+ .sq-pop-container .sq-popover:before, .sq-pop-container .sq-popover:after {
43
+ display: block;
44
+ content: '';
45
+ width: 0;
46
+ height: 0;
47
+ position: absolute;
48
+ left: 15px;
49
+ border: 7px outset transparent;
50
+ }
51
+ .sq-pop-container #sq-wizard-id:before {
52
+ border-bottom: 7px solid #555;
53
+ top: -14px;
54
+ }
55
+
56
+ .sq-pop-container #sq-wizard-id:after {
57
+ border-bottom: 7px solid #EEF3FE;
58
+ top: -12px;
59
+ }
60
+
61
+ .sq-popover {
62
+ width: 250px;
63
+ }
64
+
65
+ .sq-img-responsive {
66
+ width: 30%;
67
+ display: inline;
68
+ margin-left: 2px;
69
+ }
70
+
71
+ .sq-row {
72
+ width: 100%;
73
+ }
74
+
75
+ .sq-row:before, .sq-row:after,
76
+ {
77
+ content: " ";
78
+ display: table;
79
+ clear: both;
80
+ padding: 4px;
81
+ }
82
+
83
+
84
+ h4.sq-text-center {
85
+ display:inline;
86
+ line-height: 50px;
87
+ }
88
+
89
+ h3.sq-text-center {
90
+ text-align: center;
91
+ }
92
+ .sq-col-xs-6 {
93
+ position: relative;
94
+ min-height: 1px;
95
+ padding-left: 15px;
96
+ padding-right: 15px;
97
+ float: left;
98
+ width: 50%;
99
+
100
+ }
101
+
102
+ .sq-wizard-title {
103
+ text-decoration: underline;
104
+ }
105
+
106
+ </style>
107
+
108
+ <div id="squeezol_btn" class="sq-pop-container" style="cursor:pointer;">
109
+ <img src="<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_SKIN); ?>/frontend/base/default/images/squeezol_payment/logo_min.png" style="height: 24px; margin-left:10px; margin-right: 10px; display:inline;" />
110
+ <h4 style="float: left; margin-top: 2px; display:inline;">Scopri come</h4>
111
+ </div>
112
 
113
  <div style="width: 100px; height: 1px; clear:both;"></div>
114
 
115
  <script>
116
+ (function() {
117
+ 'use strict';
118
+ /* Insert in the SQ.api library after jquery porting */
119
+ var img_url = '<?php echo Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_SKIN); ?>/frontend/base/default/images/squeezol_payment/';
120
+ var wizard, sqBox, sqImg, sqh, sqNode, sqImg, i, sqPopover, sqView, eView, colXs;
121
+ var imgSuffix = ['btn2.jpg', 'busta2.jpg', 'salva2.jpg'];
122
+ var sqText = ['1.Crea uno split', '2.Invita i tuoi amici', '3.Versa la tua quota'];
123
+ // Wrapper wizard
124
+ wizard=document.createElement('div');
125
+ wizard.className='sq-popover';
126
+ wizard.id='sq-wizard-id';
127
+ sqBox = document.createElement('div');
128
+ sqBox.className='sq-row sq-wizard-title';
129
+ sqNode = document.createTextNode('Come funziona');
130
+ sqh = document.createElement('h3');
131
+ sqh.className='sq-text-center';
132
+ sqh.appendChild(sqNode);
133
+ sqBox.appendChild(sqh);
134
+ wizard.appendChild(sqBox);
135
+ for (i=0; i<imgSuffix.length; i++){
136
+ sqBox = document.createElement('div');
137
+ sqBox.className='sq-row';
138
+ sqh = document.createElement('h4');
139
+ sqh.className='sq-text-center';
140
+ sqNode = document.createTextNode(sqText[i]);
141
+ sqImg = document.createElement('img');
142
+ sqImg.className='sq-img-responsive';
143
+ sqImg.setAttribute('src', img_url+imgSuffix[i]);
144
+ sqh.appendChild(sqNode);
145
+ colXs = document.createElement('div');
146
+ colXs.className='sq-col-xs-6';
147
+ sqBox.appendChild(colXs.appendChild(sqImg));
148
+ colXs = document.createElement('div');
149
+ colXs.className='sq-col-xs-6';
150
+ sqBox.appendChild(colXs.appendChild(sqh));
151
+ wizard.appendChild(sqBox);
152
+ }
153
+ sqBox = document.createElement('div');
154
+ sqBox.className='sq-row';
155
+ sqNode = document.createTextNode('Dividi l\'acquisto con i tuoi amici senza anticipare...è gratis!');
156
+ sqh = document.createElement('h3');
157
+ sqh.className='sq-text-center';
158
+ sqh.appendChild(sqNode);
159
+ sqBox.appendChild(sqh);
160
+ wizard.appendChild(sqBox);
161
+ sqView=document.getElementById('squeezol_btn');
162
+ sqView.appendChild(wizard);
163
 
164
+ return;
165
+ }())
166
  </script>
package.xml CHANGED
@@ -1,2 +1,2 @@
1
  <?xml version="1.0"?>
2
- <package><name>Squeezol_Payment</name><version>1.0.1</version><stability>stable</stability><license>OSL</license><channel>community</channel><extends></extends><summary>It enables group payments, a split of cart amount</summary><description>Squeezol Split is the innovative payment technology that solves personal fundraising problems between people, simplifying scheduling, budget planning and finally payments. Enable group purchasing on your e-commerce site or marketplace just integrating &#x2018;Pay with Squeezol&#x2019; button: everyone puts his share in, then the merchant receives the entire payment due. A buying system used in current life now completely digitalized, taking advantage of social media tools to ease at the same time the whole customers&#x2019; experience and the viral diffusion of merchants brand.</description><notes>Frontend update</notes><authors><author><name>Davide Costa</name><user>alfietto91</user><email>alessandro.caligaris1991@gmail.com</email></author><author><name>Davide Costa</name><user>nafta</user><email>davide.costa@squeezol.com</email></author><author><name>Reggie Gabriel</name><user>rgabriel</user><email>foo3@example.com</email></author></authors><date>2014-11-21</date><time>10:12:53</time><compatible></compatible><dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies><contents><target name="mage"><dir name="lib"><file name="README.md" hash="97f9dbb159f7cfa3f574c2374f906b83"/><dir name="Squeezol"><file name="endpoints.php" hash="bb57c3f817e4a7bbe578056475c2c85b"/></dir><dir name="oauth2"><file name="Client.php" hash="cd46e543dc9ce042347e929bafb2637a"/><file name="README" hash="8ef3bf723c93b6e091b707a546df2804"/><file name="auth_request.php" hash="d78edf267fee0e4c9c483d46f4405d98"/><file name="composer.json" hash="b1a24295215d44d727f603e7da644a5a"/><dir name="GrantType"><file name="AuthorizationCode.php" hash="a1ff324a733fc33dbf938153c4c1667c"/><file name="ClientCredentials.php" hash="21b30fbb06d4b67263499d687316ae8b"/><file name="IGrantType.php" hash="ee03d4c5bc20f518716fc2c616b4d38d"/><file name="Password.php" hash="2e938e60c4af8bad71b5c4f0f1a40969"/><file name="RefreshToken.php" hash="a773f48348ad7aa510955099ba18d3ad"/></dir></dir></dir><dir name="app"><dir name="design"><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="squeezol_payment"><file name="create.phtml" hash="7f33a4cd28d0f09ab8b8b94af207b326"/><file name="digest.phtml" hash="ad115777c40a2bf9de8287963340c42c"/><file name="invitation.phtml" hash="769550bdcdeec4c37d2dc46befe32db1"/><file name="logo.phtml" hash="f8f30fee1e32388ef74eb2ba22f629eb"/><file name="review.phtml" hash="788d3e1812a08c0ec53675d16b5ff11e"/><file name="start.phtml" hash="147963cd3b32a0fad1857c1e6d6eae8f"/></dir></dir><dir name="layout"><file name="squeezol_payment.xml" hash="68f0f06f765adc530ac90b27608cdeb0"/></dir></dir></dir></dir></dir><dir name="etc"><dir name="modules"><file name="Squeezol_Payment.xml" hash="8069f82ec151f6c45be892bcc32460f8"/></dir></dir><dir name="code"><dir name="local"><dir name="Squeezol"><dir name="Payment"><dir name="Helper"><file name="Data.php" hash="2da605b5b30c72be00873aa4a864305c"/></dir><dir name="Block"><file name="Logo.php" hash="f9c7b30ccf3d9c947ec4a33c1662c395"/><file name="Start.php" hash="7edb0747a52d16fa21a2952c6d356191"/></dir><dir name="data"><dir name="squeezol_payment_setup"><file name="data-install-0.1.0.php" hash="3b58d0cdbc68e0260e839a2c8f0d4675"/></dir></dir><dir name="etc"><file name="config.xml" hash="816f839cf9155c94838938ee9b4c1532"/><file name="system.xml" hash="f21029a6dce1a2225501fe793e03897c"/></dir><dir name="Model"><file name="Params.php" hash="0890bb351ed8f73333bc28ff6244afd7"/><file name="Paramsandbox.php" hash="1f90070265de7948188c79590009ac1d"/><file name="PaymentMethod.php" hash="37fcaf2619c43b2713c4a5441d5345cc"/><file name="Session.php" hash="6453e3413705bde3e492ac9829b954e8"/><dir name="Mysql4"><file name="Params.php" hash="b12305337a72803ed2d61f6b8cac0159"/><dir name="Params"><file name="Collection.php" hash="5c73d0c799b880eed0bfc65bd50f17b6"/></dir></dir><dir name="Resource"><file name="Setup.php" hash="0340022ca0914dfcd7b6b589767dbc21"/></dir></dir><dir name="controllers"><file name="IndexController.php" hash="240141985147707c7f4cc3efb48e86d9"/><file name="OrderProcessingController.php" hash="5e56204902a16dd1c726dc61050c2503"/></dir><dir name="sql"><dir name="squeezol_payment_setup"><file name="install-0.1.0.php" hash="404031896ca519d8739300687fc1ab9e"/><file name="upgrade-0.1.0-0.2.0.php" hash="1bd99cfd46a27f7d94754540d32af500"/><file name="upgrade-0.2.0-1.0.0.php" hash="36edcf31ba4f44b97b80d77868da31e9"/></dir></dir></dir></dir></dir></dir></dir><dir name="skin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="css"><file name="DejaVuSansCondensed-BoldOblique.eot" hash="2c79dd754287cea48f32a3fff983bf15"/><file name="DejaVuSansCondensed-BoldOblique.svg" hash="326f9917a1db7537c95bf0b6124b899f"/><file name="DejaVuSansCondensed-BoldOblique.ttf" hash="7bb71c1ec629c0bf5d27e2e2d5e20066"/><file name="DejaVuSansCondensed-BoldOblique.woff" hash="3242cc1f8b2373420e38d3aefcc9e408"/><file name="absolut_pro_boldcondensed-webfont.ttf" hash="dee7ac19c5727e29ba33192f466560ea"/><file name="absolut_pro_boldcondensed-webfont.woff" hash="585c3a24a09cd230d2e456db4a04d4d7"/><file name="absolut_pro_bookcondensed-webfont.ttf" hash="2c8c3c2eb35d5d36ab0927d2fd6f1732"/><file name="absolut_pro_bookcondensed-webfont.woff" hash="4868c6df04841d20c0ff3ee3a2e9830d"/><file name="bootstrap-responsive.css" hash="d2c30d07a98d50e945570bf32c56435f"/><file name="bootstrap-responsive.min.css" hash="365a247af4036532701d83957e490adc"/><file name="bootstrap.css" hash="08f2256002f66a415dbc2e8afb722d70"/><file name="bootstrap.min.css" hash="7f1ef7e98cc02f65b5dce59bafa038db"/><file name="dejavusanscondensed-bold-webfont.eot" hash="fa2f3a00c08cc9f47201cac746a06bf2"/><file name="dejavusanscondensed-bold-webfont.svg" hash="f4f7213b78edc8ce3756a61868540ea4"/><file name="dejavusanscondensed-bold-webfont.ttf" hash="c2ca6902c10cb361346e2561c41af171"/><file name="dejavusanscondensed-bold-webfont.woff" hash="2eefe2ee018b50741c817aff2e25931a"/><file name="dejavusanscondensed-webfont.ttf" hash="5c1e2a1d836ff13b21d208ae62263331"/><file name="dejavusanscondensed-webfont.woff" hash="3aa174b6ab569947533738c8d9cd1808"/><file name="pikaday.css" hash="5a32b7adc30d7de002b204036e5c40ae"/><file name="squeezol.css" hash="837c3a198138bac9609d9f97c87798f0"/></dir><dir name="js"><file name="_squeezol3.js" hash="b75b131f2449f832b961f1ed5daaf2ce"/><file name="bootstrap.min.js" hash="a121f0e47edc5182e1aca1396807db70"/><file name="jquery.min.js" hash="8101d596b2b8fa35fe3a634ea342d7c3"/><file name="noconflict.js" hash="537d75ac65cd7588ce5addbd6d977d80"/><file name="pikaday.js" hash="441d514c9231d36b1d589bb3b78accb1"/></dir><dir name="images"><dir name="squeezol_payment"><file name="btn-finger.png" hash="32939ad91cd1416e303fe72edde3389e"/><file name="btn2.jpg" hash="ddc15e5c081115513a9e9e6dc41cdafc"/><file name="busta.png" hash="f5da1e0e1e1a5eb3cea2d6d9d89a91d6"/><file name="busta2.jpg" hash="6056ab70cbb9fb274510fafc79ebc745"/><file name="default.jpg" hash="dd9154d475d1abaa69163378cfa482f8"/><file name="facebook_small.png" hash="24a08c9069e7a37d56ef7c2514c652b5"/><file name="fenicottero.png" hash="dd5753b966338ca1f711ceec5dbcf75b"/><file name="ghianda_step_blu.png" hash="9ff125808d9fbdef766caf502a304ad2"/><file name="ghianda_step_grigia.png" hash="4d58eee97a1f8655a87c7a0f20e66eda"/><file name="info-black.png" hash="10de26a1713ff21b9a4f169da5abdbdb"/><file name="logo_min.png" hash="70e11306eda7fbd42d78a72f1109a17d"/><file name="mail_small.png" hash="da8257e98dd2ad413c61309043f71ed9"/><file name="pay_button.png" hash="970ec7feff9b6b7b9062d8f5a8e10bd1"/><file name="pay_button2.png" hash="6f6727fb922f128dc3cf3a9b42b00e1a"/><file name="salva2.jpg" hash="557ff279658464685464b856d4d3f634"/><file name="salvadanaio.png" hash="a2a0d69adabe332b8106bfaec0d49f87"/><file name="shopping-cart.jpg" hash="ccf6a2d64c387127e988724f2a986ca3"/><file name="squeezol.png" hash="e2059411e9f14fdfe1e8b21739f7a512"/><file name="squeezol_icon-aziende.png" hash="e1231a071b99b6fe07db08d247a4a086"/><file name="squeezol_icon-creasplit-pink.png" hash="a7d5094fca629f3f8d068049db852d03"/><file name="squeezol_icon-creasplit.png" hash="decd22b53c32b8472b0a46d0aed4afe9"/><file name="squeezol_icon-invita-pink.png" hash="b1eb9ef65c147d6552d4d402373bcf10"/><file name="squeezol_icon-invita.png" hash="0b274298ec828752a61db8686af9f720"/><file name="squeezol_icon-riassunto-pink.png" hash="82db5c7c4329194760ad7cb728bd1014"/><file name="squeezol_icon-riassunto.png" hash="2e50238f01e7a407e5d491ec75c25ec8"/></dir></dir></dir></dir></dir></dir></target></contents></package>
1
  <?xml version="1.0"?>
2
+ <package><name>Squeezol_Payment</name><version>1.0.2</version><stability>stable</stability><license>OSL</license><channel>community</channel><extends></extends><summary>It enables group payments, a split of cart amount</summary><description>Squeezol Split is the innovative payment technology that solves personal fundraising problems between people, simplifying scheduling, budget planning and finally payments. Enable group purchasing on your e-commerce site or marketplace just integrating &#x2018;Pay with Squeezol&#x2019; button: everyone puts his share in, then the merchant receives the entire payment due. A buying system used in current life now completely digitalized, taking advantage of social media tools to ease at the same time the whole customers&#x2019; experience and the viral diffusion of merchants brand.</description><notes>Frontend update</notes><authors><author><name>Davide Costa</name><user>nafta86</user><email>davide.costa@squeezol.com</email></author><author><name>Alessandro Caligaris</name><user>alfietto91</user><email>alessandro.caligaris1991@gmail.com</email></author><author><name>John Doe</name><user>john</user><email>john3@doe.com</email></author></authors><date>2014-11-28</date><time>9:02:41</time><compatible></compatible><dependencies><required><php><min>5.2.0</min><max>6.0.0</max></php></required></dependencies><contents><target name="mage"><file name="README.md" hash="97f9dbb159f7cfa3f574c2374f906b83"/><dir name="lib"><dir name="Squeezol"><file name="endpoints.php" hash="bb57c3f817e4a7bbe578056475c2c85b"/></dir><dir name="oauth2"><file name="Client.php" hash="cd46e543dc9ce042347e929bafb2637a"/><file name="README" hash="8ef3bf723c93b6e091b707a546df2804"/><file name="auth_request.php" hash="d78edf267fee0e4c9c483d46f4405d98"/><file name="composer.json" hash="b1a24295215d44d727f603e7da644a5a"/><dir name="GrantType"><file name="AuthorizationCode.php" hash="a1ff324a733fc33dbf938153c4c1667c"/><file name="ClientCredentials.php" hash="21b30fbb06d4b67263499d687316ae8b"/><file name="IGrantType.php" hash="ee03d4c5bc20f518716fc2c616b4d38d"/><file name="Password.php" hash="2e938e60c4af8bad71b5c4f0f1a40969"/><file name="RefreshToken.php" hash="a773f48348ad7aa510955099ba18d3ad"/></dir></dir></dir><dir name="app"><dir name="design"><dir name="frontend"><dir name="base"><dir name="default"><dir name="template"><dir name="squeezol_payment"><file name="create.phtml" hash="7f33a4cd28d0f09ab8b8b94af207b326"/><file name="digest.phtml" hash="ad115777c40a2bf9de8287963340c42c"/><file name="invitation.phtml" hash="769550bdcdeec4c37d2dc46befe32db1"/><file name="logo.phtml" hash="92c3ba5d33319de8c2253f7207751d10"/><file name="review.phtml" hash="788d3e1812a08c0ec53675d16b5ff11e"/><file name="start.phtml" hash="147963cd3b32a0fad1857c1e6d6eae8f"/></dir></dir><dir name="layout"><file name="squeezol_payment.xml" hash="2f74ae0cd241dc84f1253f905256460a"/></dir></dir></dir></dir></dir><dir name="etc"><dir name="modules"><file name="Squeezol_Payment.xml" hash="8069f82ec151f6c45be892bcc32460f8"/></dir></dir><dir name="code"><dir name="local"><dir name="Squeezol"><dir name="Payment"><dir name="Helper"><file name="Data.php" hash="435781e5e5e1a60ddd4c631f8efcfb42"/></dir><dir name="Block"><file name="Logo.php" hash="f9c7b30ccf3d9c947ec4a33c1662c395"/><file name="Start.php" hash="7edb0747a52d16fa21a2952c6d356191"/></dir><dir name="data"><dir name="squeezol_payment_setup"><file name="data-install-0.1.0.php" hash="3b58d0cdbc68e0260e839a2c8f0d4675"/></dir></dir><dir name="etc"><file name="config.xml" hash="816f839cf9155c94838938ee9b4c1532"/><file name="system.xml" hash="f21029a6dce1a2225501fe793e03897c"/></dir><dir name="Model"><file name="Params.php" hash="60fe9d8365773cc9de53e5d904d82fac"/><file name="Paramsandbox.php" hash="1f90070265de7948188c79590009ac1d"/><file name="PaymentMethod.php" hash="37fcaf2619c43b2713c4a5441d5345cc"/><file name="Session.php" hash="6453e3413705bde3e492ac9829b954e8"/><dir name="Mysql4"><file name="Params.php" hash="b12305337a72803ed2d61f6b8cac0159"/><dir name="Params"><file name="Collection.php" hash="5c73d0c799b880eed0bfc65bd50f17b6"/></dir></dir><dir name="Resource"><file name="Setup.php" hash="0340022ca0914dfcd7b6b589767dbc21"/></dir></dir><dir name="controllers"><file name="IndexController.php" hash="ffe4397ad8b493b65c6323ca0d3e66b9"/><file name="OrderProcessingController.php" hash="5e56204902a16dd1c726dc61050c2503"/></dir><dir name="sql"><dir name="squeezol_payment_setup"><file name="install-0.1.0.php" hash="404031896ca519d8739300687fc1ab9e"/><file name="upgrade-0.1.0-0.2.0.php" hash="1bd99cfd46a27f7d94754540d32af500"/><file name="upgrade-0.2.0-1.0.0.php" hash="36edcf31ba4f44b97b80d77868da31e9"/></dir></dir></dir></dir></dir></dir></dir><dir name="skin"><dir name="frontend"><dir name="base"><dir name="default"><dir name="css"><file name="DejaVuSansCondensed-BoldOblique.eot" hash="2c79dd754287cea48f32a3fff983bf15"/><file name="DejaVuSansCondensed-BoldOblique.svg" hash="326f9917a1db7537c95bf0b6124b899f"/><file name="DejaVuSansCondensed-BoldOblique.ttf" hash="7bb71c1ec629c0bf5d27e2e2d5e20066"/><file name="DejaVuSansCondensed-BoldOblique.woff" hash="3242cc1f8b2373420e38d3aefcc9e408"/><file name="absolut_pro_boldcondensed-webfont.ttf" hash="dee7ac19c5727e29ba33192f466560ea"/><file name="absolut_pro_boldcondensed-webfont.woff" hash="585c3a24a09cd230d2e456db4a04d4d7"/><file name="absolut_pro_bookcondensed-webfont.ttf" hash="2c8c3c2eb35d5d36ab0927d2fd6f1732"/><file name="absolut_pro_bookcondensed-webfont.woff" hash="4868c6df04841d20c0ff3ee3a2e9830d"/><file name="bootstrap-responsive.css" hash="d2c30d07a98d50e945570bf32c56435f"/><file name="bootstrap-responsive.min.css" hash="365a247af4036532701d83957e490adc"/><file name="bootstrap.css" hash="08f2256002f66a415dbc2e8afb722d70"/><file name="bootstrap.min.css" hash="7f1ef7e98cc02f65b5dce59bafa038db"/><file name="dejavusanscondensed-bold-webfont.eot" hash="fa2f3a00c08cc9f47201cac746a06bf2"/><file name="dejavusanscondensed-bold-webfont.svg" hash="f4f7213b78edc8ce3756a61868540ea4"/><file name="dejavusanscondensed-bold-webfont.ttf" hash="c2ca6902c10cb361346e2561c41af171"/><file name="dejavusanscondensed-bold-webfont.woff" hash="2eefe2ee018b50741c817aff2e25931a"/><file name="dejavusanscondensed-webfont.ttf" hash="5c1e2a1d836ff13b21d208ae62263331"/><file name="dejavusanscondensed-webfont.woff" hash="3aa174b6ab569947533738c8d9cd1808"/><file name="pikaday.css" hash="5a32b7adc30d7de002b204036e5c40ae"/><file name="squeezol.css" hash="837c3a198138bac9609d9f97c87798f0"/></dir><dir name="js"><file name="_squeezol3.js" hash="d64a6f0be4f0bc7f19e194540997c68c"/><file name="bootstrap.min.js" hash="a121f0e47edc5182e1aca1396807db70"/><file name="jquery.min.js" hash="8101d596b2b8fa35fe3a634ea342d7c3"/><file name="noconflict.js" hash="537d75ac65cd7588ce5addbd6d977d80"/><file name="pikaday.js" hash="441d514c9231d36b1d589bb3b78accb1"/></dir><dir name="images"><dir name="squeezol_payment"><file name="btn-finger.png" hash="32939ad91cd1416e303fe72edde3389e"/><file name="btn2.jpg" hash="ddc15e5c081115513a9e9e6dc41cdafc"/><file name="busta.png" hash="f5da1e0e1e1a5eb3cea2d6d9d89a91d6"/><file name="busta2.jpg" hash="6056ab70cbb9fb274510fafc79ebc745"/><file name="default.jpg" hash="dd9154d475d1abaa69163378cfa482f8"/><file name="facebook_small.png" hash="24a08c9069e7a37d56ef7c2514c652b5"/><file name="fenicottero.png" hash="dd5753b966338ca1f711ceec5dbcf75b"/><file name="ghianda_step_blu.png" hash="9ff125808d9fbdef766caf502a304ad2"/><file name="ghianda_step_grigia.png" hash="4d58eee97a1f8655a87c7a0f20e66eda"/><file name="info-black.png" hash="10de26a1713ff21b9a4f169da5abdbdb"/><file name="logo_min.png" hash="70e11306eda7fbd42d78a72f1109a17d"/><file name="mail_small.png" hash="da8257e98dd2ad413c61309043f71ed9"/><file name="pay_button.png" hash="970ec7feff9b6b7b9062d8f5a8e10bd1"/><file name="pay_button2.png" hash="6f6727fb922f128dc3cf3a9b42b00e1a"/><file name="salva2.jpg" hash="557ff279658464685464b856d4d3f634"/><file name="salvadanaio.png" hash="a2a0d69adabe332b8106bfaec0d49f87"/><file name="shopping-cart.jpg" hash="ccf6a2d64c387127e988724f2a986ca3"/><file name="squeezol.png" hash="e2059411e9f14fdfe1e8b21739f7a512"/><file name="squeezol_icon-aziende.png" hash="e1231a071b99b6fe07db08d247a4a086"/><file name="squeezol_icon-creasplit-pink.png" hash="a7d5094fca629f3f8d068049db852d03"/><file name="squeezol_icon-creasplit.png" hash="decd22b53c32b8472b0a46d0aed4afe9"/><file name="squeezol_icon-invita-pink.png" hash="b1eb9ef65c147d6552d4d402373bcf10"/><file name="squeezol_icon-invita.png" hash="0b274298ec828752a61db8686af9f720"/><file name="squeezol_icon-riassunto-pink.png" hash="82db5c7c4329194760ad7cb728bd1014"/><file name="squeezol_icon-riassunto.png" hash="2e50238f01e7a407e5d491ec75c25ec8"/></dir></dir></dir></dir></dir></dir></target></contents></package>
skin/frontend/base/default/images/squeezol_payment/btn2.jpg CHANGED
File without changes
skin/frontend/base/default/js/_squeezol3.js CHANGED
@@ -1557,11 +1557,8 @@ throw new SyntaxError('JSON.parse');
1557
  this.setWrongEmails(answer.emailArray);
1558
  this.appendErrorInfo('Una o più email inserite sono ripetute, correggi per proseguire.', document.getElementById('squeezolEmail'));
1559
  }
1560
- else if (errorType === 'Contribution') {
1561
- this.appendErrorInfo('Inserisci un importo valido', document.getElementById('squeezolEmail'));
1562
- }
1563
  else if (errorType == 'error') {
1564
- this.appendErrorInfo(answer.message, document.getElementsByClassName('squeezol_quota')[0]);
1565
  }
1566
  else {
1567
  console.log('Bad error code');
@@ -1695,11 +1692,14 @@ throw new SyntaxError('JSON.parse');
1695
  },
1696
  that.appendErrorInfo = function(text, domItem){
1697
  var div = document.createElement('div');
1698
- div.className = 'sq-row';
 
 
 
 
1699
  div.id = 'alertErrorDiv';
1700
- div.innerHTML = '<div class="sq-alert sq-alert-danger sq-col-xs-7 sq-col-xs-offset-1">'+
1701
  '<p>'+
1702
- '<strong>OOPS!</strong>'+
1703
  text+
1704
  '</p>'+
1705
  '</div>';
@@ -1926,6 +1926,7 @@ throw new SyntaxError('JSON.parse');
1926
  invError.removeErrorInfo();
1927
  ui.loadState(target);
1928
  invitations.send()
 
1929
  });
1930
  // Select Contribution Type handler:
1931
  var box = DomElement({el: document.getElementById('contributionType')});
@@ -2079,7 +2080,8 @@ throw new SyntaxError('JSON.parse');
2079
  that.renderGET = function() {
2080
  var params, isAdmin, invited, participants, partObj, groupStatus, saInput,
2081
  openPay, canFinish, targetAmount, renderBtn, singleAmountBtn, inviteBtn,
2082
- renderDiv, participantId, invAmount, alertPaid;
 
2083
  var part, totalPaid;
2084
  var SqDiv=document.getElementById('squeezol_view');
2085
  var sqBtnContainer;
@@ -2125,7 +2127,7 @@ throw new SyntaxError('JSON.parse');
2125
  alertDes.className = 'sq-row sq-alert sq-alert-success'
2126
  alertDes.innerHTML = '<p class="sq-text-center">'+
2127
  '<strong> Congratulazioni!</strong>'+
2128
- 'Lo split si è conclusa con successo!'+
2129
  '</p>';
2130
  SqDiv.appendChild(alertDes);
2131
  }
@@ -2191,6 +2193,7 @@ throw new SyntaxError('JSON.parse');
2191
  alertPaid=document.createElement('div');
2192
  alertPaid.className='sq-alert sq-alert-success sq-row';
2193
  alertPaid.innerHTML=paidText;
 
2194
  renderBtn=Div(alertPaid);
2195
  }
2196
  else{
@@ -2201,6 +2204,18 @@ throw new SyntaxError('JSON.parse');
2201
  renderBtn.regHandler('click', buttonHandler);
2202
  }
2203
  }
 
 
 
 
 
 
 
 
 
 
 
 
2204
  }
2205
  }
2206
  else {
@@ -2275,16 +2290,16 @@ throw new SyntaxError('JSON.parse');
2275
  }
2276
  // Group deserted
2277
  else if(answer.group.status == 'DES') {
2278
- renderBtn.create('Split Chiusa', 'big', 'SqueezolDeserted_');
2279
  renderBtn.get().setAttribute('data-participant', participantId)
2280
  renderBtn.get().disabled=true;
2281
  renderBtn.get().className='buttonWarning sq-btn sq-btn-lg';
2282
  alertDes = document.createElement('div');
2283
- alertDes.className = 'sq-alert sq-alert-warning'
2284
- alertDes.innerHTML = '<p>'+
2285
  '<strong>Attenzione!</strong>'+
2286
- 'Lo split è stata chiusa dall\'organizzatore o è scaduto il termine di 20 giorni entro i quali effetuare il pagamento.'+
2287
- '</p>';
2288
  SqDiv.appendChild(alertDes);
2289
  }
2290
 
@@ -2364,6 +2379,9 @@ throw new SyntaxError('JSON.parse');
2364
  case 'SA':
2365
  this.notifyAmount(answer);
2366
  break;
 
 
 
2367
  };
2368
  return;
2369
  },
@@ -2534,10 +2552,12 @@ throw new SyntaxError('JSON.parse');
2534
  parentDiv.removeChild(oldBtn);
2535
  alertPaid=document.createElement('div');
2536
  alertPaid.className='sq-alert sq-alert-success sq-row';
2537
- alertPaid.innerHTML='<p class"sq-text-center"><strong> La tua quota è stata prenotata! </strong>'+
2538
- 'L\'importo verrà scalato dalla tua carta solo se l\'obiettivo verrà raggiunto!'+
2539
- 'Invita altri amici per diminuire la quota!</p>';
2540
- renderBtn=Div(alertPaid);
 
 
2541
  payBoxP = payBox.parentNode;
2542
  payBoxP.removeChild(payBox);
2543
  }
@@ -2581,7 +2601,7 @@ throw new SyntaxError('JSON.parse');
2581
  gr_status='In attesa di accettazione';
2582
  break;
2583
  case 'CWS':
2584
- gr_status='Split Completata';
2585
  break;
2586
  case 'DES':
2587
  gr_status='Abbandonato';
1557
  this.setWrongEmails(answer.emailArray);
1558
  this.appendErrorInfo('Una o più email inserite sono ripetute, correggi per proseguire.', document.getElementById('squeezolEmail'));
1559
  }
 
 
 
1560
  else if (errorType == 'error') {
1561
+ this.appendErrorInfo(answer.error, document.getElementById('squeezol_admin_contrib').parentNode.parentNode);
1562
  }
1563
  else {
1564
  console.log('Bad error code');
1692
  },
1693
  that.appendErrorInfo = function(text, domItem){
1694
  var div = document.createElement('div');
1695
+ var error=document.getElementById('alertErrorDiv');
1696
+ if (error){
1697
+ $jQuery(error).remove();
1698
+ }
1699
+ div.className = 'sq-row row-separata';
1700
  div.id = 'alertErrorDiv';
1701
+ div.innerHTML = '<div class="sq-alert sq-alert-danger sq-col-xs-11 sq-col-xs-offset-1">'+
1702
  '<p>'+
 
1703
  text+
1704
  '</p>'+
1705
  '</div>';
1926
  invError.removeErrorInfo();
1927
  ui.loadState(target);
1928
  invitations.send()
1929
+ ui.loadStop(target);
1930
  });
1931
  // Select Contribution Type handler:
1932
  var box = DomElement({el: document.getElementById('contributionType')});
2080
  that.renderGET = function() {
2081
  var params, isAdmin, invited, participants, partObj, groupStatus, saInput,
2082
  openPay, canFinish, targetAmount, renderBtn, singleAmountBtn, inviteBtn,
2083
+ renderDiv, participantId, invAmount, alertPaid, renderRef, refContainer;
2084
+ var paidCount=0;
2085
  var part, totalPaid;
2086
  var SqDiv=document.getElementById('squeezol_view');
2087
  var sqBtnContainer;
2127
  alertDes.className = 'sq-row sq-alert sq-alert-success'
2128
  alertDes.innerHTML = '<p class="sq-text-center">'+
2129
  '<strong> Congratulazioni!</strong>'+
2130
+ 'Lo split si è concluso con successo!'+
2131
  '</p>';
2132
  SqDiv.appendChild(alertDes);
2133
  }
2193
  alertPaid=document.createElement('div');
2194
  alertPaid.className='sq-alert sq-alert-success sq-row';
2195
  alertPaid.innerHTML=paidText;
2196
+ renderBtn = Button();
2197
  renderBtn=Div(alertPaid);
2198
  }
2199
  else{
2204
  renderBtn.regHandler('click', buttonHandler);
2205
  }
2206
  }
2207
+ if(partObj.status=='P' && paidCount==0){
2208
+ paidCount=1;
2209
+ refContainer = Div(document.createElement('div'));
2210
+ renderRef=Button();
2211
+ renderRef.create('Rimborsa', 'small', 'SqueezolRefund_');
2212
+ renderRef.get().setAttribute('data-participant', participantId);
2213
+ renderRef.get().setAttribute('data-action', 'RG');
2214
+ renderRef.get().className='btn btn-sm btn-danger';
2215
+ renderRef.regHandler('click', buttonHandler);
2216
+ refContainer.append(renderRef.wrap(wrapBtn));
2217
+ SqDiv.appendChild(refContainer.wrap(wrapper_row));
2218
+ }
2219
  }
2220
  }
2221
  else {
2290
  }
2291
  // Group deserted
2292
  else if(answer.group.status == 'DES') {
2293
+ renderBtn.create('Split Chiuso', 'big', 'SqueezolDeserted_');
2294
  renderBtn.get().setAttribute('data-participant', participantId)
2295
  renderBtn.get().disabled=true;
2296
  renderBtn.get().className='buttonWarning sq-btn sq-btn-lg';
2297
  alertDes = document.createElement('div');
2298
+ alertDes.className = 'sq-row'
2299
+ alertDes.innerHTML = '<div class="sq-col-xs-10 sq-col-xs-offset-1 sq-alert sq-alert-warning"><p>'+
2300
  '<strong>Attenzione!</strong>'+
2301
+ 'Lo split è stata chiuso dall\'organizzatore o è scaduto il termine di 20 giorni entro i quali effetuare il pagamento. Le quote versate torneranno disponibili al massimo entro 30 giorni dalla data del pagamento.'+
2302
+ '</div></p>';
2303
  SqDiv.appendChild(alertDes);
2304
  }
2305
 
2379
  case 'SA':
2380
  this.notifyAmount(answer);
2381
  break;
2382
+ case 'RG':
2383
+ location.reload(true);
2384
+ break;
2385
  };
2386
  return;
2387
  },
2552
  parentDiv.removeChild(oldBtn);
2553
  alertPaid=document.createElement('div');
2554
  alertPaid.className='sq-alert sq-alert-success sq-row';
2555
+ alertPaid.innerHTML='<p class="sq-text-center">'+
2556
+ '<strong> Congratulazioni!</strong>'+
2557
+ 'Lo split si è concluso con successo!'+
2558
+ '</p>';
2559
+ renderBtn=Div(document.createElement('div'));
2560
+ renderBtn.append(alertPaid);
2561
  payBoxP = payBox.parentNode;
2562
  payBoxP.removeChild(payBox);
2563
  }
2601
  gr_status='In attesa di accettazione';
2602
  break;
2603
  case 'CWS':
2604
+ gr_status='Split Completato';
2605
  break;
2606
  case 'DES':
2607
  gr_status='Abbandonato';