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.
Files changed (108) hide show
  1. package/lib/module/components/checkboxContainer.js +3 -2
  2. package/lib/module/components/checkboxContainer.js.map +1 -1
  3. package/lib/module/components/header.js +1 -1
  4. package/lib/module/components/header.js.map +1 -1
  5. package/lib/module/components/paymentSelector.js +1 -1
  6. package/lib/module/components/paymentSelector.js.map +1 -1
  7. package/lib/module/components/paymentSuccess.js +2 -7
  8. package/lib/module/components/paymentSuccess.js.map +1 -1
  9. package/lib/module/components/savedCardComponent.js +1 -1
  10. package/lib/module/components/savedCardComponent.js.map +1 -1
  11. package/lib/module/components/subscriptionRow.js +33 -0
  12. package/lib/module/components/subscriptionRow.js.map +1 -0
  13. package/lib/module/interface.js +2 -0
  14. package/lib/module/interface.js.map +1 -1
  15. package/lib/module/screens/addressScreen.js +11 -60
  16. package/lib/module/screens/addressScreen.js.map +1 -1
  17. package/lib/module/screens/bnplScreen.js +3 -2
  18. package/lib/module/screens/bnplScreen.js.map +1 -1
  19. package/lib/module/screens/cardScreen.js +491 -450
  20. package/lib/module/screens/cardScreen.js.map +1 -1
  21. package/lib/module/screens/emiScreen.js +5 -9
  22. package/lib/module/screens/emiScreen.js.map +1 -1
  23. package/lib/module/screens/instantOfferList.js +2 -6
  24. package/lib/module/screens/instantOfferList.js.map +1 -1
  25. package/lib/module/screens/mainScreen.js +54 -6
  26. package/lib/module/screens/mainScreen.js.map +1 -1
  27. package/lib/module/screens/netBankingScreen.js +5 -8
  28. package/lib/module/screens/netBankingScreen.js.map +1 -1
  29. package/lib/module/screens/upiScreen.js +2 -6
  30. package/lib/module/screens/upiScreen.js.map +1 -1
  31. package/lib/module/screens/walletScreen.js +5 -8
  32. package/lib/module/screens/walletScreen.js.map +1 -1
  33. package/lib/module/sdk-version.json +1 -1
  34. package/lib/module/sharedContext/checkoutDetailsHandler.js +8 -2
  35. package/lib/module/sharedContext/checkoutDetailsHandler.js.map +1 -1
  36. package/lib/module/sharedContext/getTextInputTheme.js +15 -0
  37. package/lib/module/sharedContext/getTextInputTheme.js.map +1 -0
  38. package/lib/module/sharedContext/handleAutoNavigation.js +3 -2
  39. package/lib/module/sharedContext/handleAutoNavigation.js.map +1 -1
  40. package/lib/module/styles/indexStyles.js +1 -1
  41. package/lib/module/styles/indexStyles.js.map +1 -1
  42. package/lib/module/styles/screens/bnplScreenStyles.js +2 -3
  43. package/lib/module/styles/screens/bnplScreenStyles.js.map +1 -1
  44. package/lib/module/styles/screens/cardScreenStyles.js +9 -4
  45. package/lib/module/styles/screens/cardScreenStyles.js.map +1 -1
  46. package/lib/module/styles/screens/netBankingScreenStyles.js +2 -3
  47. package/lib/module/styles/screens/netBankingScreenStyles.js.map +1 -1
  48. package/lib/module/styles/screens/walletScreenStyles.js +2 -3
  49. package/lib/module/styles/screens/walletScreenStyles.js.map +1 -1
  50. package/lib/module/utility.js +16 -0
  51. package/lib/module/utility.js.map +1 -1
  52. package/lib/typescript/src/components/checkboxContainer.d.ts.map +1 -1
  53. package/lib/typescript/src/components/subscriptionRow.d.ts +9 -0
  54. package/lib/typescript/src/components/subscriptionRow.d.ts.map +1 -0
  55. package/lib/typescript/src/interface.d.ts +27 -2
  56. package/lib/typescript/src/interface.d.ts.map +1 -1
  57. package/lib/typescript/src/screens/addressScreen.d.ts.map +1 -1
  58. package/lib/typescript/src/screens/cardScreen.d.ts +1 -1
  59. package/lib/typescript/src/screens/cardScreen.d.ts.map +1 -1
  60. package/lib/typescript/src/screens/emiScreen.d.ts.map +1 -1
  61. package/lib/typescript/src/screens/instantOfferList.d.ts.map +1 -1
  62. package/lib/typescript/src/screens/mainScreen.d.ts.map +1 -1
  63. package/lib/typescript/src/screens/netBankingScreen.d.ts.map +1 -1
  64. package/lib/typescript/src/screens/upiScreen.d.ts.map +1 -1
  65. package/lib/typescript/src/screens/walletScreen.d.ts.map +1 -1
  66. package/lib/typescript/src/sharedContext/checkoutDetailsHandler.d.ts.map +1 -1
  67. package/lib/typescript/src/sharedContext/getTextInputTheme.d.ts +7 -0
  68. package/lib/typescript/src/sharedContext/getTextInputTheme.d.ts.map +1 -0
  69. package/lib/typescript/src/sharedContext/handleAutoNavigation.d.ts +1 -1
  70. package/lib/typescript/src/sharedContext/handleAutoNavigation.d.ts.map +1 -1
  71. package/lib/typescript/src/styles/indexStyles.d.ts +1 -1
  72. package/lib/typescript/src/styles/screens/bnplScreenStyles.d.ts +1 -2
  73. package/lib/typescript/src/styles/screens/bnplScreenStyles.d.ts.map +1 -1
  74. package/lib/typescript/src/styles/screens/cardScreenStyles.d.ts +8 -3
  75. package/lib/typescript/src/styles/screens/cardScreenStyles.d.ts.map +1 -1
  76. package/lib/typescript/src/styles/screens/netBankingScreenStyles.d.ts +1 -2
  77. package/lib/typescript/src/styles/screens/netBankingScreenStyles.d.ts.map +1 -1
  78. package/lib/typescript/src/styles/screens/walletScreenStyles.d.ts +1 -2
  79. package/lib/typescript/src/styles/screens/walletScreenStyles.d.ts.map +1 -1
  80. package/lib/typescript/src/utility.d.ts +2 -0
  81. package/lib/typescript/src/utility.d.ts.map +1 -1
  82. package/package.json +2 -2
  83. package/src/components/checkboxContainer.tsx +2 -1
  84. package/src/components/header.tsx +1 -1
  85. package/src/components/paymentSelector.tsx +1 -1
  86. package/src/components/paymentSuccess.tsx +3 -5
  87. package/src/components/savedCardComponent.tsx +1 -1
  88. package/src/components/subscriptionRow.tsx +19 -0
  89. package/src/interface.ts +25 -2
  90. package/src/screens/addressScreen.tsx +11 -60
  91. package/src/screens/bnplScreen.tsx +3 -3
  92. package/src/screens/cardScreen.tsx +190 -126
  93. package/src/screens/emiScreen.tsx +6 -9
  94. package/src/screens/instantOfferList.tsx +2 -6
  95. package/src/screens/mainScreen.tsx +58 -6
  96. package/src/screens/netBankingScreen.tsx +5 -9
  97. package/src/screens/upiScreen.tsx +2 -6
  98. package/src/screens/walletScreen.tsx +5 -9
  99. package/src/sdk-version.json +1 -1
  100. package/src/sharedContext/checkoutDetailsHandler.ts +8 -2
  101. package/src/sharedContext/getTextInputTheme.ts +12 -0
  102. package/src/sharedContext/handleAutoNavigation.ts +4 -1
  103. package/src/styles/indexStyles.ts +1 -1
  104. package/src/styles/screens/bnplScreenStyles.ts +2 -3
  105. package/src/styles/screens/cardScreenStyles.ts +3 -4
  106. package/src/styles/screens/netBankingScreenStyles.ts +2 -3
  107. package/src/styles/screens/walletScreenStyles.ts +2 -3
  108. 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,sBA4ClC,CAAC;AAEF,eAAO,MAAM,yBAAyB,GAAI,SAAS,sBAAsB,SAExE,CAAC;AAEF,eAAO,MAAM,kCAAkC,YA8C9C,CAAC"}
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,7 @@
1
+ export declare const getTextInputTheme: () => {
2
+ colors: {
3
+ primary: string;
4
+ outline: string;
5
+ };
6
+ };
7
+ //# sourceMappingURL=getTextInputTheme.d.ts.map
@@ -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,EAAkB,KAAK,oBAAoB,EAAE,KAAK,YAAY,EAAE,MAAM,cAAc,CAAC;AAK5F,eAAO,MAAM,oBAAoB,GAC7B,gBAAiB,YAAY,EAAE,KAC/B,oBAAoB,GAAG,IA0C1B,CAAA"}
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"}
@@ -48,7 +48,7 @@ declare const styles: {
48
48
  footerText: {
49
49
  fontSize: number;
50
50
  color: string;
51
- marginBottom: number;
51
+ paddingBottom: number;
52
52
  };
53
53
  footerImage: {
54
54
  height: number;
@@ -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: "flex-end";
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyEV,CAAA;AAEF,eAAe,MAAM,CAAA"}
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: "flex-end";
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwJV,CAAA;AAEF,eAAe,MAAM,CAAA"}
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: "flex-end";
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+EV,CAAA;AAEF,eAAe,MAAM,CAAA"}
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: "flex-end";
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2FV,CAAA;AAEF,eAAe,MAAM,CAAA"}
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-beta2",
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-beta2"
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: 8,
56
+ marginLeft: 16,
56
57
  },
57
58
  checkmark: {
58
59
  color: '#fff',
@@ -78,7 +78,7 @@ const styles = StyleSheet.create({
78
78
  color: '#363840'
79
79
  },
80
80
  headerDesc: {
81
- marginTop: -4,
81
+ paddingTop: 2,
82
82
  fontSize: 12,
83
83
  color: '#4F4D55'
84
84
  },
@@ -138,7 +138,7 @@ const PaymentSelector = ({
138
138
  }}
139
139
  >
140
140
  <Text style={[styles.buttonText, {fontFamily: checkoutDetails.fontFamily.semiBold,}]}>
141
- Proceed to Pay{' '}
141
+ Pay{' '}
142
142
  <Text
143
143
  style={{
144
144
  fontFamily: 'Inter-SemiBold',
@@ -256,11 +256,9 @@ const styles = StyleSheet.create({
256
256
  fontSize: 16,
257
257
  },
258
258
  dashedLine: {
259
- borderBottomWidth: 2, // Thickness of the line
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, // Some spacing
264
- marginTop: 16,
261
+ marginVertical: 10,
262
+ height : 2
265
263
  },
266
264
  });
@@ -201,7 +201,7 @@ const SavedCardRow = ({
201
201
  }}
202
202
  >
203
203
  <Text style={[styles.buttonText, {fontFamily: checkoutDetails.fontFamily.semiBold,}]}>
204
- Proceed to Pay{' '}
204
+ Pay{' '}
205
205
  <Text
206
206
  style={{
207
207
  fontFamily: 'Inter-SemiBold',
@@ -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 { PaymentClass, PaymentResultObject, BNPLScreenParams } from '../interface';
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>("NOACTION");
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('Failed');
79
+ setStatus(TransactionStatus.Failed);
80
80
  setFailedModalState(true);
81
81
  setLoading(false);
82
82
  return true;