summit-registration-lite 2.0.13 → 2.0.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.css +4 -2
- package/dist/index.js +636 -104
- package/package.json +8 -1
package/dist/index.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
.outerWrapper___OWXyi{border:1px solid lightgray;background-color:white;border-radius:5px}.innerWrapper___mIrBF{padding:10px}.title___Tbvkl{display:flex;justify-content:center;align-items:center;border-bottom:1px solid lightgray;margin:0px -10px;padding:0px 15px 5px}.title___Tbvkl i{cursor:pointer;margin-left:auto}.title___Tbvkl span{width:100%;font-weight:bold;font-size:18px;text-align:center;color:var(--color_primary)}
|
|
1
|
+
#modal___G3Cmq{padding:100px 0}.outerWrapper___OWXyi{border:1px solid lightgray;background-color:white;border-radius:5px}.innerWrapper___mIrBF{padding:10px}.title___Tbvkl{display:flex;justify-content:center;align-items:center;border-bottom:1px solid lightgray;margin:0px -10px;padding:0px 15px 5px}.title___Tbvkl i{cursor:pointer;margin-left:auto}.title___Tbvkl span{width:100%;font-weight:bold;font-size:18px;text-align:center;color:var(--color_primary)}
|
|
2
2
|
|
|
3
3
|
:root{--color_primary: lightgray;--color_primary50: lightgray;--color_primary_contrast: #fff;--color_primary_contrast50: #ffffff50;--color_secondary: lightgray;--color_secondary_contrast: lightgray;--color_text_dark: #212121;--color_text_light: #ffffff;--color_text_input_hints: #212121}.step-wrapper{padding:10px;margin:10px;border:1px solid lightgray;border-radius:5px}.summit-registration-lite{color:var(--color_text_dark);font-size:15px;font-smooth:auto !important;-moz-osx-font-smoothing:auto !important;-webkit-font-smoothing:auto !important}.summit-registration-lite input:-moz-placeholder,.summit-registration-lite input::-moz-placeholder{opacity:1}input{outline:none}
|
|
4
4
|
|
|
@@ -6,9 +6,11 @@
|
|
|
6
6
|
|
|
7
7
|
.title___LksVm{font-weight:bold;cursor:pointer}.form___v5GIx{display:flex;flex-wrap:wrap;justify-content:space-between;margin:10px 0}.form___v5GIx div.fieldWrapper___Eoe61{width:48%;border-radius:5px;background-color:#e6f3ff;border:1px solid #3fa2f7;height:36px;padding:5px 10px;display:flex;justify-content:space-between;align-items:center;margin-bottom:5px}.form___v5GIx div.fieldWrapper___Eoe61:first-of-type{width:100%}.form___v5GIx div.fieldWrapper___Eoe61 input{width:100%;background-color:transparent;border:none}.form___v5GIx div.fieldWrapper___Eoe61 input:focus-visible{outline:none}.form___v5GIx div.fieldWrapper___Eoe61 i{position:relative}.form___v5GIx div.fieldWrapper___Eoe61>div{width:100%}.form___v5GIx div.fieldWrapper___Eoe61>div:first-of-type{width:95%}.form___v5GIx input{width:48%;border-radius:5px;border:1px solid #3fa2f7;color:#3486cd;font-size:16px;background-color:#e6f3ff;height:36px;padding:5px 10px;display:flex;justify-content:space-between;align-items:center;margin-bottom:5px;font-weight:bold}.form___v5GIx input::placeholder{color:#3486cd}
|
|
8
8
|
|
|
9
|
+
.form___zXb7s{display:flex;flex-wrap:wrap;justify-content:space-between;margin:10px 0}.form___zXb7s div.fieldWrapper___G4Wqw{width:100%;margin-bottom:5px}.form___zXb7s div.fieldWrapper___G4Wqw:first-of-type div.inputWrapper___Yz5zB{width:100%}.form___zXb7s div.fieldWrapper___G4Wqw .fieldRow___NfZdJ{justify-content:space-between;display:flex}.form___zXb7s div.fieldWrapper___G4Wqw div.inputWrapper___Yz5zB{width:48%}.form___zXb7s div.lawpayWrapper___hpUBf{height:36px}.form___zXb7s div.dateWrapper___XDfqs{display:flex;justify-content:space-between}.form___zXb7s div.dateWrapper___XDfqs>div{width:48%}.form___zXb7s div.dateWrapper___XDfqs>div .dropdown___l3_bk{width:100%}.form___zXb7s div.dateWrapper___XDfqs>div .dropdown___l3_bk>div{border:1px solid var(--color_primary);width:100%}.form___zXb7s div.inputWrapper___Yz5zB{display:flex;border-radius:5px;border:1px solid var(--color_primary);height:36px;padding:5px 10px;justify-content:space-between;align-items:center}.form___zXb7s div.inputWrapper___Yz5zB iframe{height:inherit;width:inherit}.form___zXb7s div.inputWrapper___Yz5zB input{width:100%;background-color:transparent;border:none;padding:0;font-size:16px;display:flex;justify-content:space-between;align-items:center}.form___zXb7s div.inputWrapper___Yz5zB input::placeholder{color:var(--color_text_input_hints);font-size:16px}.form___zXb7s div.inputWrapper___Yz5zB input:focus-visible{outline:none}.form___zXb7s div.inputWrapper___Yz5zB i{position:relative}.form___zXb7s div.inputWrapper___Yz5zB>div{width:100%}.form___zXb7s div.inputWrapper___Yz5zB>div:first-of-type{width:95%}.form___zXb7s div.fieldError___Igq3U{margin-top:5px;margin-bottom:5px;color:#e5424d;font-size:14px;line-height:1.5}.form___zXb7s div.fieldError___Igq3U::before{font-family:FontAwesome;content:'\f071';margin-right:5px}
|
|
10
|
+
|
|
9
11
|
.form___DoT3x{display:flex;flex-wrap:wrap;justify-content:space-between;margin:10px 0}.form___DoT3x div.fieldWrapper___wa1Ks{width:48%;margin-bottom:5px}.form___DoT3x div.fieldWrapper___wa1Ks:first-of-type{width:100%}.form___DoT3x div.inputWrapper___CbXhF{display:flex;border-radius:5px;border:1px solid var(--color_primary);height:36px;padding:5px 10px;justify-content:space-between;align-items:center}.form___DoT3x div.inputWrapper___CbXhF input{width:100%;background-color:transparent;border:none;padding:0;font-size:16px;display:flex;justify-content:space-between;align-items:center}.form___DoT3x div.inputWrapper___CbXhF input::placeholder{color:var(--color_text_input_hints);font-size:16px}.form___DoT3x div.inputWrapper___CbXhF input:focus-visible{outline:none}.form___DoT3x div.inputWrapper___CbXhF i{position:relative}.form___DoT3x div.inputWrapper___CbXhF>div{width:100%}.form___DoT3x div.inputWrapper___CbXhF>div:first-of-type{width:95%}.form___DoT3x div.fieldError___QrMYW{margin-top:5px;margin-bottom:5px;color:#e5424d;font-size:14px;line-height:1.5}.form___DoT3x div.fieldError___QrMYW::before{font-family:FontAwesome;content:'\f071';margin-right:5px}
|
|
10
12
|
|
|
11
|
-
.title___ECoNz{font-weight:bold;cursor:pointer;display:flex;justify-content:space-between}.title___ECoNz div{font-weight:normal}.form___lDFka{display:flex;flex-wrap:wrap;justify-content:space-between;margin:10px 0 0}.form___lDFka div.fieldWrapper___Mi_nL{width:48%;margin-bottom:5px}.form___lDFka div.inputWrapper___PEQFR{display:flex;border-radius:5px;border:1px solid var(--color_primary);height:36px;padding:5px 10px;justify-content:space-between;align-items:center}.form___lDFka div.inputWrapper___PEQFR input{width:100%;background-color:transparent;border:none;padding:0;font-size:16px;display:flex;justify-content:space-between;align-items:center}.form___lDFka div.inputWrapper___PEQFR input::placeholder{color:var(--color_text_input_hints);font-size:16px}.form___lDFka div.inputWrapper___PEQFR input:focus-visible{outline:none}.form___lDFka div.inputWrapper___PEQFR .readOnly___WRazF{opacity:0.6;cursor:default}.form___lDFka div.fieldError___ksJVe{margin-top:5px;margin-bottom:5px;color:#e5424d;font-size:14px;line-height:1.5}.form___lDFka div.fieldError___ksJVe::before{font-family:FontAwesome;content:'\f071';margin-right:5px}.form___lDFka .companies___kmGFB>div{position:relative;width:100%;border-radius:5px;display:flex;justify-content:space-between;align-items:center;font-size:15px}.form___lDFka .companies___kmGFB>div::placeholder{color:var(--color_text_input_hints)}.form___lDFka .companies___kmGFB>div>div{height:100%;width:100%}.form___lDFka .companies___kmGFB>div>div>div{height:36px;padding:0px;border:1px solid var(--color_primary);box-shadow:0 0 1px var(--color_primary)}.form___lDFka .companies___kmGFB>div>div>div>div{height:36px}.form___lDFka .companies___kmGFB>div>div>span+div+div{overflow:auto;height:auto}.form___lDFka .companies___kmGFB>div>div>span+div+div>div{height:auto}.form___lDFka .companies___kmGFB>div input{padding:5px 10px;border:1px solid var(--color_primary);padding-right:0px !important;background-color:transparent}.form___lDFka .companies___kmGFB>div i{right:10px !important}.moreInfo___cQYdZ{display:inline-block;margin-top:10px}.moreInfoTooltip___lslgT{max-width:280px}.ticketQuantityNotice___L6gis{margin:10px 0 0 !important}.formErrors___dQQMe{margin-top:10px}.formErrors___dQQMe div+div{margin-top:10px}
|
|
13
|
+
.title___ECoNz{font-weight:bold;cursor:pointer;display:flex;justify-content:space-between}.title___ECoNz div{font-weight:normal}.form___lDFka{display:flex;flex-wrap:wrap;justify-content:space-between;margin:10px 0 0}.form___lDFka div.fieldWrapper___Mi_nL{width:48%;margin-bottom:5px}.form___lDFka div.inputWrapper___PEQFR{display:flex;border-radius:5px;border:1px solid var(--color_primary);height:36px;padding:5px 10px;justify-content:space-between;align-items:center}.form___lDFka div.inputWrapper___PEQFR input{width:100%;background-color:transparent;border:none;padding:0;font-size:16px;display:flex;justify-content:space-between;align-items:center}.form___lDFka div.inputWrapper___PEQFR input::placeholder{color:var(--color_text_input_hints);font-size:16px}.form___lDFka div.inputWrapper___PEQFR input:focus-visible{outline:none}.form___lDFka div.inputWrapper___PEQFR .readOnly___WRazF{opacity:0.6;cursor:default}.form___lDFka div.fieldError___ksJVe{margin-top:5px;margin-bottom:5px;color:#e5424d;font-size:14px;line-height:1.5;justify-content:left !important}.form___lDFka div.fieldError___ksJVe::before{font-family:FontAwesome;content:'\f071';margin-right:5px}.form___lDFka .companies___kmGFB>div{position:relative;width:100%;border-radius:5px;display:flex;justify-content:space-between;align-items:center;font-size:15px}.form___lDFka .companies___kmGFB>div::placeholder{color:var(--color_text_input_hints)}.form___lDFka .companies___kmGFB>div>div{height:100%;width:100%}.form___lDFka .companies___kmGFB>div>div>div{height:36px;padding:0px;border:1px solid var(--color_primary);box-shadow:0 0 1px var(--color_primary)}.form___lDFka .companies___kmGFB>div>div>div>div{height:36px}.form___lDFka .companies___kmGFB>div>div>span+div+div{overflow:auto;height:auto}.form___lDFka .companies___kmGFB>div>div>span+div+div>div{height:auto}.form___lDFka .companies___kmGFB>div input{padding:5px 10px;border:1px solid var(--color_primary);padding-right:0px !important;background-color:transparent}.form___lDFka .companies___kmGFB>div i{right:10px !important}.moreInfo___cQYdZ{display:inline-block;margin-top:10px}.moreInfoTooltip___lslgT{max-width:280px}.ticketQuantityNotice___L6gis{margin:10px 0 0 !important}.formErrors___dQQMe{margin-top:10px}.formErrors___dQQMe div+div{margin-top:10px}
|
|
12
14
|
|
|
13
15
|
.title___DNZyl{font-weight:bold;cursor:pointer;display:flex;justify-content:space-between}.summary___quWdZ{text-align:right}.crossOut___QZ7dy{text-decoration:line-through}.discount___sEK_Q{color:green}.promo___F8lPO{font-weight:bold;display:flex;justify-content:flex-end}.form___aoo7w{display:flex;gap:10px;margin-top:10px}.dropdown____HWg0{flex:1 1 auto}.quantity___SIEQZ{flex-shrink:0}.quantity___SIEQZ input,.quantity___SIEQZ button{height:36px;text-align:center;border:1px solid var(--color_primary)}.quantity___SIEQZ input{padding:0 8px;width:48px !important}.quantity___SIEQZ input,.quantity___SIEQZ input:read-only{color:inherit;background-color:#fff;border:1px solid var(--color_primary)}.quantity___SIEQZ button{display:flex;align-items:center}.quantity___SIEQZ button:disabled,.quantity___SIEQZ button:disabled:hover{opacity:0.65;background:#dedede;border-color:#bebebe}.soldOut___Hatfr{height:36px;padding:0 16px;line-height:34px;font-weight:700px;background:#dedede;border:solid 1px #bebebe;border-radius:5px;opacity:0.65;font-weight:700;flex-shrink:0}.moreInfo___LmwOe{display:inline-block;margin-top:10px}.moreInfoTooltip___nOBf1{max-width:280px}.inPersonDisclaimer___PXGTz{margin-top:15px}
|
|
14
16
|
|
package/dist/index.js
CHANGED
|
@@ -84,12 +84,248 @@ const actions_namespaceObject = require("openstack-uicore-foundation/lib/utils/a
|
|
|
84
84
|
;// CONCATENATED MODULE: external "sweetalert2"
|
|
85
85
|
const external_sweetalert2_namespaceObject = require("sweetalert2");
|
|
86
86
|
var external_sweetalert2_default = /*#__PURE__*/__webpack_require__.n(external_sweetalert2_namespaceObject);
|
|
87
|
-
;// CONCATENATED MODULE: ./src/
|
|
87
|
+
;// CONCATENATED MODULE: ./src/utils/payment-providers/lawpay-provider.js
|
|
88
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
class LawPayProvider {
|
|
95
|
+
constructor({
|
|
96
|
+
reservation,
|
|
97
|
+
summitId,
|
|
98
|
+
userProfile,
|
|
99
|
+
access_token,
|
|
100
|
+
apiBaseUrl,
|
|
101
|
+
dispatch
|
|
102
|
+
}) {
|
|
103
|
+
_defineProperty(this, "payTicket", ({
|
|
104
|
+
token
|
|
105
|
+
}) => async dispatch => {
|
|
106
|
+
var _this$userProfile, _this$userProfile2, _this$userProfile3, _this$userProfile4;
|
|
107
|
+
|
|
108
|
+
// Pay using affinity lawpay
|
|
109
|
+
const errorHandler = (err, res) => (dispatch, state) => {
|
|
110
|
+
if (res && res.statusCode === 404) {
|
|
111
|
+
const msg = res.body.message;
|
|
112
|
+
external_sweetalert2_default().fire("Validation Error", msg, "warning");
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
if (res && res.statusCode === 500) {
|
|
117
|
+
const msg = res.body.message;
|
|
118
|
+
external_sweetalert2_default().fire("Server Error", msg, "error");
|
|
119
|
+
return;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
return (0,actions_namespaceObject.authErrorHandler)(err, res);
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
let params = {
|
|
126
|
+
access_token: this.access_token,
|
|
127
|
+
expand: 'tickets,' + 'tickets.owner,' + 'tickets.owner.extra_questions,' + 'tickets.badge,' + 'tickets.badge.type,' + 'tickets.badge.type.access_levels,' + 'tickets.badge.type.features,' + 'tickets.ticket_type,' + 'tickets.ticket_type.taxes'
|
|
128
|
+
};
|
|
129
|
+
let normalizedEntity = {
|
|
130
|
+
billing_address_1: token.address1 || '',
|
|
131
|
+
billing_address_2: ((_this$userProfile = this.userProfile) === null || _this$userProfile === void 0 ? void 0 : _this$userProfile.address2) || '',
|
|
132
|
+
billing_address_zip_code: token.postal_code,
|
|
133
|
+
billing_address_city: ((_this$userProfile2 = this.userProfile) === null || _this$userProfile2 === void 0 ? void 0 : _this$userProfile2.locality) || '',
|
|
134
|
+
billing_address_state: ((_this$userProfile3 = this.userProfile) === null || _this$userProfile3 === void 0 ? void 0 : _this$userProfile3.region) || '',
|
|
135
|
+
billing_address_country: ((_this$userProfile4 = this.userProfile) === null || _this$userProfile4 === void 0 ? void 0 : _this$userProfile4.country) || '',
|
|
136
|
+
payment_method_id: token.id
|
|
137
|
+
};
|
|
138
|
+
this.dispatch(startWidgetLoading());
|
|
139
|
+
|
|
140
|
+
if (this.reservation.amount > 0) {
|
|
141
|
+
return (0,actions_namespaceObject.putRequest)(null, (0,actions_namespaceObject.createAction)(PAY_RESERVATION), `${this.apiBaseUrl}/api/v1/summits/${this.summitId}/orders/${this.reservation.hash}/checkout`, normalizedEntity, errorHandler // entity
|
|
142
|
+
)(params)(this.dispatch).then(payload => {
|
|
143
|
+
this.dispatch(stopWidgetLoading());
|
|
144
|
+
this.dispatch((0,actions_namespaceObject.createAction)(CLEAR_RESERVATION)({}));
|
|
145
|
+
this.dispatch(changeStep(3));
|
|
146
|
+
return payload;
|
|
147
|
+
}).catch(e => {
|
|
148
|
+
this.dispatch(removeReservedTicket());
|
|
149
|
+
this.dispatch(changeStep(1));
|
|
150
|
+
this.dispatch(stopWidgetLoading());
|
|
151
|
+
return e;
|
|
152
|
+
}); // The payment has succeeded. Display a success message.
|
|
153
|
+
} else {
|
|
154
|
+
// FREE TICKET
|
|
155
|
+
return (0,actions_namespaceObject.putRequest)(null, (0,actions_namespaceObject.createAction)(PAY_RESERVATION), `${this.apiBaseUrl}/api/v1/summits/${this.summitId}/orders/${this.reservation.hash}/checkout`, normalizedEntity, errorHandler // entity
|
|
156
|
+
)(params)(this.dispatch).then(payload => {
|
|
157
|
+
this.dispatch(stopWidgetLoading());
|
|
158
|
+
this.dispatch((0,actions_namespaceObject.createAction)(CLEAR_RESERVATION)({}));
|
|
159
|
+
this.dispatch(changeStep(3));
|
|
160
|
+
return payload;
|
|
161
|
+
}).catch(e => {
|
|
162
|
+
this.dispatch(removeReservedTicket());
|
|
163
|
+
this.dispatch(changeStep(1));
|
|
164
|
+
this.dispatch(stopWidgetLoading());
|
|
165
|
+
return e;
|
|
166
|
+
}); // The payment has succeeded. Display a success message.
|
|
167
|
+
}
|
|
168
|
+
});
|
|
169
|
+
|
|
170
|
+
this.reservation = reservation;
|
|
171
|
+
this.summitId = summitId;
|
|
172
|
+
this.userProfile = userProfile;
|
|
173
|
+
this.access_token = access_token;
|
|
174
|
+
this.apiBaseUrl = apiBaseUrl;
|
|
175
|
+
this.dispatch = dispatch;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
}
|
|
179
|
+
;// CONCATENATED MODULE: ./src/utils/payment-providers/stripe-provider.js
|
|
180
|
+
function stripe_provider_defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
class StripeProvider {
|
|
187
|
+
constructor({
|
|
188
|
+
reservation,
|
|
189
|
+
summitId,
|
|
190
|
+
userProfile,
|
|
191
|
+
access_token,
|
|
192
|
+
apiBaseUrl,
|
|
193
|
+
dispatch: _dispatch
|
|
194
|
+
}) {
|
|
195
|
+
stripe_provider_defineProperty(this, "payTicket", ({
|
|
196
|
+
token = null,
|
|
197
|
+
stripe = null,
|
|
198
|
+
zipCode = null
|
|
199
|
+
}) => async dispatch => {
|
|
200
|
+
var _this$userProfile, _this$userProfile2, _this$userProfile3, _this$userProfile4, _this$userProfile5;
|
|
201
|
+
|
|
202
|
+
const errorHandler = (err, res) => (dispatch, state) => {
|
|
203
|
+
if (res && res.statusCode === 404) {
|
|
204
|
+
const msg = res.body.message;
|
|
205
|
+
external_sweetalert2_default().fire("Validation Error", msg, "warning");
|
|
206
|
+
return;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
if (res && res.statusCode === 500) {
|
|
210
|
+
const msg = res.body.message;
|
|
211
|
+
external_sweetalert2_default().fire("Server Error", msg, "error");
|
|
212
|
+
return;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
return (0,actions_namespaceObject.authErrorHandler)(err, res);
|
|
216
|
+
};
|
|
217
|
+
|
|
218
|
+
let params = {
|
|
219
|
+
access_token: this.access_token,
|
|
220
|
+
expand: 'tickets,' + 'tickets.owner,' + 'tickets.owner.extra_questions,' + 'tickets.badge,' + 'tickets.badge.type,' + 'tickets.badge.type.access_levels,' + 'tickets.badge.type.features,' + 'tickets.ticket_type,' + 'tickets.ticket_type.taxes'
|
|
221
|
+
};
|
|
222
|
+
let normalizedEntity = {
|
|
223
|
+
billing_address_1: ((_this$userProfile = this.userProfile) === null || _this$userProfile === void 0 ? void 0 : _this$userProfile.address1) || '',
|
|
224
|
+
billing_address_2: ((_this$userProfile2 = this.userProfile) === null || _this$userProfile2 === void 0 ? void 0 : _this$userProfile2.address2) || '',
|
|
225
|
+
billing_address_zip_code: zipCode,
|
|
226
|
+
billing_address_city: ((_this$userProfile3 = this.userProfile) === null || _this$userProfile3 === void 0 ? void 0 : _this$userProfile3.locality) || '',
|
|
227
|
+
billing_address_state: ((_this$userProfile4 = this.userProfile) === null || _this$userProfile4 === void 0 ? void 0 : _this$userProfile4.region) || '',
|
|
228
|
+
billing_address_country: ((_this$userProfile5 = this.userProfile) === null || _this$userProfile5 === void 0 ? void 0 : _this$userProfile5.country) || ''
|
|
229
|
+
};
|
|
230
|
+
dispatch(startWidgetLoading());
|
|
231
|
+
|
|
232
|
+
if (this.reservation.amount > 0) {
|
|
233
|
+
const {
|
|
234
|
+
id
|
|
235
|
+
} = token;
|
|
236
|
+
stripe.confirmCardPayment(this.reservation.payment_gateway_client_token, {
|
|
237
|
+
payment_method: {
|
|
238
|
+
card: {
|
|
239
|
+
token: id
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
}).then(result => {
|
|
243
|
+
if (result.error) {
|
|
244
|
+
// Reserve error.message in your UI.
|
|
245
|
+
external_sweetalert2_default().fire(result.error.message, "Please retry purchase.", "warning");
|
|
246
|
+
this.dispatch(changeStep(1));
|
|
247
|
+
this.dispatch(removeReservedTicket());
|
|
248
|
+
this.dispatch(stopWidgetLoading());
|
|
249
|
+
} else {
|
|
250
|
+
return (0,actions_namespaceObject.putRequest)(null, (0,actions_namespaceObject.createAction)(PAY_RESERVATION), `${this.apiBaseUrl}/api/v1/summits/${this.summitId}/orders/${this.reservation.hash}/checkout`, normalizedEntity, errorHandler // entity
|
|
251
|
+
)(params)(this.dispatch).then(payload => {
|
|
252
|
+
this.dispatch(stopWidgetLoading());
|
|
253
|
+
this.dispatch((0,actions_namespaceObject.createAction)(CLEAR_RESERVATION)({}));
|
|
254
|
+
this.dispatch(changeStep(3));
|
|
255
|
+
return payload;
|
|
256
|
+
}).catch(e => {
|
|
257
|
+
this.dispatch(stopWidgetLoading());
|
|
258
|
+
return e;
|
|
259
|
+
}); // The payment has succeeded. Display a success message.
|
|
260
|
+
}
|
|
261
|
+
}).catch(e => {
|
|
262
|
+
this.dispatch(removeReservedTicket());
|
|
263
|
+
this.dispatch(changeStep(1));
|
|
264
|
+
this.dispatch(stopWidgetLoading());
|
|
265
|
+
return e;
|
|
266
|
+
});
|
|
267
|
+
} else {
|
|
268
|
+
// FREE TICKET
|
|
269
|
+
return (0,actions_namespaceObject.putRequest)(null, (0,actions_namespaceObject.createAction)(PAY_RESERVATION), `${this.apiBaseUrl}/api/v1/summits/${this.summitId}/orders/${this.reservation.hash}/checkout`, normalizedEntity, errorHandler // entity
|
|
270
|
+
)(params)(this.dispatch).then(payload => {
|
|
271
|
+
this.dispatch(stopWidgetLoading());
|
|
272
|
+
this.dispatch((0,actions_namespaceObject.createAction)(CLEAR_RESERVATION)({}));
|
|
273
|
+
this.dispatch(changeStep(3));
|
|
274
|
+
return payload;
|
|
275
|
+
}).catch(e => {
|
|
276
|
+
this.dispatch(removeReservedTicket());
|
|
277
|
+
this.dispatch(changeStep(1));
|
|
278
|
+
this.dispatch(stopWidgetLoading());
|
|
279
|
+
return e;
|
|
280
|
+
}); // The payment has succeeded. Display a success message.
|
|
281
|
+
}
|
|
282
|
+
});
|
|
283
|
+
|
|
284
|
+
this.reservation = reservation;
|
|
285
|
+
this.summitId = summitId;
|
|
286
|
+
this.userProfile = userProfile;
|
|
287
|
+
this.access_token = access_token;
|
|
288
|
+
this.apiBaseUrl = apiBaseUrl;
|
|
289
|
+
this.dispatch = _dispatch;
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
}
|
|
293
|
+
;// CONCATENATED MODULE: ./src/utils/payment-providers/payment-provider-factory.js
|
|
88
294
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
89
295
|
|
|
90
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) {
|
|
296
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { payment_provider_factory_defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
297
|
+
|
|
298
|
+
function payment_provider_factory_defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
91
299
|
|
|
92
|
-
|
|
300
|
+
|
|
301
|
+
|
|
302
|
+
class PaymentProviderFactory {}
|
|
303
|
+
|
|
304
|
+
payment_provider_factory_defineProperty(PaymentProviderFactory, "build", (provider, params = {}) => {
|
|
305
|
+
let currentProvider = null;
|
|
306
|
+
|
|
307
|
+
switch (provider) {
|
|
308
|
+
case 'LawPay':
|
|
309
|
+
{
|
|
310
|
+
currentProvider = new LawPayProvider(_objectSpread({}, params));
|
|
311
|
+
break;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
case 'Stripe':
|
|
315
|
+
{
|
|
316
|
+
currentProvider = new StripeProvider(_objectSpread({}, params));
|
|
317
|
+
break;
|
|
318
|
+
}
|
|
319
|
+
}
|
|
320
|
+
|
|
321
|
+
return currentProvider;
|
|
322
|
+
});
|
|
323
|
+
;// CONCATENATED MODULE: ./src/actions.js
|
|
324
|
+
function actions_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
325
|
+
|
|
326
|
+
function actions_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? actions_ownKeys(Object(source), !0).forEach(function (key) { actions_defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : actions_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
327
|
+
|
|
328
|
+
function actions_defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
93
329
|
|
|
94
330
|
/**
|
|
95
331
|
* Copyright 2020 OpenStack Foundation
|
|
@@ -106,6 +342,7 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
106
342
|
|
|
107
343
|
|
|
108
344
|
|
|
345
|
+
|
|
109
346
|
const START_WIDGET_LOADING = 'START_WIDGET_LOADING';
|
|
110
347
|
const STOP_WIDGET_LOADING = 'STOP_WIDGET_LOADING';
|
|
111
348
|
const LOAD_INITIAL_VARS = 'LOAD_INITIAL_VARS';
|
|
@@ -220,6 +457,19 @@ const reserveTicket = ({
|
|
|
220
457
|
|
|
221
458
|
const errorHandler = (err, res) => (dispatch, state) => {
|
|
222
459
|
if (res && res.statusCode === 412 && onError) return onError(err, res);
|
|
460
|
+
|
|
461
|
+
if (res && res.statusCode === 404) {
|
|
462
|
+
const msg = res.body.message;
|
|
463
|
+
external_sweetalert2_default().fire("Validation Error", msg, "warning");
|
|
464
|
+
return;
|
|
465
|
+
}
|
|
466
|
+
|
|
467
|
+
if (res && res.statusCode === 500) {
|
|
468
|
+
const msg = res.body.message;
|
|
469
|
+
external_sweetalert2_default().fire("Server Error", msg, "error");
|
|
470
|
+
return;
|
|
471
|
+
}
|
|
472
|
+
|
|
223
473
|
return (0,actions_namespaceObject.authErrorHandler)(err, res);
|
|
224
474
|
};
|
|
225
475
|
|
|
@@ -228,7 +478,7 @@ const reserveTicket = ({
|
|
|
228
478
|
dispatch(stopWidgetLoading());
|
|
229
479
|
payload.response.promo_code = promoCode || null;
|
|
230
480
|
|
|
231
|
-
if (!payload.response.
|
|
481
|
+
if (!payload.response.amount) {
|
|
232
482
|
dispatch(payTicket(null, null, getAccessToken));
|
|
233
483
|
return payload;
|
|
234
484
|
} else {
|
|
@@ -273,7 +523,7 @@ const removeReservedTicket = () => async (dispatch, getState, {
|
|
|
273
523
|
return e;
|
|
274
524
|
});
|
|
275
525
|
};
|
|
276
|
-
const
|
|
526
|
+
const payTicketWithProvider = (provider, params = {}) => async (dispatch, getState, {
|
|
277
527
|
apiBaseUrl,
|
|
278
528
|
getAccessToken
|
|
279
529
|
}) => {
|
|
@@ -287,70 +537,16 @@ const payTicket = (token = null, stripe = null, zipCode = null) => async (dispat
|
|
|
287
537
|
}
|
|
288
538
|
} = getState();
|
|
289
539
|
const access_token = await getAccessToken();
|
|
290
|
-
let params = {
|
|
291
|
-
access_token,
|
|
292
|
-
expand: 'tickets,' + 'tickets.owner,' + 'tickets.owner.extra_questions,' + 'tickets.badge,' + 'tickets.badge.type,' + 'tickets.badge.type.access_levels,' + 'tickets.badge.type.features,' + 'tickets.ticket_type,' + 'tickets.ticket_type.taxes'
|
|
293
|
-
};
|
|
294
|
-
let normalizedEntity = {
|
|
295
|
-
billing_address_1: (userProfile === null || userProfile === void 0 ? void 0 : userProfile.address1) || '',
|
|
296
|
-
billing_address_2: (userProfile === null || userProfile === void 0 ? void 0 : userProfile.address2) || '',
|
|
297
|
-
billing_address_zip_code: zipCode,
|
|
298
|
-
billing_address_city: (userProfile === null || userProfile === void 0 ? void 0 : userProfile.locality) || '',
|
|
299
|
-
billing_address_state: (userProfile === null || userProfile === void 0 ? void 0 : userProfile.region) || '',
|
|
300
|
-
billing_address_country: (userProfile === null || userProfile === void 0 ? void 0 : userProfile.country) || ''
|
|
301
|
-
};
|
|
302
540
|
dispatch(startWidgetLoading());
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
}
|
|
313
|
-
}
|
|
314
|
-
}).then(result => {
|
|
315
|
-
if (result.error) {
|
|
316
|
-
// Reserve error.message in your UI.
|
|
317
|
-
external_sweetalert2_default().fire(result.error.message, "Please retry purchase.", "warning");
|
|
318
|
-
dispatch(changeStep(1));
|
|
319
|
-
dispatch(removeReservedTicket());
|
|
320
|
-
dispatch(stopWidgetLoading());
|
|
321
|
-
} else {
|
|
322
|
-
return (0,actions_namespaceObject.putRequest)(null, (0,actions_namespaceObject.createAction)(PAY_RESERVATION), `${apiBaseUrl}/api/v1/summits/${summitId}/orders/${reservation.hash}/checkout`, normalizedEntity, actions_namespaceObject.authErrorHandler // entity
|
|
323
|
-
)(params)(dispatch).then(payload => {
|
|
324
|
-
dispatch(stopWidgetLoading());
|
|
325
|
-
dispatch((0,actions_namespaceObject.createAction)(CLEAR_RESERVATION)({}));
|
|
326
|
-
dispatch(changeStep(3));
|
|
327
|
-
return payload;
|
|
328
|
-
}).catch(e => {
|
|
329
|
-
dispatch(stopWidgetLoading());
|
|
330
|
-
return e;
|
|
331
|
-
}); // The payment has succeeded. Display a success message.
|
|
332
|
-
}
|
|
333
|
-
}).catch(e => {
|
|
334
|
-
dispatch(removeReservedTicket());
|
|
335
|
-
dispatch(changeStep(1));
|
|
336
|
-
dispatch(stopWidgetLoading());
|
|
337
|
-
return e;
|
|
338
|
-
});
|
|
339
|
-
} else {
|
|
340
|
-
// FREE TICKET
|
|
341
|
-
return (0,actions_namespaceObject.putRequest)(null, (0,actions_namespaceObject.createAction)(PAY_RESERVATION), `${apiBaseUrl}/api/v1/summits/${summitId}/orders/${reservation.hash}/checkout`, normalizedEntity, actions_namespaceObject.authErrorHandler // entity
|
|
342
|
-
)(params)(dispatch).then(payload => {
|
|
343
|
-
dispatch(stopWidgetLoading());
|
|
344
|
-
dispatch((0,actions_namespaceObject.createAction)(CLEAR_RESERVATION)({}));
|
|
345
|
-
dispatch(changeStep(3));
|
|
346
|
-
return payload;
|
|
347
|
-
}).catch(e => {
|
|
348
|
-
dispatch(removeReservedTicket());
|
|
349
|
-
dispatch(changeStep(1));
|
|
350
|
-
dispatch(stopWidgetLoading());
|
|
351
|
-
return e;
|
|
352
|
-
}); // The payment has succeeded. Display a success message.
|
|
353
|
-
}
|
|
541
|
+
const currentProvider = PaymentProviderFactory.build(provider, {
|
|
542
|
+
reservation,
|
|
543
|
+
summitId,
|
|
544
|
+
userProfile,
|
|
545
|
+
access_token,
|
|
546
|
+
apiBaseUrl,
|
|
547
|
+
dispatch
|
|
548
|
+
});
|
|
549
|
+
return dispatch(currentProvider.payTicket(actions_objectSpread({}, params)));
|
|
354
550
|
};
|
|
355
551
|
const changeStep = step => (dispatch, getState) => {
|
|
356
552
|
dispatch(startWidgetLoading());
|
|
@@ -404,7 +600,7 @@ const isInPersonTicketType = ticketType => {
|
|
|
404
600
|
};
|
|
405
601
|
|
|
406
602
|
const normalizeReservation = entity => {
|
|
407
|
-
const normalizedEntity =
|
|
603
|
+
const normalizedEntity = actions_objectSpread({}, entity);
|
|
408
604
|
|
|
409
605
|
if (!entity.owner_company.id) {
|
|
410
606
|
normalizedEntity['owner_company'] = entity.owner_company.name;
|
|
@@ -658,11 +854,9 @@ const external_react_use_namespaceObject = require("react-use");
|
|
|
658
854
|
;// CONCATENATED MODULE: external "openstack-uicore-foundation/lib/components/ajaxloader"
|
|
659
855
|
const ajaxloader_namespaceObject = require("openstack-uicore-foundation/lib/components/ajaxloader");
|
|
660
856
|
var ajaxloader_default = /*#__PURE__*/__webpack_require__.n(ajaxloader_namespaceObject);
|
|
661
|
-
;// CONCATENATED MODULE: external "@stripe/stripe-js"
|
|
662
|
-
const stripe_js_namespaceObject = require("@stripe/stripe-js");
|
|
663
857
|
;// CONCATENATED MODULE: ./src/styles/general.module.scss
|
|
664
858
|
// extracted by mini-css-extract-plugin
|
|
665
|
-
/* harmony default export */ const general_module = ({"outerWrapper":"outerWrapper___OWXyi","innerWrapper":"innerWrapper___mIrBF","title":"title___Tbvkl"});
|
|
859
|
+
/* harmony default export */ const general_module = ({"modal":"modal___G3Cmq","outerWrapper":"outerWrapper___OWXyi","innerWrapper":"innerWrapper___mIrBF","title":"title___Tbvkl"});
|
|
666
860
|
;// CONCATENATED MODULE: ./src/components/login/index.module.scss
|
|
667
861
|
// extracted by mini-css-extract-plugin
|
|
668
862
|
/* harmony default export */ const index_module = ({"loginWrapper":"loginWrapper___sxUEn","innerWrapper":"innerWrapper___GQRkq","button":"button___QMZPu","loginCode":"loginCode___dDBup","input":"input___QR9sA"});
|
|
@@ -773,11 +967,292 @@ const LoginComponent = ({
|
|
|
773
967
|
/* harmony default export */ const login = (LoginComponent);
|
|
774
968
|
;// CONCATENATED MODULE: external "prop-types"
|
|
775
969
|
const external_prop_types_namespaceObject = require("prop-types");
|
|
776
|
-
;// CONCATENATED MODULE: external "@stripe/react-stripe-js"
|
|
777
|
-
const react_stripe_js_namespaceObject = require("@stripe/react-stripe-js");
|
|
778
970
|
;// CONCATENATED MODULE: ./src/components/payment/index.module.scss
|
|
779
971
|
// extracted by mini-css-extract-plugin
|
|
780
972
|
/* harmony default export */ const payment_index_module = ({"title":"title___LksVm","form":"form___v5GIx","fieldWrapper":"fieldWrapper___Eoe61"});
|
|
973
|
+
;// CONCATENATED MODULE: external "openstack-uicore-foundation/lib/components"
|
|
974
|
+
const components_namespaceObject = require("openstack-uicore-foundation/lib/components");
|
|
975
|
+
;// CONCATENATED MODULE: external "openstack-uicore-foundation/lib/utils/methods"
|
|
976
|
+
const methods_namespaceObject = require("openstack-uicore-foundation/lib/utils/methods");
|
|
977
|
+
;// CONCATENATED MODULE: ./src/components/lawpay-form/index.module.scss
|
|
978
|
+
// extracted by mini-css-extract-plugin
|
|
979
|
+
/* harmony default export */ const lawpay_form_index_module = ({"form":"form___zXb7s","fieldWrapper":"fieldWrapper___G4Wqw","inputWrapper":"inputWrapper___Yz5zB","fieldRow":"fieldRow___NfZdJ","lawpayWrapper":"lawpayWrapper___hpUBf","dateWrapper":"dateWrapper___XDfqs","dropdown":"dropdown___l3_bk","fieldError":"fieldError___Igq3U"});
|
|
980
|
+
;// CONCATENATED MODULE: ./src/components/lawpay-form/index.js
|
|
981
|
+
function lawpay_form_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
982
|
+
|
|
983
|
+
function lawpay_form_objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? lawpay_form_ownKeys(Object(source), !0).forEach(function (key) { lawpay_form_defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : lawpay_form_ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
984
|
+
|
|
985
|
+
function lawpay_form_defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
986
|
+
|
|
987
|
+
/**
|
|
988
|
+
* Copyright 2022 OpenStack Foundation
|
|
989
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
990
|
+
* you may not use this file except in compliance with the License.
|
|
991
|
+
* You may obtain a copy of the License at
|
|
992
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
993
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
994
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
995
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
996
|
+
* See the License for the specific language governing permissions and
|
|
997
|
+
* limitations under the License.
|
|
998
|
+
**/
|
|
999
|
+
|
|
1000
|
+
|
|
1001
|
+
|
|
1002
|
+
|
|
1003
|
+
|
|
1004
|
+
|
|
1005
|
+
|
|
1006
|
+
const LawPayForm = ({
|
|
1007
|
+
reservation,
|
|
1008
|
+
payTicket,
|
|
1009
|
+
userProfile,
|
|
1010
|
+
marketingData,
|
|
1011
|
+
providerKey,
|
|
1012
|
+
provider,
|
|
1013
|
+
timestamp
|
|
1014
|
+
}) => {
|
|
1015
|
+
const [hostedFields, setHostedFields] = (0,external_react_namespaceObject.useState)(null);
|
|
1016
|
+
const [lawPayFields, setLawPayFields] = (0,external_react_namespaceObject.useState)({
|
|
1017
|
+
exp_month: '',
|
|
1018
|
+
exp_year: '',
|
|
1019
|
+
postal_code: userProfile.postal_code || '',
|
|
1020
|
+
address1: userProfile.address1 || '',
|
|
1021
|
+
email: userProfile.email,
|
|
1022
|
+
name: `${userProfile.given_name} ${userProfile.family_name}`
|
|
1023
|
+
});
|
|
1024
|
+
const [lawPayErrors, setLawPayErrors] = (0,external_react_namespaceObject.useState)({
|
|
1025
|
+
exp_month: '',
|
|
1026
|
+
exp_year: '',
|
|
1027
|
+
postal_code: '',
|
|
1028
|
+
credit_card_number: '',
|
|
1029
|
+
cvv: '',
|
|
1030
|
+
address1: ''
|
|
1031
|
+
});
|
|
1032
|
+
const style = {
|
|
1033
|
+
color: marketingData.color_text_dark,
|
|
1034
|
+
fontSize: '16px',
|
|
1035
|
+
fontFamily: 'inherit',
|
|
1036
|
+
backgroundColor: '#ffffff',
|
|
1037
|
+
'::placeholder': {
|
|
1038
|
+
color: marketingData.color_text_input_hints
|
|
1039
|
+
}
|
|
1040
|
+
};
|
|
1041
|
+
const hostedFieldsConfiguration = {
|
|
1042
|
+
publicKey: `${providerKey}`,
|
|
1043
|
+
fields: [{
|
|
1044
|
+
selector: "#my_credit_card_field_id",
|
|
1045
|
+
input: {
|
|
1046
|
+
type: "credit_card_number",
|
|
1047
|
+
placeholder: "Credit Card Number",
|
|
1048
|
+
css: style
|
|
1049
|
+
}
|
|
1050
|
+
}, {
|
|
1051
|
+
selector: "#my_cvv_field_id",
|
|
1052
|
+
input: {
|
|
1053
|
+
type: "cvv",
|
|
1054
|
+
placeholder: "CCV",
|
|
1055
|
+
css: style
|
|
1056
|
+
}
|
|
1057
|
+
}]
|
|
1058
|
+
};
|
|
1059
|
+
|
|
1060
|
+
const hostedFieldsCallBack = state => {
|
|
1061
|
+
let fieldErrors = {};
|
|
1062
|
+
state.fields.map(f => {
|
|
1063
|
+
fieldErrors = lawpay_form_objectSpread(lawpay_form_objectSpread({}, fieldErrors), {}, {
|
|
1064
|
+
[f.type]: f.error
|
|
1065
|
+
});
|
|
1066
|
+
});
|
|
1067
|
+
setLawPayErrors(lawpay_form_objectSpread(lawpay_form_objectSpread({}, lawPayErrors), fieldErrors));
|
|
1068
|
+
};
|
|
1069
|
+
|
|
1070
|
+
(0,external_react_namespaceObject.useEffect)(() => {
|
|
1071
|
+
if (window.AffiniPay && hostedFields === null) {
|
|
1072
|
+
setHostedFields(window.AffiniPay.HostedFields.initializeFields(hostedFieldsConfiguration, hostedFieldsCallBack));
|
|
1073
|
+
}
|
|
1074
|
+
}, [reservation]);
|
|
1075
|
+
|
|
1076
|
+
const onExpireChange = ev => {
|
|
1077
|
+
setLawPayFields(lawpay_form_objectSpread(lawpay_form_objectSpread({}, lawPayFields), {}, {
|
|
1078
|
+
[ev.target.id]: ev.target.value
|
|
1079
|
+
}));
|
|
1080
|
+
};
|
|
1081
|
+
|
|
1082
|
+
const formHasErrors = () => {
|
|
1083
|
+
let errors = {};
|
|
1084
|
+
Object.keys(lawPayFields).map(key => {
|
|
1085
|
+
if (!lawPayFields[key]) {
|
|
1086
|
+
errors = lawpay_form_objectSpread(lawpay_form_objectSpread({}, errors), {}, {
|
|
1087
|
+
[key]: 'This field is required.'
|
|
1088
|
+
});
|
|
1089
|
+
}
|
|
1090
|
+
});
|
|
1091
|
+
setLawPayErrors(lawpay_form_objectSpread(lawpay_form_objectSpread({}, lawPayErrors), errors));
|
|
1092
|
+
return Object.keys(errors).length > 0;
|
|
1093
|
+
};
|
|
1094
|
+
|
|
1095
|
+
const onSubmit = async event => {
|
|
1096
|
+
event.preventDefault();
|
|
1097
|
+
|
|
1098
|
+
if (!hostedFields) {
|
|
1099
|
+
// Affinity Pay has not loaded yet. Make sure to disable
|
|
1100
|
+
// form submission until Affinity Pay has loaded.
|
|
1101
|
+
return;
|
|
1102
|
+
}
|
|
1103
|
+
|
|
1104
|
+
if (!formHasErrors()) {
|
|
1105
|
+
try {
|
|
1106
|
+
const token = await hostedFields.getPaymentToken({
|
|
1107
|
+
"postal_code": lawPayFields.postal_code,
|
|
1108
|
+
"address1": lawPayFields.address1,
|
|
1109
|
+
"exp_year": lawPayFields.exp_year,
|
|
1110
|
+
"exp_month": lawPayFields.exp_month,
|
|
1111
|
+
"email": lawPayFields.email,
|
|
1112
|
+
"name": lawPayFields.name,
|
|
1113
|
+
"reference": `summit_${reservation.summit_id}_order_${reservation.id}`
|
|
1114
|
+
});
|
|
1115
|
+
payTicket(provider, {
|
|
1116
|
+
token
|
|
1117
|
+
});
|
|
1118
|
+
} catch (error) {
|
|
1119
|
+
external_sweetalert2_default().fire("Payment error", error.message, "warning");
|
|
1120
|
+
}
|
|
1121
|
+
}
|
|
1122
|
+
};
|
|
1123
|
+
|
|
1124
|
+
const ddl_month = [{
|
|
1125
|
+
label: '1 - January',
|
|
1126
|
+
value: '01'
|
|
1127
|
+
}, {
|
|
1128
|
+
label: '2 - February',
|
|
1129
|
+
value: '02'
|
|
1130
|
+
}, {
|
|
1131
|
+
label: '3 - March',
|
|
1132
|
+
value: '03'
|
|
1133
|
+
}, {
|
|
1134
|
+
label: '4 - April',
|
|
1135
|
+
value: '04'
|
|
1136
|
+
}, {
|
|
1137
|
+
label: '5 - May',
|
|
1138
|
+
value: '05'
|
|
1139
|
+
}, {
|
|
1140
|
+
label: '6 - June',
|
|
1141
|
+
value: '06'
|
|
1142
|
+
}, {
|
|
1143
|
+
label: '7 - July',
|
|
1144
|
+
value: '07'
|
|
1145
|
+
}, {
|
|
1146
|
+
label: '8 - August',
|
|
1147
|
+
value: '08'
|
|
1148
|
+
}, {
|
|
1149
|
+
label: '9 - September',
|
|
1150
|
+
value: '09'
|
|
1151
|
+
}, {
|
|
1152
|
+
label: '10 - October',
|
|
1153
|
+
value: '10'
|
|
1154
|
+
}, {
|
|
1155
|
+
label: '11 - November',
|
|
1156
|
+
value: '11'
|
|
1157
|
+
}, {
|
|
1158
|
+
label: '12 - December',
|
|
1159
|
+
value: '12'
|
|
1160
|
+
}];
|
|
1161
|
+
const current_year = (0,methods_namespaceObject.epochToMomentTimeZone)(timestamp, 'utc').year();
|
|
1162
|
+
const year_ddl = Array.from({
|
|
1163
|
+
length: 15
|
|
1164
|
+
}, (_, i) => {
|
|
1165
|
+
return {
|
|
1166
|
+
label: `${current_year + i}`,
|
|
1167
|
+
value: `${current_year + i}`
|
|
1168
|
+
};
|
|
1169
|
+
});
|
|
1170
|
+
return /*#__PURE__*/external_react_default().createElement("form", {
|
|
1171
|
+
className: lawpay_form_index_module.form,
|
|
1172
|
+
id: "payment-form",
|
|
1173
|
+
onSubmit: onSubmit
|
|
1174
|
+
}, /*#__PURE__*/external_react_default().createElement("div", {
|
|
1175
|
+
className: lawpay_form_index_module.fieldWrapper
|
|
1176
|
+
}, /*#__PURE__*/external_react_default().createElement("div", {
|
|
1177
|
+
className: lawpay_form_index_module.inputWrapper
|
|
1178
|
+
}, /*#__PURE__*/external_react_default().createElement("div", {
|
|
1179
|
+
id: "my_credit_card_field_id",
|
|
1180
|
+
className: lawpay_form_index_module.lawpayWrapper
|
|
1181
|
+
}), /*#__PURE__*/external_react_default().createElement("i", {
|
|
1182
|
+
className: "fa fa-credit-card"
|
|
1183
|
+
})), lawPayErrors.credit_card_number && /*#__PURE__*/external_react_default().createElement("div", {
|
|
1184
|
+
className: lawpay_form_index_module.fieldError
|
|
1185
|
+
}, lawPayErrors.credit_card_number)), /*#__PURE__*/external_react_default().createElement("div", {
|
|
1186
|
+
className: lawpay_form_index_module.fieldWrapper
|
|
1187
|
+
}, /*#__PURE__*/external_react_default().createElement("div", {
|
|
1188
|
+
className: lawpay_form_index_module.dateWrapper
|
|
1189
|
+
}, /*#__PURE__*/external_react_default().createElement("div", null, /*#__PURE__*/external_react_default().createElement(components_namespaceObject.Dropdown, {
|
|
1190
|
+
className: lawpay_form_index_module.dropdown,
|
|
1191
|
+
placeholder: "Month",
|
|
1192
|
+
onChange: onExpireChange,
|
|
1193
|
+
id: "exp_month",
|
|
1194
|
+
options: ddl_month
|
|
1195
|
+
}), lawPayErrors.exp_month && /*#__PURE__*/external_react_default().createElement("div", {
|
|
1196
|
+
className: lawpay_form_index_module.fieldError
|
|
1197
|
+
}, lawPayErrors.exp_month)), /*#__PURE__*/external_react_default().createElement("div", null, /*#__PURE__*/external_react_default().createElement(components_namespaceObject.Dropdown, {
|
|
1198
|
+
className: lawpay_form_index_module.dropdown,
|
|
1199
|
+
placeholder: "Year",
|
|
1200
|
+
onChange: onExpireChange,
|
|
1201
|
+
id: "exp_year",
|
|
1202
|
+
options: year_ddl
|
|
1203
|
+
}), lawPayErrors.exp_year && /*#__PURE__*/external_react_default().createElement("div", {
|
|
1204
|
+
className: lawpay_form_index_module.fieldError
|
|
1205
|
+
}, lawPayErrors.exp_year)))), /*#__PURE__*/external_react_default().createElement("div", {
|
|
1206
|
+
className: lawpay_form_index_module.fieldWrapper
|
|
1207
|
+
}, /*#__PURE__*/external_react_default().createElement("div", {
|
|
1208
|
+
className: lawpay_form_index_module.fieldRow
|
|
1209
|
+
}, /*#__PURE__*/external_react_default().createElement("div", {
|
|
1210
|
+
className: lawpay_form_index_module.inputWrapper
|
|
1211
|
+
}, /*#__PURE__*/external_react_default().createElement("div", {
|
|
1212
|
+
id: "my_cvv_field_id",
|
|
1213
|
+
className: lawpay_form_index_module.lawpayWrapper
|
|
1214
|
+
})), /*#__PURE__*/external_react_default().createElement("div", {
|
|
1215
|
+
className: lawpay_form_index_module.inputWrapper
|
|
1216
|
+
}, /*#__PURE__*/external_react_default().createElement("input", {
|
|
1217
|
+
type: "text",
|
|
1218
|
+
name: "postal_code",
|
|
1219
|
+
placeholder: "ZIP Code *",
|
|
1220
|
+
onChange: e => setLawPayFields(lawpay_form_objectSpread(lawpay_form_objectSpread({}, lawPayFields), {}, {
|
|
1221
|
+
postal_code: e.target.value
|
|
1222
|
+
}))
|
|
1223
|
+
}))), /*#__PURE__*/external_react_default().createElement("div", {
|
|
1224
|
+
className: lawpay_form_index_module.fieldRow
|
|
1225
|
+
}, lawPayErrors.cvv && /*#__PURE__*/external_react_default().createElement("div", {
|
|
1226
|
+
className: lawpay_form_index_module.fieldError
|
|
1227
|
+
}, lawPayErrors.cvv), lawPayErrors.postal_code && /*#__PURE__*/external_react_default().createElement("div", {
|
|
1228
|
+
className: lawpay_form_index_module.fieldError
|
|
1229
|
+
}, lawPayErrors.postal_code))), /*#__PURE__*/external_react_default().createElement("div", {
|
|
1230
|
+
className: lawpay_form_index_module.fieldWrapper
|
|
1231
|
+
}, /*#__PURE__*/external_react_default().createElement("div", {
|
|
1232
|
+
className: lawpay_form_index_module.inputWrapper
|
|
1233
|
+
}, /*#__PURE__*/external_react_default().createElement("input", {
|
|
1234
|
+
type: "text",
|
|
1235
|
+
name: "address1",
|
|
1236
|
+
placeholder: "Address *",
|
|
1237
|
+
onChange: e => setLawPayFields(lawpay_form_objectSpread(lawpay_form_objectSpread({}, lawPayFields), {}, {
|
|
1238
|
+
address1: e.target.value
|
|
1239
|
+
}))
|
|
1240
|
+
})), lawPayErrors.address1 && /*#__PURE__*/external_react_default().createElement("div", {
|
|
1241
|
+
className: lawpay_form_index_module.fieldError
|
|
1242
|
+
}, lawPayErrors.address1)));
|
|
1243
|
+
};
|
|
1244
|
+
|
|
1245
|
+
const mapStateToProps = ({
|
|
1246
|
+
registrationLiteState
|
|
1247
|
+
}) => ({
|
|
1248
|
+
marketingData: registrationLiteState.settings.marketingData
|
|
1249
|
+
});
|
|
1250
|
+
|
|
1251
|
+
/* harmony default export */ const lawpay_form = ((0,external_react_redux_namespaceObject.connect)(mapStateToProps, null)(LawPayForm));
|
|
1252
|
+
;// CONCATENATED MODULE: external "@stripe/stripe-js"
|
|
1253
|
+
const stripe_js_namespaceObject = require("@stripe/stripe-js");
|
|
1254
|
+
;// CONCATENATED MODULE: external "@stripe/react-stripe-js"
|
|
1255
|
+
const react_stripe_js_namespaceObject = require("@stripe/react-stripe-js");
|
|
781
1256
|
;// CONCATENATED MODULE: external "react-hook-form"
|
|
782
1257
|
const external_react_hook_form_namespaceObject = require("react-hook-form");
|
|
783
1258
|
;// CONCATENATED MODULE: external "lodash/merge"
|
|
@@ -852,7 +1327,8 @@ const StripeForm = ({
|
|
|
852
1327
|
payTicket,
|
|
853
1328
|
userProfile,
|
|
854
1329
|
marketingData,
|
|
855
|
-
stripeOptions
|
|
1330
|
+
stripeOptions,
|
|
1331
|
+
provider
|
|
856
1332
|
}) => {
|
|
857
1333
|
const stripe = (0,react_stripe_js_namespaceObject.useStripe)();
|
|
858
1334
|
const elements = (0,react_stripe_js_namespaceObject.useElements)();
|
|
@@ -903,7 +1379,11 @@ const StripeForm = ({
|
|
|
903
1379
|
});
|
|
904
1380
|
|
|
905
1381
|
if (token) {
|
|
906
|
-
payTicket(
|
|
1382
|
+
payTicket(provider, {
|
|
1383
|
+
token,
|
|
1384
|
+
stripe,
|
|
1385
|
+
zipCode: data.zipCode
|
|
1386
|
+
});
|
|
907
1387
|
} else if (error) {
|
|
908
1388
|
if (stripeErrorCodeMap[error.code]) {
|
|
909
1389
|
setStripeErrors({
|
|
@@ -969,13 +1449,59 @@ const StripeForm = ({
|
|
|
969
1449
|
}, "This field is required.")));
|
|
970
1450
|
};
|
|
971
1451
|
|
|
972
|
-
const
|
|
1452
|
+
const stripe_form_mapStateToProps = ({
|
|
973
1453
|
registrationLiteState
|
|
974
1454
|
}) => ({
|
|
975
1455
|
marketingData: registrationLiteState.settings.marketingData
|
|
976
1456
|
});
|
|
977
1457
|
|
|
978
|
-
/* harmony default export */ const stripe_form = ((0,external_react_redux_namespaceObject.connect)(
|
|
1458
|
+
/* harmony default export */ const stripe_form = ((0,external_react_redux_namespaceObject.connect)(stripe_form_mapStateToProps, null)(StripeForm));
|
|
1459
|
+
;// CONCATENATED MODULE: ./src/components/stripe-component/index.js
|
|
1460
|
+
/**
|
|
1461
|
+
* Copyright 2020 OpenStack Foundation
|
|
1462
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
1463
|
+
* you may not use this file except in compliance with the License.
|
|
1464
|
+
* You may obtain a copy of the License at
|
|
1465
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
1466
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1467
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
1468
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1469
|
+
* See the License for the specific language governing permissions and
|
|
1470
|
+
* limitations under the License.
|
|
1471
|
+
**/
|
|
1472
|
+
|
|
1473
|
+
|
|
1474
|
+
|
|
1475
|
+
|
|
1476
|
+
|
|
1477
|
+
|
|
1478
|
+
const stripe_component_StripeProvider = ({
|
|
1479
|
+
userProfile,
|
|
1480
|
+
reservation,
|
|
1481
|
+
payTicket,
|
|
1482
|
+
providerKey,
|
|
1483
|
+
provider,
|
|
1484
|
+
stripeOptions
|
|
1485
|
+
}) => {
|
|
1486
|
+
const stripePromise = (0,external_react_namespaceObject.useMemo)(() => (0,stripe_js_namespaceObject.loadStripe)(providerKey), [providerKey]);
|
|
1487
|
+
const options = {
|
|
1488
|
+
fonts: stripeOptions === null || stripeOptions === void 0 ? void 0 : stripeOptions.fonts
|
|
1489
|
+
};
|
|
1490
|
+
return /*#__PURE__*/external_react_default().createElement(react_stripe_js_namespaceObject.Elements, {
|
|
1491
|
+
options: options,
|
|
1492
|
+
stripe: stripePromise
|
|
1493
|
+
}, /*#__PURE__*/external_react_default().createElement(stripe_form, {
|
|
1494
|
+
reservation: reservation,
|
|
1495
|
+
payTicket: payTicket,
|
|
1496
|
+
userProfile: userProfile,
|
|
1497
|
+
stripeOptions: stripeOptions,
|
|
1498
|
+
provider: provider
|
|
1499
|
+
}));
|
|
1500
|
+
};
|
|
1501
|
+
|
|
1502
|
+
/* harmony default export */ const stripe_component = (stripe_component_StripeProvider);
|
|
1503
|
+
;// CONCATENATED MODULE: external "react-helmet"
|
|
1504
|
+
const external_react_helmet_namespaceObject = require("react-helmet");
|
|
979
1505
|
;// CONCATENATED MODULE: ./src/components/payment/index.js
|
|
980
1506
|
function payment_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
981
1507
|
|
|
@@ -1003,13 +1529,16 @@ function payment_defineProperty(obj, key, value) { if (key in obj) { Object.defi
|
|
|
1003
1529
|
|
|
1004
1530
|
|
|
1005
1531
|
|
|
1532
|
+
|
|
1006
1533
|
const PaymentComponent = ({
|
|
1007
1534
|
isActive,
|
|
1008
1535
|
userProfile,
|
|
1009
1536
|
reservation,
|
|
1010
1537
|
payTicket,
|
|
1011
|
-
|
|
1012
|
-
|
|
1538
|
+
providerKey,
|
|
1539
|
+
provider,
|
|
1540
|
+
stripeOptions,
|
|
1541
|
+
timestamp
|
|
1013
1542
|
}) => {
|
|
1014
1543
|
const [ref, {
|
|
1015
1544
|
height
|
|
@@ -1028,9 +1557,6 @@ const PaymentComponent = ({
|
|
|
1028
1557
|
marginBottom: isActive ? 5 : 0
|
|
1029
1558
|
}
|
|
1030
1559
|
});
|
|
1031
|
-
const options = {
|
|
1032
|
-
fonts: stripeOptions === null || stripeOptions === void 0 ? void 0 : stripeOptions.fonts
|
|
1033
|
-
};
|
|
1034
1560
|
return /*#__PURE__*/external_react_default().createElement("div", {
|
|
1035
1561
|
className: `${payment_index_module.outerWrapper} step-wrapper`
|
|
1036
1562
|
}, /*#__PURE__*/external_react_default().createElement((external_react_default()).Fragment, null, /*#__PURE__*/external_react_default().createElement("div", {
|
|
@@ -1039,24 +1565,30 @@ const PaymentComponent = ({
|
|
|
1039
1565
|
className: payment_index_module.title
|
|
1040
1566
|
}, /*#__PURE__*/external_react_default().createElement("span", null, "Payment")), /*#__PURE__*/external_react_default().createElement(external_react_spring_namespaceObject.animated.div, {
|
|
1041
1567
|
style: payment_objectSpread({
|
|
1042
|
-
overflow: 'hidden'
|
|
1568
|
+
overflow: `${isActive ? '' : 'hidden'}`
|
|
1043
1569
|
}, toggleAnimation)
|
|
1044
1570
|
}, /*#__PURE__*/external_react_default().createElement("div", {
|
|
1045
1571
|
ref: ref
|
|
1046
|
-
}, /*#__PURE__*/external_react_default().createElement(
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
}, /*#__PURE__*/external_react_default().createElement(stripe_form, {
|
|
1572
|
+
}, provider === 'Stripe' && /*#__PURE__*/external_react_default().createElement(stripe_component, {
|
|
1573
|
+
provider: provider,
|
|
1574
|
+
providerKey: providerKey,
|
|
1050
1575
|
reservation: reservation,
|
|
1051
1576
|
payTicket: payTicket,
|
|
1052
1577
|
userProfile: userProfile,
|
|
1053
1578
|
stripeOptions: stripeOptions
|
|
1579
|
+
}), provider === 'LawPay' && /*#__PURE__*/external_react_default().createElement((external_react_default()).Fragment, null, /*#__PURE__*/external_react_default().createElement(external_react_helmet_namespaceObject.Helmet, null, /*#__PURE__*/external_react_default().createElement("script", {
|
|
1580
|
+
src: "https://cdn.affinipay.com/hostedfields/1.1.1/fieldGen_1.1.1.js"
|
|
1581
|
+
})), /*#__PURE__*/external_react_default().createElement(lawpay_form, {
|
|
1582
|
+
provider: provider,
|
|
1583
|
+
reservation: reservation,
|
|
1584
|
+
payTicket: payTicket,
|
|
1585
|
+
userProfile: userProfile,
|
|
1586
|
+
providerKey: providerKey,
|
|
1587
|
+
timestamp: timestamp
|
|
1054
1588
|
})))))));
|
|
1055
1589
|
};
|
|
1056
1590
|
|
|
1057
1591
|
/* harmony default export */ const payment = (PaymentComponent);
|
|
1058
|
-
;// CONCATENATED MODULE: external "openstack-uicore-foundation/lib/components"
|
|
1059
|
-
const components_namespaceObject = require("openstack-uicore-foundation/lib/components");
|
|
1060
1592
|
;// CONCATENATED MODULE: external "react-tooltip"
|
|
1061
1593
|
const external_react_tooltip_namespaceObject = require("react-tooltip");
|
|
1062
1594
|
var external_react_tooltip_default = /*#__PURE__*/__webpack_require__.n(external_react_tooltip_namespaceObject);
|
|
@@ -1101,7 +1633,6 @@ function personal_information_defineProperty(obj, key, value) { if (key in obj)
|
|
|
1101
1633
|
|
|
1102
1634
|
|
|
1103
1635
|
|
|
1104
|
-
|
|
1105
1636
|
const PersonalInfoComponent = ({
|
|
1106
1637
|
isActive,
|
|
1107
1638
|
changeForm,
|
|
@@ -1270,9 +1801,10 @@ const PersonalInfoComponent = ({
|
|
|
1270
1801
|
onChange: onCompanyChange,
|
|
1271
1802
|
onError: handleCompanyError,
|
|
1272
1803
|
value: personalInfo.company
|
|
1273
|
-
}), companyError && /*#__PURE__*/external_react_default().createElement("
|
|
1804
|
+
}), companyError && /*#__PURE__*/external_react_default().createElement("div", {
|
|
1805
|
+
className: personal_information_index_module.fieldError,
|
|
1274
1806
|
"data-testid": "company-error"
|
|
1275
|
-
}, "This field is required"))), /*#__PURE__*/external_react_default().createElement("div", {
|
|
1807
|
+
}, "This field is required."))), /*#__PURE__*/external_react_default().createElement("div", {
|
|
1276
1808
|
className: personal_information_index_module.fieldWrapper
|
|
1277
1809
|
}, /*#__PURE__*/external_react_default().createElement("div", {
|
|
1278
1810
|
className: personal_information_index_module.inputWrapper
|
|
@@ -1634,8 +2166,6 @@ const ButtonBarComponent = ({
|
|
|
1634
2166
|
;// CONCATENATED MODULE: ./src/components/purchase-complete/index.module.scss
|
|
1635
2167
|
// extracted by mini-css-extract-plugin
|
|
1636
2168
|
/* harmony default export */ const purchase_complete_index_module = ({"button":"button___XMN8a","wrapper":"wrapper___Jd5Xg","circle":"circle___lcN86","complete":"complete___HAHzl","actions":"actions___jJdPX","footer":"footer___FL9TW"});
|
|
1637
|
-
;// CONCATENATED MODULE: external "openstack-uicore-foundation/lib/utils/methods"
|
|
1638
|
-
const methods_namespaceObject = require("openstack-uicore-foundation/lib/utils/methods");
|
|
1639
2169
|
;// CONCATENATED MODULE: ./src/components/purchase-complete/index.js
|
|
1640
2170
|
/**
|
|
1641
2171
|
* Copyright 2020 OpenStack Foundation
|
|
@@ -1835,7 +2365,7 @@ const TicketOwnedComponent = ({
|
|
|
1835
2365
|
|
|
1836
2366
|
/* harmony default export */ const ticket_owned = (TicketOwnedComponent);
|
|
1837
2367
|
;// CONCATENATED MODULE: ./src/components/registration-lite.js
|
|
1838
|
-
const registration_lite_excluded = ["loadSession", "setMarketingSettings", "changeStep", "removeReservedTicket", "reserveTicket", "
|
|
2368
|
+
const registration_lite_excluded = ["loadSession", "setMarketingSettings", "changeStep", "removeReservedTicket", "reserveTicket", "payTicketWithProvider", "onPurchaseComplete", "getTicketTypes", "getTaxesTypes", "getLoginCode", "passwordlessLogin", "goToLogin", "loginOptions", "allowsNativeAuth", "allowsOtpAuth", "reservation", "checkout", "ticketTypes", "taxTypes", "step", "passwordlessCodeSent", "passwordlessEmail", "passwordlessCode", "getPasswordlessCode", "passwordlessCodeError", "loginWithCode", "goToExtraQuestions", "goToEvent", "goToRegistration", "profileData", "summitData", "supportEmail", "ticketOwned", "ownedTickets", "widgetLoading", "loading", "inPersonDisclaimer", "userProfile", "handleCompanyError", "stripeOptions"];
|
|
1839
2369
|
|
|
1840
2370
|
function registration_lite_ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
1841
2371
|
|
|
@@ -1876,7 +2406,6 @@ function registration_lite_objectWithoutPropertiesLoose(source, excluded) { if (
|
|
|
1876
2406
|
|
|
1877
2407
|
|
|
1878
2408
|
|
|
1879
|
-
|
|
1880
2409
|
const RegistrationLite = _ref => {
|
|
1881
2410
|
var _formValues$ticketTyp, _formValues$ticketTyp2;
|
|
1882
2411
|
|
|
@@ -1886,7 +2415,7 @@ const RegistrationLite = _ref => {
|
|
|
1886
2415
|
changeStep,
|
|
1887
2416
|
removeReservedTicket,
|
|
1888
2417
|
reserveTicket,
|
|
1889
|
-
|
|
2418
|
+
payTicketWithProvider,
|
|
1890
2419
|
onPurchaseComplete,
|
|
1891
2420
|
getTicketTypes,
|
|
1892
2421
|
getTaxesTypes,
|
|
@@ -1947,15 +2476,16 @@ const RegistrationLite = _ref => {
|
|
|
1947
2476
|
}));
|
|
1948
2477
|
|
|
1949
2478
|
let publicKey = null;
|
|
2479
|
+
let provider = '';
|
|
1950
2480
|
|
|
1951
2481
|
for (let profile of summitData.payment_profiles) {
|
|
1952
2482
|
if (profile.application_type === 'Registration') {
|
|
1953
2483
|
publicKey = profile.test_mode_enabled ? profile.test_publishable_key : profile.live_publishable_key;
|
|
2484
|
+
provider = profile.provider;
|
|
1954
2485
|
break;
|
|
1955
2486
|
}
|
|
1956
2487
|
}
|
|
1957
2488
|
|
|
1958
|
-
const stripePromise = (0,external_react_namespaceObject.useMemo)(() => (0,stripe_js_namespaceObject.loadStripe)(publicKey), [publicKey]);
|
|
1959
2489
|
(0,external_react_namespaceObject.useEffect)(() => {
|
|
1960
2490
|
loadSession(registration_lite_objectSpread(registration_lite_objectSpread({}, rest), {}, {
|
|
1961
2491
|
summitData,
|
|
@@ -2010,12 +2540,12 @@ const RegistrationLite = _ref => {
|
|
|
2010
2540
|
};
|
|
2011
2541
|
|
|
2012
2542
|
return /*#__PURE__*/external_react_default().createElement("div", {
|
|
2013
|
-
id:
|
|
2543
|
+
id: `${general_module.modal}`,
|
|
2014
2544
|
className: "modal is-active"
|
|
2015
2545
|
}, /*#__PURE__*/external_react_default().createElement("div", {
|
|
2016
2546
|
className: "modal-background"
|
|
2017
2547
|
}), /*#__PURE__*/external_react_default().createElement("div", {
|
|
2018
|
-
className:
|
|
2548
|
+
className: `${general_module.modal} modal-content`
|
|
2019
2549
|
}, /*#__PURE__*/external_react_default().createElement((ajaxloader_default()), {
|
|
2020
2550
|
relative: true,
|
|
2021
2551
|
color: '#ffffff',
|
|
@@ -2077,9 +2607,11 @@ const RegistrationLite = _ref => {
|
|
|
2077
2607
|
}, /*#__PURE__*/external_react_default().createElement(payment, {
|
|
2078
2608
|
isActive: step === 2,
|
|
2079
2609
|
reservation: reservation,
|
|
2080
|
-
payTicket:
|
|
2610
|
+
payTicket: payTicketWithProvider,
|
|
2081
2611
|
userProfile: profileData,
|
|
2082
|
-
|
|
2612
|
+
timestamp: summitData.timestamp,
|
|
2613
|
+
provider: provider,
|
|
2614
|
+
providerKey: publicKey,
|
|
2083
2615
|
stripeOptions: stripeOptions
|
|
2084
2616
|
})))), profileData && step === 3 && /*#__PURE__*/external_react_default().createElement(purchase_complete, {
|
|
2085
2617
|
checkout: checkout,
|
|
@@ -2118,7 +2650,7 @@ const registration_lite_mapStateToProps = ({
|
|
|
2118
2650
|
changeStep: changeStep,
|
|
2119
2651
|
reserveTicket: reserveTicket,
|
|
2120
2652
|
removeReservedTicket: removeReservedTicket,
|
|
2121
|
-
|
|
2653
|
+
payTicketWithProvider: payTicketWithProvider,
|
|
2122
2654
|
getTicketTypes: getTicketTypes,
|
|
2123
2655
|
getTaxesTypes: getTaxesTypes,
|
|
2124
2656
|
getLoginCode: getLoginCode,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "summit-registration-lite",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.16",
|
|
4
4
|
"description": "Summit Registration Lite",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -46,6 +46,7 @@
|
|
|
46
46
|
"crypto-js": "^4.1.1",
|
|
47
47
|
"css-loader": "^6.7.1",
|
|
48
48
|
"dotenv-webpack": "^7.1.0",
|
|
49
|
+
"dropzone": "^6.0.0-beta.2",
|
|
49
50
|
"file-loader": "^6.2.0",
|
|
50
51
|
"font-awesome": "4.7.0",
|
|
51
52
|
"history": "^4.7.2",
|
|
@@ -65,10 +66,14 @@
|
|
|
65
66
|
"react": "^16.8.4",
|
|
66
67
|
"react-bootstrap": "^0.33.1",
|
|
67
68
|
"react-datetime": "^2.15.0",
|
|
69
|
+
"react-dnd": "^16.0.1",
|
|
70
|
+
"react-dnd-html5-backend": "^16.0.1",
|
|
68
71
|
"react-dom": "^16.4.1",
|
|
72
|
+
"react-dropzone": "^14.2.1",
|
|
69
73
|
"react-redux": "^7.2.0",
|
|
70
74
|
"react-router": "^4.3.1",
|
|
71
75
|
"react-router-dom": "^4.3.1",
|
|
76
|
+
"react-rte": "^0.16.5",
|
|
72
77
|
"react-select": "^2.4.3",
|
|
73
78
|
"react-test-renderer": "^17.0.2",
|
|
74
79
|
"react-tooltip": "^3.11.6",
|
|
@@ -85,6 +90,7 @@
|
|
|
85
90
|
"timesync": "^1.0.5",
|
|
86
91
|
"urijs": "^1.19.1",
|
|
87
92
|
"url-loader": "^4.1.1",
|
|
93
|
+
"video.js": "^7.19.2",
|
|
88
94
|
"webpack": "^5.70.0",
|
|
89
95
|
"webpack-cli": "^4.9.2",
|
|
90
96
|
"webpack-dev-server": "^4.7.4",
|
|
@@ -122,6 +128,7 @@
|
|
|
122
128
|
"dependencies": {
|
|
123
129
|
"@stripe/react-stripe-js": "^1.4.1",
|
|
124
130
|
"@stripe/stripe-js": "^1.15.0",
|
|
131
|
+
"react-helmet": "^6.1.0",
|
|
125
132
|
"react-hook-form": "^7.6.7",
|
|
126
133
|
"react-otp-input": "^2.4.0",
|
|
127
134
|
"react-spring": "^9.1.2",
|