@haroldtran/react-native-pax 1.0.16 → 1.0.17
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.
|
@@ -713,9 +713,18 @@ class PaxPosLinkModule(
|
|
|
713
713
|
private fun getTransactionBehaviorReq() =
|
|
714
714
|
TransactionBehavior().apply {
|
|
715
715
|
val tip = salesRequest?.tip
|
|
716
|
+
val showTip = salesRequest?.showTip
|
|
716
717
|
signatureCaptureFlag = null
|
|
717
718
|
tipRequestFlag =
|
|
718
|
-
if (
|
|
719
|
+
if (showTip) {
|
|
720
|
+
if (tip != null && tip > 0) {
|
|
721
|
+
TipRequestFlag.NOT_NEED_ENTER_TIP_ON_TERMINAL
|
|
722
|
+
} else {
|
|
723
|
+
TipRequestFlag.NEED_ENTER_TIP_ON_TERMINAL
|
|
724
|
+
}
|
|
725
|
+
} else {
|
|
726
|
+
TipRequestFlag.NOT_NEED_ENTER_TIP_ON_TERMINAL
|
|
727
|
+
}
|
|
719
728
|
signatureUploadFlag = null
|
|
720
729
|
statusReportFlag = null
|
|
721
730
|
acceptedCardType = null
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -64,9 +64,17 @@ export function makePayment(
|
|
|
64
64
|
amount: number = 0,
|
|
65
65
|
tip?: number,
|
|
66
66
|
paymentType?: number,
|
|
67
|
-
ecrRefNum?: string
|
|
67
|
+
ecrRefNum?: string,
|
|
68
|
+
showTip?: boolean
|
|
68
69
|
): Promise<PaxResponseModel> {
|
|
69
|
-
return PaxPosLink.payment({
|
|
70
|
+
return PaxPosLink.payment({
|
|
71
|
+
id,
|
|
72
|
+
amount,
|
|
73
|
+
tip,
|
|
74
|
+
paymentType,
|
|
75
|
+
ecrRefNum,
|
|
76
|
+
showTip,
|
|
77
|
+
});
|
|
70
78
|
}
|
|
71
79
|
|
|
72
80
|
/**
|