esoftplay-event 0.0.0-t → 0.0.0-u
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/event/order_detail_waiting.tsx +40 -39
- package/package.json +1 -1
|
@@ -118,16 +118,18 @@ export default function m(props: EventOrder_waitingProps): any {
|
|
|
118
118
|
payment_id: result?.payment_id,
|
|
119
119
|
}
|
|
120
120
|
|
|
121
|
-
function rebuy(dataCC
|
|
121
|
+
function rebuy(dataCC?: any) {
|
|
122
122
|
if (result?.has_addition == 1) {
|
|
123
123
|
dataPost.addition = getAddition()
|
|
124
124
|
}
|
|
125
125
|
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
126
|
+
if (!!dataCC) {
|
|
127
|
+
dataPost.card_id = dataCC?.card_id
|
|
128
|
+
dataPost.card_number = dataCC?.card_number
|
|
129
|
+
dataPost.card_cvv = dataCC?.card_cvv
|
|
130
|
+
dataPost.card_expiry_year = dataCC?.card_expiry_month
|
|
131
|
+
dataPost.card_expiry_month = dataCC?.expiry_month
|
|
132
|
+
}
|
|
131
133
|
|
|
132
134
|
let url = 'event_booking/' + result?.event_id
|
|
133
135
|
LibNavigation.navigateForResult('event/loading_page', {
|
|
@@ -188,7 +190,7 @@ export default function m(props: EventOrder_waitingProps): any {
|
|
|
188
190
|
|
|
189
191
|
LibProgress.show(esp.lang("event/order_detail_waiting", "wait"))
|
|
190
192
|
new LibCurl('event_order_waiting_pay', post, (res, msg) => {
|
|
191
|
-
if (
|
|
193
|
+
if (res?.url_web) {
|
|
192
194
|
let forWebCC = {
|
|
193
195
|
url: url,
|
|
194
196
|
url_web: res?.url_web,
|
|
@@ -222,6 +224,33 @@ export default function m(props: EventOrder_waitingProps): any {
|
|
|
222
224
|
|
|
223
225
|
}
|
|
224
226
|
|
|
227
|
+
function payWithCC(cc?: boolean) {
|
|
228
|
+
if (!!cc) {
|
|
229
|
+
LibNavigation.navigateForResult('component/payment_cc', {
|
|
230
|
+
amount: result?.total,
|
|
231
|
+
event_id: result?.event_id,
|
|
232
|
+
currency: result?.currency
|
|
233
|
+
}).then((value) => {
|
|
234
|
+
doBuy(value)
|
|
235
|
+
})
|
|
236
|
+
} else {
|
|
237
|
+
doBuy()
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
function doBuy(value?: any) {
|
|
241
|
+
LibDialog.confirm(esp.lang("bigbang/payment", "dialog_title"), esp.lang("bigbang/payment", "dialog_msg"), esp.lang("bigbang/payment", "dialog_ok"), () => {
|
|
242
|
+
if (result?.hasOwnProperty("url_pay") && result?.url_pay != "") {
|
|
243
|
+
pay(value)
|
|
244
|
+
} else {
|
|
245
|
+
rebuy(value)
|
|
246
|
+
}
|
|
247
|
+
}, esp.lang("bigbang/payment", "dialog_cancel"), () => {
|
|
248
|
+
|
|
249
|
+
})
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
}
|
|
253
|
+
|
|
225
254
|
if (!result) {
|
|
226
255
|
return <LibLoading />
|
|
227
256
|
}
|
|
@@ -352,7 +381,7 @@ export default function m(props: EventOrder_waitingProps): any {
|
|
|
352
381
|
}
|
|
353
382
|
|
|
354
383
|
{
|
|
355
|
-
result?.payment?.payment_type != 3 && result?.payment?.payment_type != 4 && result?.payment?.payment_type != 11 && result?.payment?.payment_type != 13 &&
|
|
384
|
+
result?.payment?.payment_type != 3 && result?.payment?.payment_type != 4 && result?.payment?.payment_type != 11 && result?.payment?.payment_type != 13 && result?.payment?.payment_type != 14 &&
|
|
356
385
|
<>
|
|
357
386
|
<View style={{ height: 3, backgroundColor: "#f6f6f6" }} />
|
|
358
387
|
|
|
@@ -431,7 +460,7 @@ export default function m(props: EventOrder_waitingProps): any {
|
|
|
431
460
|
result?.status == 0 && LibUtils.moment(result?.exp_payment).serverFormat('YYYY-MM-DD HH:mm:ss') >= dateNow &&
|
|
432
461
|
<View style={{ padding: 15, paddingTop: 10, paddingBottom: 10 }}>
|
|
433
462
|
{
|
|
434
|
-
result?.payment?.payment_type == 3 && //khusus cc
|
|
463
|
+
(result?.payment?.payment_type == 3 || result?.payment?.payment_type == 14) && //khusus cc & FPX
|
|
435
464
|
<TouchableOpacity onPress={() => {
|
|
436
465
|
if (result?.hasOwnProperty("has_addition") && result?.has_addition == 1) {
|
|
437
466
|
LibNavigation.navigateForResult('event/additional', {
|
|
@@ -443,38 +472,10 @@ export default function m(props: EventOrder_waitingProps): any {
|
|
|
443
472
|
if (additions != "") {
|
|
444
473
|
setAddition(additions)
|
|
445
474
|
}
|
|
446
|
-
|
|
447
|
-
amount: result?.total,
|
|
448
|
-
event_id: result?.event_id,
|
|
449
|
-
currency: result?.currency
|
|
450
|
-
}).then((value) => {
|
|
451
|
-
LibDialog.confirm(esp.lang("bigbang/payment", "dialog_title"), esp.lang("bigbang/payment", "dialog_msg"), esp.lang("bigbang/payment", "dialog_ok"), () => {
|
|
452
|
-
if (result?.hasOwnProperty("url_pay") && result?.url_pay != "") {
|
|
453
|
-
pay(value)
|
|
454
|
-
} else {
|
|
455
|
-
rebuy(value)
|
|
456
|
-
}
|
|
457
|
-
}, esp.lang("bigbang/payment", "dialog_cancel"), () => {
|
|
458
|
-
|
|
459
|
-
})
|
|
460
|
-
})
|
|
475
|
+
payWithCC(result?.payment?.payment_type == 3)
|
|
461
476
|
})
|
|
462
477
|
} else {
|
|
463
|
-
|
|
464
|
-
amount: result?.total,
|
|
465
|
-
event_id: result?.event_id,
|
|
466
|
-
currency: result?.currency
|
|
467
|
-
}).then((value) => {
|
|
468
|
-
LibDialog.confirm(esp.lang("bigbang/payment", "dialog_title"), esp.lang("bigbang/payment", "dialog_msg"), esp.lang("bigbang/payment", "dialog_ok"), () => {
|
|
469
|
-
if (result?.hasOwnProperty("url_pay") && result?.url_pay != "") {
|
|
470
|
-
pay(value)
|
|
471
|
-
} else {
|
|
472
|
-
rebuy(value)
|
|
473
|
-
}
|
|
474
|
-
}, esp.lang("bigbang/payment", "dialog_cancel"), () => {
|
|
475
|
-
|
|
476
|
-
})
|
|
477
|
-
})
|
|
478
|
+
payWithCC(result?.payment?.payment_type == 3)
|
|
478
479
|
}
|
|
479
480
|
}}>
|
|
480
481
|
<View style={{ marginBottom: 10, height: 35, borderRadius: 17, backgroundColor: LibStyle.colorRed, justifyContent: 'center', alignItems: 'center', borderWidth: 1, borderColor: LibStyle.colorRed }} >
|