summit-registration-lite 2.0.12 → 2.0.15
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 +634 -106
- 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"});
|
|
@@ -713,7 +907,7 @@ const LoginComponent = ({
|
|
|
713
907
|
className: `${index_module.innerWrapper}`
|
|
714
908
|
}, /*#__PURE__*/external_react_default().createElement("div", {
|
|
715
909
|
className: index_module.loginCode
|
|
716
|
-
}, "Enter your email
|
|
910
|
+
}, "Enter your email to begin registration:", /*#__PURE__*/external_react_default().createElement("div", {
|
|
717
911
|
className: index_module.input
|
|
718
912
|
}, /*#__PURE__*/external_react_default().createElement("input", {
|
|
719
913
|
placeholder: "youremail@example.com",
|
|
@@ -726,7 +920,7 @@ const LoginComponent = ({
|
|
|
726
920
|
"data-testid": "email-button"
|
|
727
921
|
}, ">"), /*#__PURE__*/external_react_default().createElement("br", null)), emailError && /*#__PURE__*/external_react_default().createElement("span", {
|
|
728
922
|
"data-testid": "email-error"
|
|
729
|
-
}, "Please enter a valid email address")), /*#__PURE__*/external_react_default().createElement("span", null, "Or you may
|
|
923
|
+
}, "Please enter a valid email address")), /*#__PURE__*/external_react_default().createElement("span", null, "Or you may login with one of the following:"), options.map((o, index) => {
|
|
730
924
|
return o.provider_param ? /*#__PURE__*/external_react_default().createElement("div", {
|
|
731
925
|
className: `${index_module.button}`,
|
|
732
926
|
key: `provider-${o.provider_param}`,
|
|
@@ -773,11 +967,287 @@ 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 2020 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
|
+
});
|
|
1022
|
+
const [lawPayErrors, setLawPayErrors] = (0,external_react_namespaceObject.useState)({
|
|
1023
|
+
exp_month: '',
|
|
1024
|
+
exp_year: '',
|
|
1025
|
+
postal_code: '',
|
|
1026
|
+
credit_card_number: '',
|
|
1027
|
+
cvv: '',
|
|
1028
|
+
address1: ''
|
|
1029
|
+
});
|
|
1030
|
+
const style = {
|
|
1031
|
+
color: marketingData.color_text_dark,
|
|
1032
|
+
fontSize: '16px',
|
|
1033
|
+
fontFamily: 'inherit',
|
|
1034
|
+
backgroundColor: '#ffffff',
|
|
1035
|
+
'::placeholder': {
|
|
1036
|
+
color: marketingData.color_text_input_hints
|
|
1037
|
+
}
|
|
1038
|
+
};
|
|
1039
|
+
const hostedFieldsConfiguration = {
|
|
1040
|
+
publicKey: `${providerKey}`,
|
|
1041
|
+
fields: [{
|
|
1042
|
+
selector: "#my_credit_card_field_id",
|
|
1043
|
+
input: {
|
|
1044
|
+
type: "credit_card_number",
|
|
1045
|
+
placeholder: "Credit Card Number",
|
|
1046
|
+
css: style
|
|
1047
|
+
}
|
|
1048
|
+
}, {
|
|
1049
|
+
selector: "#my_cvv_field_id",
|
|
1050
|
+
input: {
|
|
1051
|
+
type: "cvv",
|
|
1052
|
+
placeholder: "CCV",
|
|
1053
|
+
css: style
|
|
1054
|
+
}
|
|
1055
|
+
}]
|
|
1056
|
+
};
|
|
1057
|
+
|
|
1058
|
+
const hostedFieldsCallBack = state => {
|
|
1059
|
+
let fieldErrors = {};
|
|
1060
|
+
state.fields.map(f => {
|
|
1061
|
+
fieldErrors = lawpay_form_objectSpread(lawpay_form_objectSpread({}, fieldErrors), {}, {
|
|
1062
|
+
[f.type]: f.error
|
|
1063
|
+
});
|
|
1064
|
+
});
|
|
1065
|
+
setLawPayErrors(lawpay_form_objectSpread(lawpay_form_objectSpread({}, lawPayErrors), fieldErrors));
|
|
1066
|
+
};
|
|
1067
|
+
|
|
1068
|
+
(0,external_react_namespaceObject.useEffect)(() => {
|
|
1069
|
+
if (window.AffiniPay && hostedFields === null) {
|
|
1070
|
+
setHostedFields(window.AffiniPay.HostedFields.initializeFields(hostedFieldsConfiguration, hostedFieldsCallBack));
|
|
1071
|
+
}
|
|
1072
|
+
}, [reservation]);
|
|
1073
|
+
|
|
1074
|
+
const onExpireChange = ev => {
|
|
1075
|
+
setLawPayFields(lawpay_form_objectSpread(lawpay_form_objectSpread({}, lawPayFields), {}, {
|
|
1076
|
+
[ev.target.id]: ev.target.value
|
|
1077
|
+
}));
|
|
1078
|
+
};
|
|
1079
|
+
|
|
1080
|
+
const formHasErrors = () => {
|
|
1081
|
+
let errors = {};
|
|
1082
|
+
Object.keys(lawPayFields).map(key => {
|
|
1083
|
+
if (!lawPayFields[key]) {
|
|
1084
|
+
errors = lawpay_form_objectSpread(lawpay_form_objectSpread({}, errors), {}, {
|
|
1085
|
+
[key]: 'This field is required.'
|
|
1086
|
+
});
|
|
1087
|
+
}
|
|
1088
|
+
});
|
|
1089
|
+
setLawPayErrors(lawpay_form_objectSpread(lawpay_form_objectSpread({}, lawPayErrors), errors));
|
|
1090
|
+
return Object.keys(errors).length > 0;
|
|
1091
|
+
};
|
|
1092
|
+
|
|
1093
|
+
const onSubmit = async event => {
|
|
1094
|
+
event.preventDefault();
|
|
1095
|
+
|
|
1096
|
+
if (!hostedFields) {
|
|
1097
|
+
// Affinity Pay has not loaded yet. Make sure to disable
|
|
1098
|
+
// form submission until Affinity Pay has loaded.
|
|
1099
|
+
return;
|
|
1100
|
+
}
|
|
1101
|
+
|
|
1102
|
+
if (!formHasErrors()) {
|
|
1103
|
+
try {
|
|
1104
|
+
const token = await hostedFields.getPaymentToken({
|
|
1105
|
+
"postal_code": lawPayFields.postal_code,
|
|
1106
|
+
"address1": lawPayFields.address1,
|
|
1107
|
+
"exp_year": lawPayFields.exp_year,
|
|
1108
|
+
"exp_month": lawPayFields.exp_month
|
|
1109
|
+
});
|
|
1110
|
+
payTicket(provider, {
|
|
1111
|
+
token
|
|
1112
|
+
});
|
|
1113
|
+
} catch (error) {
|
|
1114
|
+
external_sweetalert2_default().fire("Payment error", error.message, "warning");
|
|
1115
|
+
}
|
|
1116
|
+
}
|
|
1117
|
+
};
|
|
1118
|
+
|
|
1119
|
+
const ddl_month = [{
|
|
1120
|
+
label: '1 - January',
|
|
1121
|
+
value: '01'
|
|
1122
|
+
}, {
|
|
1123
|
+
label: '2 - February',
|
|
1124
|
+
value: '02'
|
|
1125
|
+
}, {
|
|
1126
|
+
label: '3 - March',
|
|
1127
|
+
value: '03'
|
|
1128
|
+
}, {
|
|
1129
|
+
label: '4 - April',
|
|
1130
|
+
value: '04'
|
|
1131
|
+
}, {
|
|
1132
|
+
label: '5 - May',
|
|
1133
|
+
value: '05'
|
|
1134
|
+
}, {
|
|
1135
|
+
label: '6 - June',
|
|
1136
|
+
value: '06'
|
|
1137
|
+
}, {
|
|
1138
|
+
label: '7 - July',
|
|
1139
|
+
value: '07'
|
|
1140
|
+
}, {
|
|
1141
|
+
label: '8 - August',
|
|
1142
|
+
value: '08'
|
|
1143
|
+
}, {
|
|
1144
|
+
label: '9 - September',
|
|
1145
|
+
value: '09'
|
|
1146
|
+
}, {
|
|
1147
|
+
label: '10 - October',
|
|
1148
|
+
value: '10'
|
|
1149
|
+
}, {
|
|
1150
|
+
label: '11 - November',
|
|
1151
|
+
value: '11'
|
|
1152
|
+
}, {
|
|
1153
|
+
label: '12 - December',
|
|
1154
|
+
value: '12'
|
|
1155
|
+
}];
|
|
1156
|
+
const current_year = (0,methods_namespaceObject.epochToMomentTimeZone)(timestamp, 'utc').year();
|
|
1157
|
+
const year_ddl = Array.from({
|
|
1158
|
+
length: 15
|
|
1159
|
+
}, (_, i) => {
|
|
1160
|
+
return {
|
|
1161
|
+
label: `${current_year + i}`,
|
|
1162
|
+
value: `${current_year + i}`
|
|
1163
|
+
};
|
|
1164
|
+
});
|
|
1165
|
+
return /*#__PURE__*/external_react_default().createElement("form", {
|
|
1166
|
+
className: lawpay_form_index_module.form,
|
|
1167
|
+
id: "payment-form",
|
|
1168
|
+
onSubmit: onSubmit
|
|
1169
|
+
}, /*#__PURE__*/external_react_default().createElement("div", {
|
|
1170
|
+
className: lawpay_form_index_module.fieldWrapper
|
|
1171
|
+
}, /*#__PURE__*/external_react_default().createElement("div", {
|
|
1172
|
+
className: lawpay_form_index_module.inputWrapper
|
|
1173
|
+
}, /*#__PURE__*/external_react_default().createElement("div", {
|
|
1174
|
+
id: "my_credit_card_field_id",
|
|
1175
|
+
className: lawpay_form_index_module.lawpayWrapper
|
|
1176
|
+
}), /*#__PURE__*/external_react_default().createElement("i", {
|
|
1177
|
+
className: "fa fa-credit-card"
|
|
1178
|
+
})), lawPayErrors.credit_card_number && /*#__PURE__*/external_react_default().createElement("div", {
|
|
1179
|
+
className: lawpay_form_index_module.fieldError
|
|
1180
|
+
}, lawPayErrors.credit_card_number)), /*#__PURE__*/external_react_default().createElement("div", {
|
|
1181
|
+
className: lawpay_form_index_module.fieldWrapper
|
|
1182
|
+
}, /*#__PURE__*/external_react_default().createElement("div", {
|
|
1183
|
+
className: lawpay_form_index_module.dateWrapper
|
|
1184
|
+
}, /*#__PURE__*/external_react_default().createElement("div", null, /*#__PURE__*/external_react_default().createElement(components_namespaceObject.Dropdown, {
|
|
1185
|
+
className: lawpay_form_index_module.dropdown,
|
|
1186
|
+
placeholder: "Month",
|
|
1187
|
+
onChange: onExpireChange,
|
|
1188
|
+
id: "exp_month",
|
|
1189
|
+
options: ddl_month
|
|
1190
|
+
}), lawPayErrors.exp_month && /*#__PURE__*/external_react_default().createElement("div", {
|
|
1191
|
+
className: lawpay_form_index_module.fieldError
|
|
1192
|
+
}, lawPayErrors.exp_month)), /*#__PURE__*/external_react_default().createElement("div", null, /*#__PURE__*/external_react_default().createElement(components_namespaceObject.Dropdown, {
|
|
1193
|
+
className: lawpay_form_index_module.dropdown,
|
|
1194
|
+
placeholder: "Year",
|
|
1195
|
+
onChange: onExpireChange,
|
|
1196
|
+
id: "exp_year",
|
|
1197
|
+
options: year_ddl
|
|
1198
|
+
}), lawPayErrors.exp_year && /*#__PURE__*/external_react_default().createElement("div", {
|
|
1199
|
+
className: lawpay_form_index_module.fieldError
|
|
1200
|
+
}, lawPayErrors.exp_year)))), /*#__PURE__*/external_react_default().createElement("div", {
|
|
1201
|
+
className: lawpay_form_index_module.fieldWrapper
|
|
1202
|
+
}, /*#__PURE__*/external_react_default().createElement("div", {
|
|
1203
|
+
className: lawpay_form_index_module.fieldRow
|
|
1204
|
+
}, /*#__PURE__*/external_react_default().createElement("div", {
|
|
1205
|
+
className: lawpay_form_index_module.inputWrapper
|
|
1206
|
+
}, /*#__PURE__*/external_react_default().createElement("div", {
|
|
1207
|
+
id: "my_cvv_field_id",
|
|
1208
|
+
className: lawpay_form_index_module.lawpayWrapper
|
|
1209
|
+
})), /*#__PURE__*/external_react_default().createElement("div", {
|
|
1210
|
+
className: lawpay_form_index_module.inputWrapper
|
|
1211
|
+
}, /*#__PURE__*/external_react_default().createElement("input", {
|
|
1212
|
+
type: "text",
|
|
1213
|
+
name: "postal_code",
|
|
1214
|
+
placeholder: "ZIP Code *",
|
|
1215
|
+
onChange: e => setLawPayFields(lawpay_form_objectSpread(lawpay_form_objectSpread({}, lawPayFields), {}, {
|
|
1216
|
+
postal_code: e.target.value
|
|
1217
|
+
}))
|
|
1218
|
+
}))), /*#__PURE__*/external_react_default().createElement("div", {
|
|
1219
|
+
className: lawpay_form_index_module.fieldRow
|
|
1220
|
+
}, lawPayErrors.cvv && /*#__PURE__*/external_react_default().createElement("div", {
|
|
1221
|
+
className: lawpay_form_index_module.fieldError
|
|
1222
|
+
}, lawPayErrors.cvv), lawPayErrors.postal_code && /*#__PURE__*/external_react_default().createElement("div", {
|
|
1223
|
+
className: lawpay_form_index_module.fieldError
|
|
1224
|
+
}, lawPayErrors.postal_code))), /*#__PURE__*/external_react_default().createElement("div", {
|
|
1225
|
+
className: lawpay_form_index_module.fieldWrapper
|
|
1226
|
+
}, /*#__PURE__*/external_react_default().createElement("div", {
|
|
1227
|
+
className: lawpay_form_index_module.inputWrapper
|
|
1228
|
+
}, /*#__PURE__*/external_react_default().createElement("input", {
|
|
1229
|
+
type: "text",
|
|
1230
|
+
name: "address1",
|
|
1231
|
+
placeholder: "Address *",
|
|
1232
|
+
onChange: e => setLawPayFields(lawpay_form_objectSpread(lawpay_form_objectSpread({}, lawPayFields), {}, {
|
|
1233
|
+
address1: e.target.value
|
|
1234
|
+
}))
|
|
1235
|
+
})), lawPayErrors.address1 && /*#__PURE__*/external_react_default().createElement("div", {
|
|
1236
|
+
className: lawpay_form_index_module.fieldError
|
|
1237
|
+
}, lawPayErrors.address1)));
|
|
1238
|
+
};
|
|
1239
|
+
|
|
1240
|
+
const mapStateToProps = ({
|
|
1241
|
+
registrationLiteState
|
|
1242
|
+
}) => ({
|
|
1243
|
+
marketingData: registrationLiteState.settings.marketingData
|
|
1244
|
+
});
|
|
1245
|
+
|
|
1246
|
+
/* harmony default export */ const lawpay_form = ((0,external_react_redux_namespaceObject.connect)(mapStateToProps, null)(LawPayForm));
|
|
1247
|
+
;// CONCATENATED MODULE: external "@stripe/stripe-js"
|
|
1248
|
+
const stripe_js_namespaceObject = require("@stripe/stripe-js");
|
|
1249
|
+
;// CONCATENATED MODULE: external "@stripe/react-stripe-js"
|
|
1250
|
+
const react_stripe_js_namespaceObject = require("@stripe/react-stripe-js");
|
|
781
1251
|
;// CONCATENATED MODULE: external "react-hook-form"
|
|
782
1252
|
const external_react_hook_form_namespaceObject = require("react-hook-form");
|
|
783
1253
|
;// CONCATENATED MODULE: external "lodash/merge"
|
|
@@ -852,7 +1322,8 @@ const StripeForm = ({
|
|
|
852
1322
|
payTicket,
|
|
853
1323
|
userProfile,
|
|
854
1324
|
marketingData,
|
|
855
|
-
stripeOptions
|
|
1325
|
+
stripeOptions,
|
|
1326
|
+
provider
|
|
856
1327
|
}) => {
|
|
857
1328
|
const stripe = (0,react_stripe_js_namespaceObject.useStripe)();
|
|
858
1329
|
const elements = (0,react_stripe_js_namespaceObject.useElements)();
|
|
@@ -903,7 +1374,11 @@ const StripeForm = ({
|
|
|
903
1374
|
});
|
|
904
1375
|
|
|
905
1376
|
if (token) {
|
|
906
|
-
payTicket(
|
|
1377
|
+
payTicket(provider, {
|
|
1378
|
+
token,
|
|
1379
|
+
stripe,
|
|
1380
|
+
zipCode: data.zipCode
|
|
1381
|
+
});
|
|
907
1382
|
} else if (error) {
|
|
908
1383
|
if (stripeErrorCodeMap[error.code]) {
|
|
909
1384
|
setStripeErrors({
|
|
@@ -969,13 +1444,59 @@ const StripeForm = ({
|
|
|
969
1444
|
}, "This field is required.")));
|
|
970
1445
|
};
|
|
971
1446
|
|
|
972
|
-
const
|
|
1447
|
+
const stripe_form_mapStateToProps = ({
|
|
973
1448
|
registrationLiteState
|
|
974
1449
|
}) => ({
|
|
975
1450
|
marketingData: registrationLiteState.settings.marketingData
|
|
976
1451
|
});
|
|
977
1452
|
|
|
978
|
-
/* harmony default export */ const stripe_form = ((0,external_react_redux_namespaceObject.connect)(
|
|
1453
|
+
/* harmony default export */ const stripe_form = ((0,external_react_redux_namespaceObject.connect)(stripe_form_mapStateToProps, null)(StripeForm));
|
|
1454
|
+
;// CONCATENATED MODULE: ./src/components/stripe-component/index.js
|
|
1455
|
+
/**
|
|
1456
|
+
* Copyright 2020 OpenStack Foundation
|
|
1457
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
1458
|
+
* you may not use this file except in compliance with the License.
|
|
1459
|
+
* You may obtain a copy of the License at
|
|
1460
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
1461
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
1462
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
1463
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
1464
|
+
* See the License for the specific language governing permissions and
|
|
1465
|
+
* limitations under the License.
|
|
1466
|
+
**/
|
|
1467
|
+
|
|
1468
|
+
|
|
1469
|
+
|
|
1470
|
+
|
|
1471
|
+
|
|
1472
|
+
|
|
1473
|
+
const stripe_component_StripeProvider = ({
|
|
1474
|
+
userProfile,
|
|
1475
|
+
reservation,
|
|
1476
|
+
payTicket,
|
|
1477
|
+
providerKey,
|
|
1478
|
+
provider,
|
|
1479
|
+
stripeOptions
|
|
1480
|
+
}) => {
|
|
1481
|
+
const stripePromise = (0,external_react_namespaceObject.useMemo)(() => (0,stripe_js_namespaceObject.loadStripe)(providerKey), [providerKey]);
|
|
1482
|
+
const options = {
|
|
1483
|
+
fonts: stripeOptions === null || stripeOptions === void 0 ? void 0 : stripeOptions.fonts
|
|
1484
|
+
};
|
|
1485
|
+
return /*#__PURE__*/external_react_default().createElement(react_stripe_js_namespaceObject.Elements, {
|
|
1486
|
+
options: options,
|
|
1487
|
+
stripe: stripePromise
|
|
1488
|
+
}, /*#__PURE__*/external_react_default().createElement(stripe_form, {
|
|
1489
|
+
reservation: reservation,
|
|
1490
|
+
payTicket: payTicket,
|
|
1491
|
+
userProfile: userProfile,
|
|
1492
|
+
stripeOptions: stripeOptions,
|
|
1493
|
+
provider: provider
|
|
1494
|
+
}));
|
|
1495
|
+
};
|
|
1496
|
+
|
|
1497
|
+
/* harmony default export */ const stripe_component = (stripe_component_StripeProvider);
|
|
1498
|
+
;// CONCATENATED MODULE: external "react-helmet"
|
|
1499
|
+
const external_react_helmet_namespaceObject = require("react-helmet");
|
|
979
1500
|
;// CONCATENATED MODULE: ./src/components/payment/index.js
|
|
980
1501
|
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
1502
|
|
|
@@ -1003,13 +1524,16 @@ function payment_defineProperty(obj, key, value) { if (key in obj) { Object.defi
|
|
|
1003
1524
|
|
|
1004
1525
|
|
|
1005
1526
|
|
|
1527
|
+
|
|
1006
1528
|
const PaymentComponent = ({
|
|
1007
1529
|
isActive,
|
|
1008
1530
|
userProfile,
|
|
1009
1531
|
reservation,
|
|
1010
1532
|
payTicket,
|
|
1011
|
-
|
|
1012
|
-
|
|
1533
|
+
providerKey,
|
|
1534
|
+
provider,
|
|
1535
|
+
stripeOptions,
|
|
1536
|
+
timestamp
|
|
1013
1537
|
}) => {
|
|
1014
1538
|
const [ref, {
|
|
1015
1539
|
height
|
|
@@ -1028,9 +1552,6 @@ const PaymentComponent = ({
|
|
|
1028
1552
|
marginBottom: isActive ? 5 : 0
|
|
1029
1553
|
}
|
|
1030
1554
|
});
|
|
1031
|
-
const options = {
|
|
1032
|
-
fonts: stripeOptions === null || stripeOptions === void 0 ? void 0 : stripeOptions.fonts
|
|
1033
|
-
};
|
|
1034
1555
|
return /*#__PURE__*/external_react_default().createElement("div", {
|
|
1035
1556
|
className: `${payment_index_module.outerWrapper} step-wrapper`
|
|
1036
1557
|
}, /*#__PURE__*/external_react_default().createElement((external_react_default()).Fragment, null, /*#__PURE__*/external_react_default().createElement("div", {
|
|
@@ -1039,24 +1560,30 @@ const PaymentComponent = ({
|
|
|
1039
1560
|
className: payment_index_module.title
|
|
1040
1561
|
}, /*#__PURE__*/external_react_default().createElement("span", null, "Payment")), /*#__PURE__*/external_react_default().createElement(external_react_spring_namespaceObject.animated.div, {
|
|
1041
1562
|
style: payment_objectSpread({
|
|
1042
|
-
overflow: 'hidden'
|
|
1563
|
+
overflow: `${isActive ? '' : 'hidden'}`
|
|
1043
1564
|
}, toggleAnimation)
|
|
1044
1565
|
}, /*#__PURE__*/external_react_default().createElement("div", {
|
|
1045
1566
|
ref: ref
|
|
1046
|
-
}, /*#__PURE__*/external_react_default().createElement(
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
}, /*#__PURE__*/external_react_default().createElement(stripe_form, {
|
|
1567
|
+
}, provider === 'Stripe' && /*#__PURE__*/external_react_default().createElement(stripe_component, {
|
|
1568
|
+
provider: provider,
|
|
1569
|
+
providerKey: providerKey,
|
|
1050
1570
|
reservation: reservation,
|
|
1051
1571
|
payTicket: payTicket,
|
|
1052
1572
|
userProfile: userProfile,
|
|
1053
1573
|
stripeOptions: stripeOptions
|
|
1574
|
+
}), 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", {
|
|
1575
|
+
src: "https://cdn.affinipay.com/hostedfields/1.1.1/fieldGen_1.1.1.js"
|
|
1576
|
+
})), /*#__PURE__*/external_react_default().createElement(lawpay_form, {
|
|
1577
|
+
provider: provider,
|
|
1578
|
+
reservation: reservation,
|
|
1579
|
+
payTicket: payTicket,
|
|
1580
|
+
userProfile: userProfile,
|
|
1581
|
+
providerKey: providerKey,
|
|
1582
|
+
timestamp: timestamp
|
|
1054
1583
|
})))))));
|
|
1055
1584
|
};
|
|
1056
1585
|
|
|
1057
1586
|
/* 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
1587
|
;// CONCATENATED MODULE: external "react-tooltip"
|
|
1061
1588
|
const external_react_tooltip_namespaceObject = require("react-tooltip");
|
|
1062
1589
|
var external_react_tooltip_default = /*#__PURE__*/__webpack_require__.n(external_react_tooltip_namespaceObject);
|
|
@@ -1270,9 +1797,10 @@ const PersonalInfoComponent = ({
|
|
|
1270
1797
|
onChange: onCompanyChange,
|
|
1271
1798
|
onError: handleCompanyError,
|
|
1272
1799
|
value: personalInfo.company
|
|
1273
|
-
}), companyError && /*#__PURE__*/external_react_default().createElement("
|
|
1800
|
+
}), companyError && /*#__PURE__*/external_react_default().createElement("div", {
|
|
1801
|
+
className: personal_information_index_module.fieldError,
|
|
1274
1802
|
"data-testid": "company-error"
|
|
1275
|
-
}, "This field is required"))), /*#__PURE__*/external_react_default().createElement("div", {
|
|
1803
|
+
}, "This field is required."))), /*#__PURE__*/external_react_default().createElement("div", {
|
|
1276
1804
|
className: personal_information_index_module.fieldWrapper
|
|
1277
1805
|
}, /*#__PURE__*/external_react_default().createElement("div", {
|
|
1278
1806
|
className: personal_information_index_module.inputWrapper
|
|
@@ -1634,8 +2162,6 @@ const ButtonBarComponent = ({
|
|
|
1634
2162
|
;// CONCATENATED MODULE: ./src/components/purchase-complete/index.module.scss
|
|
1635
2163
|
// extracted by mini-css-extract-plugin
|
|
1636
2164
|
/* 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
2165
|
;// CONCATENATED MODULE: ./src/components/purchase-complete/index.js
|
|
1640
2166
|
/**
|
|
1641
2167
|
* Copyright 2020 OpenStack Foundation
|
|
@@ -1783,7 +2309,7 @@ const PasswordlessLoginComponent = ({
|
|
|
1783
2309
|
className: `${login_passwordless_index_module.button} button`,
|
|
1784
2310
|
onClick: () => tryPasswordlessLogin(otpCode),
|
|
1785
2311
|
"data-testid": "verify"
|
|
1786
|
-
}, "Verify"), /*#__PURE__*/external_react_default().createElement("b", null, "or go back and ", /*#__PURE__*/external_react_default().createElement("span", {
|
|
2312
|
+
}, "Verify Email"), /*#__PURE__*/external_react_default().createElement("b", null, "or go back and ", /*#__PURE__*/external_react_default().createElement("span", {
|
|
1787
2313
|
className: login_passwordless_index_module.link,
|
|
1788
2314
|
onClick: () => goToLogin(),
|
|
1789
2315
|
"data-testid": "go-back"
|
|
@@ -1835,7 +2361,7 @@ const TicketOwnedComponent = ({
|
|
|
1835
2361
|
|
|
1836
2362
|
/* harmony default export */ const ticket_owned = (TicketOwnedComponent);
|
|
1837
2363
|
;// CONCATENATED MODULE: ./src/components/registration-lite.js
|
|
1838
|
-
const registration_lite_excluded = ["loadSession", "setMarketingSettings", "changeStep", "removeReservedTicket", "reserveTicket", "
|
|
2364
|
+
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
2365
|
|
|
1840
2366
|
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
2367
|
|
|
@@ -1876,7 +2402,6 @@ function registration_lite_objectWithoutPropertiesLoose(source, excluded) { if (
|
|
|
1876
2402
|
|
|
1877
2403
|
|
|
1878
2404
|
|
|
1879
|
-
|
|
1880
2405
|
const RegistrationLite = _ref => {
|
|
1881
2406
|
var _formValues$ticketTyp, _formValues$ticketTyp2;
|
|
1882
2407
|
|
|
@@ -1886,7 +2411,7 @@ const RegistrationLite = _ref => {
|
|
|
1886
2411
|
changeStep,
|
|
1887
2412
|
removeReservedTicket,
|
|
1888
2413
|
reserveTicket,
|
|
1889
|
-
|
|
2414
|
+
payTicketWithProvider,
|
|
1890
2415
|
onPurchaseComplete,
|
|
1891
2416
|
getTicketTypes,
|
|
1892
2417
|
getTaxesTypes,
|
|
@@ -1947,15 +2472,16 @@ const RegistrationLite = _ref => {
|
|
|
1947
2472
|
}));
|
|
1948
2473
|
|
|
1949
2474
|
let publicKey = null;
|
|
2475
|
+
let provider = '';
|
|
1950
2476
|
|
|
1951
2477
|
for (let profile of summitData.payment_profiles) {
|
|
1952
2478
|
if (profile.application_type === 'Registration') {
|
|
1953
2479
|
publicKey = profile.test_mode_enabled ? profile.test_publishable_key : profile.live_publishable_key;
|
|
2480
|
+
provider = profile.provider;
|
|
1954
2481
|
break;
|
|
1955
2482
|
}
|
|
1956
2483
|
}
|
|
1957
2484
|
|
|
1958
|
-
const stripePromise = (0,external_react_namespaceObject.useMemo)(() => (0,stripe_js_namespaceObject.loadStripe)(publicKey), [publicKey]);
|
|
1959
2485
|
(0,external_react_namespaceObject.useEffect)(() => {
|
|
1960
2486
|
loadSession(registration_lite_objectSpread(registration_lite_objectSpread({}, rest), {}, {
|
|
1961
2487
|
summitData,
|
|
@@ -2010,12 +2536,12 @@ const RegistrationLite = _ref => {
|
|
|
2010
2536
|
};
|
|
2011
2537
|
|
|
2012
2538
|
return /*#__PURE__*/external_react_default().createElement("div", {
|
|
2013
|
-
id:
|
|
2539
|
+
id: `${general_module.modal}`,
|
|
2014
2540
|
className: "modal is-active"
|
|
2015
2541
|
}, /*#__PURE__*/external_react_default().createElement("div", {
|
|
2016
2542
|
className: "modal-background"
|
|
2017
2543
|
}), /*#__PURE__*/external_react_default().createElement("div", {
|
|
2018
|
-
className:
|
|
2544
|
+
className: `${general_module.modal} modal-content`
|
|
2019
2545
|
}, /*#__PURE__*/external_react_default().createElement((ajaxloader_default()), {
|
|
2020
2546
|
relative: true,
|
|
2021
2547
|
color: '#ffffff',
|
|
@@ -2077,9 +2603,11 @@ const RegistrationLite = _ref => {
|
|
|
2077
2603
|
}, /*#__PURE__*/external_react_default().createElement(payment, {
|
|
2078
2604
|
isActive: step === 2,
|
|
2079
2605
|
reservation: reservation,
|
|
2080
|
-
payTicket:
|
|
2606
|
+
payTicket: payTicketWithProvider,
|
|
2081
2607
|
userProfile: profileData,
|
|
2082
|
-
|
|
2608
|
+
timestamp: summitData.timestamp,
|
|
2609
|
+
provider: provider,
|
|
2610
|
+
providerKey: publicKey,
|
|
2083
2611
|
stripeOptions: stripeOptions
|
|
2084
2612
|
})))), profileData && step === 3 && /*#__PURE__*/external_react_default().createElement(purchase_complete, {
|
|
2085
2613
|
checkout: checkout,
|
|
@@ -2118,7 +2646,7 @@ const registration_lite_mapStateToProps = ({
|
|
|
2118
2646
|
changeStep: changeStep,
|
|
2119
2647
|
reserveTicket: reserveTicket,
|
|
2120
2648
|
removeReservedTicket: removeReservedTicket,
|
|
2121
|
-
|
|
2649
|
+
payTicketWithProvider: payTicketWithProvider,
|
|
2122
2650
|
getTicketTypes: getTicketTypes,
|
|
2123
2651
|
getTaxesTypes: getTaxesTypes,
|
|
2124
2652
|
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.15",
|
|
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",
|