boxpay-checkout-reactnative-sdk 1.0.11-beta2 → 1.0.11-beta4
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/lib/module/components/checkboxContainer.js +3 -2
- package/lib/module/components/checkboxContainer.js.map +1 -1
- package/lib/module/components/header.js +1 -1
- package/lib/module/components/header.js.map +1 -1
- package/lib/module/components/paymentSelector.js +1 -1
- package/lib/module/components/paymentSelector.js.map +1 -1
- package/lib/module/components/paymentSuccess.js +2 -7
- package/lib/module/components/paymentSuccess.js.map +1 -1
- package/lib/module/components/savedCardComponent.js +1 -1
- package/lib/module/components/savedCardComponent.js.map +1 -1
- package/lib/module/components/subscriptionRow.js +33 -0
- package/lib/module/components/subscriptionRow.js.map +1 -0
- package/lib/module/interface.js +2 -0
- package/lib/module/interface.js.map +1 -1
- package/lib/module/screens/addressScreen.js +11 -60
- package/lib/module/screens/addressScreen.js.map +1 -1
- package/lib/module/screens/bnplScreen.js +3 -2
- package/lib/module/screens/bnplScreen.js.map +1 -1
- package/lib/module/screens/cardScreen.js +491 -450
- package/lib/module/screens/cardScreen.js.map +1 -1
- package/lib/module/screens/emiScreen.js +5 -9
- package/lib/module/screens/emiScreen.js.map +1 -1
- package/lib/module/screens/instantOfferList.js +2 -6
- package/lib/module/screens/instantOfferList.js.map +1 -1
- package/lib/module/screens/mainScreen.js +54 -6
- package/lib/module/screens/mainScreen.js.map +1 -1
- package/lib/module/screens/netBankingScreen.js +5 -8
- package/lib/module/screens/netBankingScreen.js.map +1 -1
- package/lib/module/screens/upiScreen.js +2 -6
- package/lib/module/screens/upiScreen.js.map +1 -1
- package/lib/module/screens/walletScreen.js +5 -8
- package/lib/module/screens/walletScreen.js.map +1 -1
- package/lib/module/sdk-version.json +1 -1
- package/lib/module/sharedContext/checkoutDetailsHandler.js +8 -2
- package/lib/module/sharedContext/checkoutDetailsHandler.js.map +1 -1
- package/lib/module/sharedContext/getTextInputTheme.js +15 -0
- package/lib/module/sharedContext/getTextInputTheme.js.map +1 -0
- package/lib/module/sharedContext/handleAutoNavigation.js +3 -2
- package/lib/module/sharedContext/handleAutoNavigation.js.map +1 -1
- package/lib/module/styles/indexStyles.js +1 -1
- package/lib/module/styles/indexStyles.js.map +1 -1
- package/lib/module/styles/screens/bnplScreenStyles.js +2 -3
- package/lib/module/styles/screens/bnplScreenStyles.js.map +1 -1
- package/lib/module/styles/screens/cardScreenStyles.js +9 -4
- package/lib/module/styles/screens/cardScreenStyles.js.map +1 -1
- package/lib/module/styles/screens/netBankingScreenStyles.js +2 -3
- package/lib/module/styles/screens/netBankingScreenStyles.js.map +1 -1
- package/lib/module/styles/screens/walletScreenStyles.js +2 -3
- package/lib/module/styles/screens/walletScreenStyles.js.map +1 -1
- package/lib/module/utility.js +16 -0
- package/lib/module/utility.js.map +1 -1
- package/lib/typescript/src/components/checkboxContainer.d.ts.map +1 -1
- package/lib/typescript/src/components/subscriptionRow.d.ts +9 -0
- package/lib/typescript/src/components/subscriptionRow.d.ts.map +1 -0
- package/lib/typescript/src/interface.d.ts +27 -2
- package/lib/typescript/src/interface.d.ts.map +1 -1
- package/lib/typescript/src/screens/addressScreen.d.ts.map +1 -1
- package/lib/typescript/src/screens/cardScreen.d.ts +1 -1
- package/lib/typescript/src/screens/cardScreen.d.ts.map +1 -1
- package/lib/typescript/src/screens/emiScreen.d.ts.map +1 -1
- package/lib/typescript/src/screens/instantOfferList.d.ts.map +1 -1
- package/lib/typescript/src/screens/mainScreen.d.ts.map +1 -1
- package/lib/typescript/src/screens/netBankingScreen.d.ts.map +1 -1
- package/lib/typescript/src/screens/upiScreen.d.ts.map +1 -1
- package/lib/typescript/src/screens/walletScreen.d.ts.map +1 -1
- package/lib/typescript/src/sharedContext/checkoutDetailsHandler.d.ts.map +1 -1
- package/lib/typescript/src/sharedContext/getTextInputTheme.d.ts +7 -0
- package/lib/typescript/src/sharedContext/getTextInputTheme.d.ts.map +1 -0
- package/lib/typescript/src/sharedContext/handleAutoNavigation.d.ts +1 -1
- package/lib/typescript/src/sharedContext/handleAutoNavigation.d.ts.map +1 -1
- package/lib/typescript/src/styles/indexStyles.d.ts +1 -1
- package/lib/typescript/src/styles/screens/bnplScreenStyles.d.ts +1 -2
- package/lib/typescript/src/styles/screens/bnplScreenStyles.d.ts.map +1 -1
- package/lib/typescript/src/styles/screens/cardScreenStyles.d.ts +8 -3
- package/lib/typescript/src/styles/screens/cardScreenStyles.d.ts.map +1 -1
- package/lib/typescript/src/styles/screens/netBankingScreenStyles.d.ts +1 -2
- package/lib/typescript/src/styles/screens/netBankingScreenStyles.d.ts.map +1 -1
- package/lib/typescript/src/styles/screens/walletScreenStyles.d.ts +1 -2
- package/lib/typescript/src/styles/screens/walletScreenStyles.d.ts.map +1 -1
- package/lib/typescript/src/utility.d.ts +2 -0
- package/lib/typescript/src/utility.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/components/checkboxContainer.tsx +2 -1
- package/src/components/header.tsx +1 -1
- package/src/components/paymentSelector.tsx +1 -1
- package/src/components/paymentSuccess.tsx +3 -5
- package/src/components/savedCardComponent.tsx +1 -1
- package/src/components/subscriptionRow.tsx +19 -0
- package/src/interface.ts +25 -2
- package/src/screens/addressScreen.tsx +11 -60
- package/src/screens/bnplScreen.tsx +3 -3
- package/src/screens/cardScreen.tsx +190 -126
- package/src/screens/emiScreen.tsx +6 -9
- package/src/screens/instantOfferList.tsx +2 -6
- package/src/screens/mainScreen.tsx +58 -6
- package/src/screens/netBankingScreen.tsx +5 -9
- package/src/screens/upiScreen.tsx +2 -6
- package/src/screens/walletScreen.tsx +5 -9
- package/src/sdk-version.json +1 -1
- package/src/sharedContext/checkoutDetailsHandler.ts +8 -2
- package/src/sharedContext/getTextInputTheme.ts +12 -0
- package/src/sharedContext/handleAutoNavigation.ts +4 -1
- package/src/styles/indexStyles.ts +1 -1
- package/src/styles/screens/bnplScreenStyles.ts +2 -3
- package/src/styles/screens/cardScreenStyles.ts +3 -4
- package/src/styles/screens/netBankingScreenStyles.ts +2 -3
- package/src/styles/screens/walletScreenStyles.ts +2 -3
- package/src/utility.ts +24 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"checkoutDetailsHandler.d.ts","sourceRoot":"","sources":["../../../../src/sharedContext/checkoutDetailsHandler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAEpD,MAAM,MAAM,sBAAsB,GAAG;IACnC,eAAe,EAAE,eAAe,CAAC;CAClC,CAAC;AAEF,eAAO,IAAI,sBAAsB,EAAE,
|
|
1
|
+
{"version":3,"file":"checkoutDetailsHandler.d.ts","sourceRoot":"","sources":["../../../../src/sharedContext/checkoutDetailsHandler.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAEpD,MAAM,MAAM,sBAAsB,GAAG;IACnC,eAAe,EAAE,eAAe,CAAC;CAClC,CAAC;AAEF,eAAO,IAAI,sBAAsB,EAAE,sBA+ClC,CAAC;AAEF,eAAO,MAAM,yBAAyB,GAAI,SAAS,sBAAsB,SAExE,CAAC;AAEF,eAAO,MAAM,kCAAkC,YAiD9C,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getTextInputTheme.d.ts","sourceRoot":"","sources":["../../../../src/sharedContext/getTextInputTheme.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,iBAAiB;;;;;CAQ7B,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { type AutoNavigationScreen, type PaymentClass } from '../interface';
|
|
2
|
-
export declare const handleAutoNavigation: (savedCardArray: PaymentClass[]) => AutoNavigationScreen | null;
|
|
2
|
+
export declare const handleAutoNavigation: (status: String, savedCardArray: PaymentClass[]) => AutoNavigationScreen | null;
|
|
3
3
|
//# sourceMappingURL=handleAutoNavigation.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handleAutoNavigation.d.ts","sourceRoot":"","sources":["../../../../src/sharedContext/handleAutoNavigation.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"handleAutoNavigation.d.ts","sourceRoot":"","sources":["../../../../src/sharedContext/handleAutoNavigation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqC,KAAK,oBAAoB,EAAE,KAAK,YAAY,EAAE,MAAM,cAAc,CAAC;AAK/G,eAAO,MAAM,oBAAoB,GAC7B,QAAS,MAAM,EACf,gBAAiB,YAAY,EAAE,KAC/B,oBAAoB,GAAG,IA4C1B,CAAA"}
|
|
@@ -53,11 +53,10 @@ declare const styles: {
|
|
|
53
53
|
bottomText: {
|
|
54
54
|
fontSize: number;
|
|
55
55
|
color: string;
|
|
56
|
-
marginBottom: number;
|
|
57
56
|
};
|
|
58
57
|
bottomContainer: {
|
|
59
58
|
justifyContent: "center";
|
|
60
|
-
alignItems: "
|
|
59
|
+
alignItems: "center";
|
|
61
60
|
backgroundColor: string;
|
|
62
61
|
flexDirection: "row";
|
|
63
62
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bnplScreenStyles.d.ts","sourceRoot":"","sources":["../../../../../src/styles/screens/bnplScreenStyles.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,MAAM
|
|
1
|
+
{"version":3,"file":"bnplScreenStyles.d.ts","sourceRoot":"","sources":["../../../../../src/styles/screens/bnplScreenStyles.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwEV,CAAA;AAEF,eAAe,MAAM,CAAA"}
|
|
@@ -13,6 +13,13 @@ declare const styles: {
|
|
|
13
13
|
paddingTop: number;
|
|
14
14
|
paddingBottom: number;
|
|
15
15
|
};
|
|
16
|
+
subscriptionContainer: {
|
|
17
|
+
backgroundColor: string;
|
|
18
|
+
marginHorizontal: number;
|
|
19
|
+
marginTop: number;
|
|
20
|
+
borderRadius: number;
|
|
21
|
+
paddingBottom: number;
|
|
22
|
+
};
|
|
16
23
|
buttonText: {
|
|
17
24
|
color: string;
|
|
18
25
|
fontSize: number;
|
|
@@ -83,7 +90,6 @@ declare const styles: {
|
|
|
83
90
|
errorText: {
|
|
84
91
|
color: string;
|
|
85
92
|
fontSize: number;
|
|
86
|
-
marginHorizontal: number;
|
|
87
93
|
marginTop: number;
|
|
88
94
|
};
|
|
89
95
|
expiryCvvContainer: {
|
|
@@ -151,13 +157,12 @@ declare const styles: {
|
|
|
151
157
|
};
|
|
152
158
|
footerContainer: {
|
|
153
159
|
justifyContent: "center";
|
|
154
|
-
alignItems: "
|
|
160
|
+
alignItems: "center";
|
|
155
161
|
flexDirection: "row";
|
|
156
162
|
};
|
|
157
163
|
footerText: {
|
|
158
164
|
fontSize: number;
|
|
159
165
|
color: string;
|
|
160
|
-
marginBottom: number;
|
|
161
166
|
};
|
|
162
167
|
footerImage: {
|
|
163
168
|
height: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cardScreenStyles.d.ts","sourceRoot":"","sources":["../../../../../src/styles/screens/cardScreenStyles.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,MAAM
|
|
1
|
+
{"version":3,"file":"cardScreenStyles.d.ts","sourceRoot":"","sources":["../../../../../src/styles/screens/cardScreenStyles.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuJV,CAAA;AAEF,eAAe,MAAM,CAAA"}
|
|
@@ -73,14 +73,13 @@ declare const styles: {
|
|
|
73
73
|
};
|
|
74
74
|
footerContainer: {
|
|
75
75
|
justifyContent: "center";
|
|
76
|
-
alignItems: "
|
|
76
|
+
alignItems: "center";
|
|
77
77
|
backgroundColor: string;
|
|
78
78
|
flexDirection: "row";
|
|
79
79
|
};
|
|
80
80
|
footerTextStyle: {
|
|
81
81
|
fontSize: number;
|
|
82
82
|
color: string;
|
|
83
|
-
marginBottom: number;
|
|
84
83
|
};
|
|
85
84
|
footerIcon: {
|
|
86
85
|
height: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"netBankingScreenStyles.d.ts","sourceRoot":"","sources":["../../../../../src/styles/screens/netBankingScreenStyles.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,MAAM
|
|
1
|
+
{"version":3,"file":"netBankingScreenStyles.d.ts","sourceRoot":"","sources":["../../../../../src/styles/screens/netBankingScreenStyles.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA8EV,CAAA;AAEF,eAAe,MAAM,CAAA"}
|
|
@@ -47,14 +47,13 @@ declare const styles: {
|
|
|
47
47
|
};
|
|
48
48
|
bottomContainer: {
|
|
49
49
|
justifyContent: "center";
|
|
50
|
-
alignItems: "
|
|
50
|
+
alignItems: "center";
|
|
51
51
|
backgroundColor: string;
|
|
52
52
|
flexDirection: "row";
|
|
53
53
|
};
|
|
54
54
|
bottomText: {
|
|
55
55
|
fontSize: number;
|
|
56
56
|
color: string;
|
|
57
|
-
marginBottom: number;
|
|
58
57
|
};
|
|
59
58
|
bottomImage: {
|
|
60
59
|
height: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"walletScreenStyles.d.ts","sourceRoot":"","sources":["../../../../../src/styles/screens/walletScreenStyles.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,MAAM
|
|
1
|
+
{"version":3,"file":"walletScreenStyles.d.ts","sourceRoot":"","sources":["../../../../../src/styles/screens/walletScreenStyles.ts"],"names":[],"mappings":"AAEA,QAAA,MAAM,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0FV,CAAA;AAEF,eAAe,MAAM,CAAA"}
|
|
@@ -56,4 +56,6 @@ export declare function extractNames(fullName: string): {
|
|
|
56
56
|
export declare const formatTime: (timeRemaining: number) => string;
|
|
57
57
|
export declare const formatExpiry: (input: string) => string;
|
|
58
58
|
export declare const getPhoneNumberCodeAndCountryName: (countryCodeRef: string) => CountryDetails | any;
|
|
59
|
+
export declare const formatDate: (dateStr: string) => string;
|
|
60
|
+
export declare const isEmpty: (value: unknown) => boolean;
|
|
59
61
|
//# sourceMappingURL=utility.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utility.d.ts","sourceRoot":"","sources":["../../../src/utility.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAMhG,wBAAgB,sBAAsB,CACpC,IAAI,EAAE,aAAa,EAAE,EACrB,UAAU,EAAE,MAAM,GACjB,YAAY,EAAE,CAehB;AAGD,wBAAgB,gBAAgB;;;;;;EAQ/B;AAED,wBAAgB,cAAc;;;;;;;;;;;EAa7B;AAED,wBAAgB,iBAAiB;;;;;;;;;;;;;;;;;;;EA8BhC;AAED,eAAO,MAAQ,MAAM,UAAE,KAAK,QAA6B,CAAC;AAE1D,eAAO,MAAM,YAAY,GAAI,gBAAgB,MAAM;;;;CA0BlD,CAAC;AAMF,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAG/C;AAED,wBAAgB,gCAAgC,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAavE;AAGD,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAG9C;AAED,wBAAgB,aAAa,CAAC,eAAe,EAAG,eAAe,GAAI,MAAM,CAMxE;AAED,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG;IAC9C,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;CAClB,CAcA;AAED,eAAO,MAAM,UAAU,GAAI,eAAgB,MAAM,WAIhD,CAAC;AAEF,eAAO,MAAM,YAAY,GAAI,OAAO,MAAM,KAAG,MAgB5C,CAAC;AAEF,eAAO,MAAM,gCAAgC,GAAI,gBAAiB,MAAM,KAAI,cAAc,GAAG,GAK5F,CAAA"}
|
|
1
|
+
{"version":3,"file":"utility.d.ts","sourceRoot":"","sources":["../../../src/utility.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,YAAY,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAMhG,wBAAgB,sBAAsB,CACpC,IAAI,EAAE,aAAa,EAAE,EACrB,UAAU,EAAE,MAAM,GACjB,YAAY,EAAE,CAehB;AAGD,wBAAgB,gBAAgB;;;;;;EAQ/B;AAED,wBAAgB,cAAc;;;;;;;;;;;EAa7B;AAED,wBAAgB,iBAAiB;;;;;;;;;;;;;;;;;;;EA8BhC;AAED,eAAO,MAAQ,MAAM,UAAE,KAAK,QAA6B,CAAC;AAE1D,eAAO,MAAM,YAAY,GAAI,gBAAgB,MAAM;;;;CA0BlD,CAAC;AAMF,wBAAgB,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAG/C;AAED,wBAAgB,gCAAgC,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAavE;AAGD,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAG9C;AAED,wBAAgB,aAAa,CAAC,eAAe,EAAG,eAAe,GAAI,MAAM,CAMxE;AAED,wBAAgB,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG;IAC9C,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;CAClB,CAcA;AAED,eAAO,MAAM,UAAU,GAAI,eAAgB,MAAM,WAIhD,CAAC;AAEF,eAAO,MAAM,YAAY,GAAI,OAAO,MAAM,KAAG,MAgB5C,CAAC;AAEF,eAAO,MAAM,gCAAgC,GAAI,gBAAiB,MAAM,KAAI,cAAc,GAAG,GAK5F,CAAA;AAED,eAAO,MAAM,UAAU,GAAI,SAAS,MAAM,WAWzC,CAAC;AAEF,eAAO,MAAM,OAAO,GAAI,OAAO,OAAO,KAAG,OAQxC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "boxpay-checkout-reactnative-sdk",
|
|
3
|
-
"version": "1.0.11-
|
|
3
|
+
"version": "1.0.11-beta4",
|
|
4
4
|
"description": "Boxpay Payment Gateway",
|
|
5
5
|
"main": "./lib/module/index.js",
|
|
6
6
|
"types": "./lib/typescript/src/index.d.ts",
|
|
@@ -145,7 +145,7 @@
|
|
|
145
145
|
"create-react-native-library": {
|
|
146
146
|
"languages": "js",
|
|
147
147
|
"type": "library",
|
|
148
|
-
"version": "1.0.11-
|
|
148
|
+
"version": "1.0.11-beta4"
|
|
149
149
|
},
|
|
150
150
|
"dependencies": {
|
|
151
151
|
"axios": "^1.11.0",
|
|
@@ -44,6 +44,7 @@ const styles = StyleSheet.create({
|
|
|
44
44
|
color: '#2D2B32',
|
|
45
45
|
fontSize: 14,
|
|
46
46
|
marginLeft: 6,
|
|
47
|
+
marginRight : 16
|
|
47
48
|
},
|
|
48
49
|
checkboxBox: {
|
|
49
50
|
width: 20,
|
|
@@ -52,7 +53,7 @@ const styles = StyleSheet.create({
|
|
|
52
53
|
borderRadius: 3,
|
|
53
54
|
justifyContent: 'center',
|
|
54
55
|
alignItems: 'center',
|
|
55
|
-
marginLeft:
|
|
56
|
+
marginLeft: 16,
|
|
56
57
|
},
|
|
57
58
|
checkmark: {
|
|
58
59
|
color: '#fff',
|
|
@@ -256,11 +256,9 @@ const styles = StyleSheet.create({
|
|
|
256
256
|
fontSize: 16,
|
|
257
257
|
},
|
|
258
258
|
dashedLine: {
|
|
259
|
-
|
|
260
|
-
borderBottomColor: '#E6E6E6', // Color of the line
|
|
261
|
-
borderStyle: 'dashed', // Makes it dashed
|
|
259
|
+
backgroundColor: '#E6E6E6', // Color of the line
|
|
262
260
|
width: '100%', // Full width
|
|
263
|
-
marginVertical: 10,
|
|
264
|
-
|
|
261
|
+
marginVertical: 10,
|
|
262
|
+
height : 2
|
|
265
263
|
},
|
|
266
264
|
});
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { View, Text } from "react-native"
|
|
2
|
+
import type { CheckoutDetails } from "../interface"
|
|
3
|
+
|
|
4
|
+
interface SubscriptionArgs{
|
|
5
|
+
checkoutDetails : CheckoutDetails,
|
|
6
|
+
heading: string,
|
|
7
|
+
value : string
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
const SubscriptionRow = ({checkoutDetails, heading, value} : SubscriptionArgs) => {
|
|
11
|
+
return (
|
|
12
|
+
<View style={{ flexDirection : 'row', justifyContent : 'space-between', marginHorizontal : 16, paddingTop : 4}}>
|
|
13
|
+
<Text style={{fontFamily :checkoutDetails.fontFamily.regular, color : '#2D2B32'}}>{heading}</Text>
|
|
14
|
+
<Text style={{fontFamily :checkoutDetails.fontFamily.semiBold, color : '#2D2B32'}}>{value}</Text>
|
|
15
|
+
</View>
|
|
16
|
+
)
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export default SubscriptionRow
|
package/src/interface.ts
CHANGED
|
@@ -13,6 +13,7 @@ export enum ConfigurationOptions {
|
|
|
13
13
|
export enum UIConfigurationOptions {
|
|
14
14
|
FontFamily = 'FONT_FAMILY',
|
|
15
15
|
CTABorderRadius = 'CTA_BORDER_RADIUS',
|
|
16
|
+
TextInputFields = 'TEXT_INPUT_FIELDS'
|
|
16
17
|
}
|
|
17
18
|
|
|
18
19
|
export interface FontConfiguration {
|
|
@@ -23,10 +24,16 @@ export interface FontConfiguration {
|
|
|
23
24
|
extraBold?: string
|
|
24
25
|
}
|
|
25
26
|
|
|
27
|
+
export interface TextInputFields {
|
|
28
|
+
focusedBorderColor? : string;
|
|
29
|
+
borderColor? : string
|
|
30
|
+
}
|
|
31
|
+
|
|
26
32
|
// 👇 Each key has its own strict type
|
|
27
33
|
export interface UIConfiguration {
|
|
28
34
|
[UIConfigurationOptions.FontFamily]?: FontConfiguration;
|
|
29
35
|
[UIConfigurationOptions.CTABorderRadius]?: number;
|
|
36
|
+
[UIConfigurationOptions.TextInputFields]?: TextInputFields
|
|
30
37
|
}
|
|
31
38
|
|
|
32
39
|
export interface BoxpayCheckoutProps {
|
|
@@ -46,6 +53,8 @@ export interface CheckoutDetails {
|
|
|
46
53
|
ctaBorderRadius : number,
|
|
47
54
|
buttonColor: string;
|
|
48
55
|
buttonTextColor : string;
|
|
56
|
+
textInputFieldFocusedOutlineColor : string;
|
|
57
|
+
textInputFieldUnFocusedOutlineColor : string;
|
|
49
58
|
headerColor : string;
|
|
50
59
|
headerTextColor : string;
|
|
51
60
|
env: string;
|
|
@@ -78,7 +87,8 @@ export interface CheckoutDetails {
|
|
|
78
87
|
isUPIOtmQRMethodEnabled : boolean,
|
|
79
88
|
isOrderItemDetailsVisible : boolean,
|
|
80
89
|
isSICheckboxVisible : boolean,
|
|
81
|
-
isSubscriptionCheckout : boolean
|
|
90
|
+
isSubscriptionCheckout : boolean,
|
|
91
|
+
subscriptionDetails : {label:string,value : string | null}[] | null
|
|
82
92
|
}
|
|
83
93
|
|
|
84
94
|
interface AnalyticsResponse {
|
|
@@ -447,6 +457,7 @@ export interface HandleFetchStatusOptions {
|
|
|
447
457
|
}
|
|
448
458
|
|
|
449
459
|
export enum TransactionStatus {
|
|
460
|
+
NoAction = "NOACTION",
|
|
450
461
|
RequiresAction = 'REQUIRESACTION',
|
|
451
462
|
Failed = 'FAILED',
|
|
452
463
|
Rejected = 'REJECTED',
|
|
@@ -532,8 +543,20 @@ interface OrderDetails {
|
|
|
532
543
|
items : OrderItem[] | null
|
|
533
544
|
}
|
|
534
545
|
|
|
535
|
-
interface SubscriptionDetails {
|
|
546
|
+
export interface SubscriptionDetails {
|
|
536
547
|
type : string,
|
|
548
|
+
billingCycle : {
|
|
549
|
+
billingTimeUnit : string,
|
|
550
|
+
count : number,
|
|
551
|
+
billingCycleValue : string
|
|
552
|
+
},
|
|
553
|
+
billingDuration : {
|
|
554
|
+
type : string,
|
|
555
|
+
noOfCycles : number
|
|
556
|
+
},
|
|
557
|
+
nextBillingDateLocale : string,
|
|
558
|
+
expiryDateLocale : string,
|
|
559
|
+
recurringExpiryDateLocale : string,
|
|
537
560
|
maxAmountLocaleFull : string
|
|
538
561
|
}
|
|
539
562
|
|
|
@@ -20,6 +20,7 @@ import {
|
|
|
20
20
|
} from '../sharedContext/userdataHandler';
|
|
21
21
|
import styles from '../styles/screens/addressScreenStyles.';
|
|
22
22
|
import { extractNames, getPhoneNumberCodeAndCountryName } from '../utility';
|
|
23
|
+
import { getTextInputTheme } from '../sharedContext/getTextInputTheme';
|
|
23
24
|
|
|
24
25
|
type AddressScreenRouteProp = RouteProp<CheckoutStackParamList, 'AddressScreen'>;
|
|
25
26
|
type AddressScreenNavigationProp = NavigationProp<CheckoutStackParamList, 'AddressScreen'>;
|
|
@@ -358,12 +359,7 @@ const AddressScreen = ({ route, navigation }: Props) => {
|
|
|
358
359
|
}
|
|
359
360
|
value={countryTextField || ''}
|
|
360
361
|
onChangeText={(_) => {}}
|
|
361
|
-
theme={
|
|
362
|
-
colors: {
|
|
363
|
-
primary: '#2D2B32',
|
|
364
|
-
outline: '#E6E6E6',
|
|
365
|
-
},
|
|
366
|
-
}}
|
|
362
|
+
theme={getTextInputTheme()}
|
|
367
363
|
style={[
|
|
368
364
|
styles.textInput,
|
|
369
365
|
{ marginTop: 28, marginHorizontal: 16, fontFamily: checkoutDetails.fontFamily.regular, },
|
|
@@ -411,12 +407,7 @@ const AddressScreen = ({ route, navigation }: Props) => {
|
|
|
411
407
|
onChangeText={(it) => {
|
|
412
408
|
onChangeFullName(it);
|
|
413
409
|
}}
|
|
414
|
-
theme={
|
|
415
|
-
colors: {
|
|
416
|
-
primary: '#2D2B32',
|
|
417
|
-
outline: '#E6E6E6',
|
|
418
|
-
},
|
|
419
|
-
}}
|
|
410
|
+
theme={getTextInputTheme()}
|
|
420
411
|
style={[
|
|
421
412
|
styles.textInput,
|
|
422
413
|
{ marginTop: 20, marginHorizontal: 16, fontFamily: checkoutDetails.fontFamily.regular, },
|
|
@@ -465,12 +456,7 @@ const AddressScreen = ({ route, navigation }: Props) => {
|
|
|
465
456
|
}
|
|
466
457
|
value={selectedPhoneCode || ''}
|
|
467
458
|
onChangeText={(_) => {}}
|
|
468
|
-
theme={
|
|
469
|
-
colors: {
|
|
470
|
-
primary: '#2D2B32',
|
|
471
|
-
outline: '#E6E6E6',
|
|
472
|
-
},
|
|
473
|
-
}}
|
|
459
|
+
theme={getTextInputTheme()}
|
|
474
460
|
style={[
|
|
475
461
|
styles.textInput,
|
|
476
462
|
{ width: 100, marginEnd: 8, fontFamily: checkoutDetails.fontFamily.regular,},
|
|
@@ -514,12 +500,7 @@ const AddressScreen = ({ route, navigation }: Props) => {
|
|
|
514
500
|
onChangeText={(it) => {
|
|
515
501
|
onChangePhoneNumber(it)
|
|
516
502
|
}}
|
|
517
|
-
theme={
|
|
518
|
-
colors: {
|
|
519
|
-
primary: '#2D2B32',
|
|
520
|
-
outline: '#E6E6E6',
|
|
521
|
-
},
|
|
522
|
-
}}
|
|
503
|
+
theme={getTextInputTheme()}
|
|
523
504
|
style={[styles.textInput, { flex: 1 , fontFamily: checkoutDetails.fontFamily.regular,}]}
|
|
524
505
|
error={isPhoneNumberValid == false}
|
|
525
506
|
outlineStyle={{
|
|
@@ -560,12 +541,7 @@ const AddressScreen = ({ route, navigation }: Props) => {
|
|
|
560
541
|
onChangeText={(it) => {
|
|
561
542
|
onChangeEmailId(it);
|
|
562
543
|
}}
|
|
563
|
-
theme={
|
|
564
|
-
colors: {
|
|
565
|
-
primary: '#2D2B32',
|
|
566
|
-
outline: '#E6E6E6',
|
|
567
|
-
},
|
|
568
|
-
}}
|
|
544
|
+
theme={getTextInputTheme()}
|
|
569
545
|
style={[
|
|
570
546
|
styles.textInput,
|
|
571
547
|
{ marginTop: 20, marginHorizontal: 16, fontFamily: checkoutDetails.fontFamily.regular, },
|
|
@@ -617,12 +593,7 @@ const AddressScreen = ({ route, navigation }: Props) => {
|
|
|
617
593
|
onChangeText={(it) => {
|
|
618
594
|
onChangePostalCode(it);
|
|
619
595
|
}}
|
|
620
|
-
theme={
|
|
621
|
-
colors: {
|
|
622
|
-
primary: '#2D2B32',
|
|
623
|
-
outline: '#E6E6E6',
|
|
624
|
-
},
|
|
625
|
-
}}
|
|
596
|
+
theme={getTextInputTheme()}
|
|
626
597
|
style={[styles.textInput, {fontFamily: checkoutDetails.fontFamily.regular,}]}
|
|
627
598
|
error={isPinValid == false}
|
|
628
599
|
outlineStyle={{
|
|
@@ -662,12 +633,7 @@ const AddressScreen = ({ route, navigation }: Props) => {
|
|
|
662
633
|
onChangeText={(it) => {
|
|
663
634
|
onChangeCity(it);
|
|
664
635
|
}}
|
|
665
|
-
theme={
|
|
666
|
-
colors: {
|
|
667
|
-
primary: '#2D2B32',
|
|
668
|
-
outline: '#E6E6E6',
|
|
669
|
-
},
|
|
670
|
-
}}
|
|
636
|
+
theme={getTextInputTheme()}
|
|
671
637
|
style={[styles.textInput, { marginStart: 8, fontFamily: checkoutDetails.fontFamily.regular, }]}
|
|
672
638
|
error={isCityValid == false}
|
|
673
639
|
outlineStyle={{
|
|
@@ -706,12 +672,7 @@ const AddressScreen = ({ route, navigation }: Props) => {
|
|
|
706
672
|
onChangeText={(it) => {
|
|
707
673
|
onChangeState(it);
|
|
708
674
|
}}
|
|
709
|
-
theme={
|
|
710
|
-
colors: {
|
|
711
|
-
primary: '#2D2B32',
|
|
712
|
-
outline: '#E6E6E6',
|
|
713
|
-
},
|
|
714
|
-
}}
|
|
675
|
+
theme={getTextInputTheme()}
|
|
715
676
|
style={[
|
|
716
677
|
styles.textInput,
|
|
717
678
|
{ marginTop: 20, marginHorizontal: 16, fontFamily: checkoutDetails.fontFamily.regular, },
|
|
@@ -753,12 +714,7 @@ const AddressScreen = ({ route, navigation }: Props) => {
|
|
|
753
714
|
onChangeText={(it) => {
|
|
754
715
|
onChangeMainAddress(it);
|
|
755
716
|
}}
|
|
756
|
-
theme={
|
|
757
|
-
colors: {
|
|
758
|
-
primary: '#2D2B32',
|
|
759
|
-
outline: '#E6E6E6',
|
|
760
|
-
},
|
|
761
|
-
}}
|
|
717
|
+
theme={getTextInputTheme()}
|
|
762
718
|
style={[
|
|
763
719
|
styles.textInput,
|
|
764
720
|
{ marginTop: 20, marginHorizontal: 16, fontFamily: checkoutDetails.fontFamily.regular, },
|
|
@@ -800,12 +756,7 @@ const AddressScreen = ({ route, navigation }: Props) => {
|
|
|
800
756
|
onChangeText={(it) => {
|
|
801
757
|
setSecondaryAddressTextField(it);
|
|
802
758
|
}}
|
|
803
|
-
theme={
|
|
804
|
-
colors: {
|
|
805
|
-
primary: '#2D2B32',
|
|
806
|
-
outline: '#E6E6E6',
|
|
807
|
-
},
|
|
808
|
-
}}
|
|
759
|
+
theme={getTextInputTheme()}
|
|
809
760
|
style={[
|
|
810
761
|
styles.textInput,
|
|
811
762
|
{ marginTop: 20, marginHorizontal: 16, fontFamily: checkoutDetails.fontFamily.regular, },
|
|
@@ -9,7 +9,7 @@ import { useEffect, useRef, useState } from 'react';
|
|
|
9
9
|
import { checkoutDetailsHandler, setCheckOutDetailsHandlerToDefault } from '../sharedContext/checkoutDetailsHandler';
|
|
10
10
|
import LottieView from 'lottie-react-native';
|
|
11
11
|
import Header from '../components/header';
|
|
12
|
-
import type
|
|
12
|
+
import { type PaymentClass, type PaymentResultObject, type BNPLScreenParams, TransactionStatus } from '../interface';
|
|
13
13
|
import ShimmerView from '../components/shimmerView';
|
|
14
14
|
import PaymentSuccess from '../components/paymentSuccess';
|
|
15
15
|
import SessionExpire from '../components/sessionExpire';
|
|
@@ -54,7 +54,7 @@ const BNPLScreen = ({ navigation, route }: Props) => {
|
|
|
54
54
|
const [sessionExpireModalOpen, setSessionExppireModalState] = useState(false);
|
|
55
55
|
const [successfulTimeStamp, setSuccessfulTimeStamp] = useState('');
|
|
56
56
|
|
|
57
|
-
const [status, setStatus] = useState<string>(
|
|
57
|
+
const [status, setStatus] = useState<string>(TransactionStatus.NoAction);
|
|
58
58
|
const [transactionId, setTransactionId] = useState<string | null>(null);
|
|
59
59
|
|
|
60
60
|
const backgroundApiInterval = useRef<NodeJS.Timeout | null>(null);
|
|
@@ -76,7 +76,7 @@ const BNPLScreen = ({ navigation, route }: Props) => {
|
|
|
76
76
|
if (showWebView) {
|
|
77
77
|
setShowWebView(false);
|
|
78
78
|
paymentFailedMessage.current = checkoutDetails.errorMessage;
|
|
79
|
-
setStatus(
|
|
79
|
+
setStatus(TransactionStatus.Failed);
|
|
80
80
|
setFailedModalState(true);
|
|
81
81
|
setLoading(false);
|
|
82
82
|
return true;
|