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,30 +1,32 @@
1
1
  "use strict";
2
2
 
3
- import { View, Text, Image, BackHandler, Pressable, TouchableOpacity, ScrollView } from 'react-native';
3
+ import LottieView from 'lottie-react-native';
4
4
  import { useEffect, useRef, useState } from 'react';
5
- import Header from "../components/header.js";
5
+ import { BackHandler, Image, InputAccessoryView, Keyboard, Platform, Pressable, ScrollView, Text, TouchableOpacity, View } from 'react-native';
6
6
  import { TextInput } from 'react-native-paper';
7
- import LottieView from 'lottie-react-native';
8
- import fetchCardDetails from "../postRequest/fetchCardDetails.js";
9
- import { checkoutDetailsHandler, setCheckOutDetailsHandlerToDefault } from "../sharedContext/checkoutDetailsHandler.js";
10
- import cardPostRequest from "../postRequest/cardPostRequest.js";
7
+ import ShimmerPlaceHolder from 'react-native-shimmer-placeholder';
8
+ import { SvgUri } from 'react-native-svg';
9
+ import Toast from 'react-native-toast-message';
10
+ import CheckBoxContainer from "../components/checkboxContainer.js";
11
+ import CvvInfoBottomSheet from "../components/cvvInfoBottomSheet.js";
12
+ import Header from "../components/header.js";
13
+ import KnowMoreBottomSheet from "../components/knowMoreBottomSheet.js";
11
14
  import PaymentFailed from "../components/paymentFailed.js";
12
15
  import PaymentSuccess from "../components/paymentSuccess.js";
13
16
  import SessionExpire from "../components/sessionExpire.js";
14
- import { APIStatus } from "../interface.js";
15
- import { paymentHandler } from "../sharedContext/paymentStatusHandler.js";
16
- import CvvInfoBottomSheet from "../components/cvvInfoBottomSheet.js";
17
- import WebViewScreen from "./webViewScreen.js";
18
- import fetchStatus from "../postRequest/fetchStatus.js";
19
- import { SvgUri } from 'react-native-svg';
20
- import ShimmerPlaceHolder from 'react-native-shimmer-placeholder';
17
+ import { APIStatus, TransactionStatus } from "../interface.js";
18
+ import cardPostRequest from "../postRequest/cardPostRequest.js";
21
19
  import emiPostRequest from "../postRequest/emiPostRequest.js";
22
- import KnowMoreBottomSheet from "../components/knowMoreBottomSheet.js";
23
- import styles from "../styles/screens/cardScreenStyles.js";
24
- import Toast from 'react-native-toast-message';
20
+ import fetchCardDetails from "../postRequest/fetchCardDetails.js";
21
+ import fetchStatus from "../postRequest/fetchStatus.js";
22
+ import { checkoutDetailsHandler, setCheckOutDetailsHandlerToDefault } from "../sharedContext/checkoutDetailsHandler.js";
25
23
  import { handleFetchStatusResponseHandler, handlePaymentResponse } from "../sharedContext/handlePaymentResponseHandler.js";
24
+ import { paymentHandler } from "../sharedContext/paymentStatusHandler.js";
26
25
  import { setUserDataHandlerToDefault } from "../sharedContext/userdataHandler.js";
27
- import CheckBoxContainer from "../components/checkboxContainer.js";
26
+ import styles from "../styles/screens/cardScreenStyles.js";
27
+ import WebViewScreen from "./webViewScreen.js";
28
+ import SubscriptionRow from "../components/subscriptionRow.js";
29
+ import { getTextInputTheme } from "../sharedContext/getTextInputTheme.js";
28
30
 
29
31
  // Define the screen's navigation properties
30
32
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
@@ -58,7 +60,7 @@ const CardScreen = ({
58
60
  const [cardCvvText, setCardCvvText] = useState(null);
59
61
  const [cardHolderNameText, setCardHolderNameText] = useState(null);
60
62
  const [cardNickNameText, setCardNickNameText] = useState(null);
61
- const [cardSelectedIcon, setCardSelectedIcon] = useState(require('../../assets/images/ic_default_card.png'));
63
+ const [cardSelectedIcon, setCardSelectedIcon] = useState(require('../../assets/images/ic_card.png'));
62
64
  const [maxCvvLength, setMaxCvvLength] = useState(4);
63
65
  const [maxCardNumberLength, setMaxCardNumberLength] = useState(19);
64
66
  const [loading, setLoading] = useState(false);
@@ -91,7 +93,7 @@ const CardScreen = ({
91
93
  const paymentFailedMessage = useRef('You may have cancelled the payment or there was a delay in response. Please retry.');
92
94
  const [sessionExpireModalOpen, setSessionExppireModalState] = useState(false);
93
95
  const [successfulTimeStamp, setSuccessfulTimeStamp] = useState('');
94
- const [status, setStatus] = useState("NOACTION");
96
+ const [status, setStatus] = useState(TransactionStatus.NoAction);
95
97
  const [transactionId, setTransactionId] = useState(null);
96
98
  const backgroundApiInterval = useRef(null);
97
99
  const [imageLoad, setImageLoad] = useState(true);
@@ -99,6 +101,11 @@ const CardScreen = ({
99
101
  const [emiIssuerExist, setEmiIssuerExist] = useState(true);
100
102
  const [emiIssuer, setEmiIssuer] = useState('');
101
103
  const [shopperToken, setShopperToken] = useState(null);
104
+ const cardNumberAccessoryID = "cardNumberAccessoryID";
105
+ const cardExpiryAccessoryID = "cardExpiryAccessoryID";
106
+ const cardCvvAccessoryID = "cardCvvAccessoryID";
107
+ const cardHolderNameAccessoryID = "cardHolderNameAccessoryID";
108
+ const cardNickNameAccessoryID = "cardNickNameAccessoryID";
102
109
  const handleCardNumberTextChange = async text => {
103
110
  if (text == '') {
104
111
  setCardNumberText(text);
@@ -149,7 +156,7 @@ const CardScreen = ({
149
156
  setMaxCvvLength(3);
150
157
  setMaxCardNumberLength(19);
151
158
  } else {
152
- setCardSelectedIcon(require('../../assets/images/ic_default_card.png'));
159
+ setCardSelectedIcon(require('../../assets/images/ic_card.png'));
153
160
  setMaxCvvLength(3);
154
161
  setMaxCardNumberLength(19);
155
162
  }
@@ -173,12 +180,13 @@ const CardScreen = ({
173
180
  });
174
181
  }
175
182
  } else {
176
- setCardSelectedIcon(require('../../assets/images/ic_default_card.png'));
183
+ setCardSelectedIcon(require('../../assets/images/ic_card.png'));
177
184
  setMaxCvvLength(3);
178
185
  setMaxCardNumberLength(19);
179
186
  }
180
187
  }
181
188
  };
189
+ const isSubscriptionDetailsVisible = checkoutDetails.isSubscriptionCheckout && (isSICheckBoxClicked || !checkoutDetails.isSICheckboxVisible);
182
190
  const isValidCardNumberByLuhn = stringInputCardNumber => {
183
191
  const minCardLength = 13;
184
192
  if (stringInputCardNumber.length < minCardLength) {
@@ -201,7 +209,7 @@ const CardScreen = ({
201
209
  const handleCardNumberBlur = () => {
202
210
  const cleaned = cardNumberText?.replace(/ /g, '') || '';
203
211
  const cleanedLength = maxCardNumberLength == 19 ? 16 : 15;
204
- setCardNumberErrorText(cleaned.length < 1 ? 'Required' : checkoutDetails.env === 'test' ? '' : cleaned.length < cleanedLength ? 'This card number is invalid' : !methodEnabled ? 'This card is not supported for the payment' : !cardNumberValid ? 'This card number is invalid' : !emiIssuerExist ? "We couldn't find any EMI plans for this card. Please try using a different card number" : emiIssuer != issuerBrand ? `The card is ${emiIssuer} ${cardType}. Please enter a card number that belongs to ${issuerBrand} ${cardType}` : '');
212
+ setCardNumberErrorText(cleaned.length < 1 ? 'Card Number is required' : checkoutDetails.env === 'test' ? '' : cleaned.length < cleanedLength ? 'This card number is invalid' : !methodEnabled ? 'This card is not supported for the payment' : !cardNumberValid ? 'This card number is invalid' : !emiIssuerExist ? "We couldn't find any EMI plans for this card. Please try using a different card number" : emiIssuer != issuerBrand ? `The card is ${emiIssuer} ${cardType}. Please enter a card number that belongs to ${issuerBrand} ${cardType}` : '');
205
213
  setCardNumberError(cleaned.length < 1 || checkoutDetails.env !== 'test' && (!methodEnabled || !cardNumberValid || !emiIssuerExist || emiIssuer != issuerBrand && durationNumber != undefined && durationNumber != ''));
206
214
  setCardNumberFocused(false);
207
215
  };
@@ -287,26 +295,26 @@ const CardScreen = ({
287
295
  };
288
296
  const handleCardExpiryBlur = () => {
289
297
  const cleaned = cardExpiryText?.replace(/ /g, '') || '';
290
- setCardExpiryErrorText(cleaned.length < 1 ? 'Required' : cleaned.length < 5 || !cardExpiryValid ? 'Expiry is invalid' : '');
298
+ setCardExpiryErrorText(cleaned.length < 1 ? 'Expiry is required' : cleaned.length < 5 || !cardExpiryValid ? 'Expiry is invalid' : '');
291
299
  setCardExpiryError(cleaned.length < 5 || !cardExpiryValid);
292
300
  setCardExpiryFocused(false);
293
301
  };
294
302
  const handleCardCvvBlur = () => {
295
303
  const cleaned = cardCvvText?.replace(/ /g, '') || '';
296
- setCardCvvErrorText(cleaned.length < 1 ? 'Required' : cleaned.length < maxCvvLength ? 'CVV is invalid' : '');
304
+ setCardCvvErrorText(cleaned.length < 1 ? 'CVV is required' : cleaned.length < maxCvvLength ? 'CVV is invalid' : '');
297
305
  setCardCvvError(cleaned.length < maxCvvLength);
298
306
  setCardCvvFocused(false);
299
307
  };
300
308
  const handleCardHolderNameBlur = () => {
301
309
  const cleaned = cardHolderNameText?.replace(/ /g, '') || '';
302
- setCardHolderNameErrorText(cleaned.length < 1 ? 'Required' : '');
310
+ setCardHolderNameErrorText(cleaned.length < 1 ? 'Name is required' : '');
303
311
  setCardHolderNameFocused(false);
304
312
  setCardHolderNameError(cleaned.length < 1);
305
313
  };
306
314
  const handleCardCvvTextChange = text => {
307
315
  setCardCvvText(text);
308
316
  if (text == '') {
309
- setCardCvvErrorText('Required');
317
+ setCardCvvErrorText('CVV is required');
310
318
  setCardCvvError(true);
311
319
  } else {
312
320
  setCardCvvError(false);
@@ -405,7 +413,7 @@ const CardScreen = ({
405
413
  if (showWebView) {
406
414
  setShowWebView(false);
407
415
  paymentFailedMessage.current = checkoutDetails.errorMessage;
408
- setStatus('Failed');
416
+ setStatus(TransactionStatus.Failed);
409
417
  setFailedModalState(true);
410
418
  setLoading(false);
411
419
  return true;
@@ -436,477 +444,510 @@ const CardScreen = ({
436
444
  setShowWebView(true);
437
445
  }
438
446
  }, [paymentHtml]);
439
- return /*#__PURE__*/_jsxs(View, {
440
- style: styles.screenView,
441
- children: [loading ? /*#__PURE__*/_jsxs(View, {
442
- style: styles.loadingContainer,
443
- children: [/*#__PURE__*/_jsx(LottieView, {
444
- source: require('../../assets/animations/boxpayLogo.json'),
445
- autoPlay: true,
446
- loop: true,
447
- style: styles.lottieStyle
448
- }), /*#__PURE__*/_jsx(Text, {
449
- children: "Loading..."
450
- })]
451
- }) : /*#__PURE__*/_jsxs(View, {
452
- style: {
453
- flex: 1
454
- },
455
- children: [/*#__PURE__*/_jsxs(ScrollView, {
456
- contentContainerStyle: styles.screenView,
457
- keyboardShouldPersistTaps: "handled",
458
- children: [/*#__PURE__*/_jsx(Header, {
459
- onBackPress: onProceedBack,
460
- showDesc: true,
461
- showSecure: true,
462
- text: "Pay via Card"
463
- }), /*#__PURE__*/_jsx(View, {
464
- style: styles.divider
465
- }), bankNameStr != '' && bankName != undefined && /*#__PURE__*/_jsxs(View, {
466
- style: styles.container,
467
- children: [/*#__PURE__*/_jsxs(View, {
468
- style: {
469
- flexDirection: 'row',
470
- alignItems: 'center'
471
- },
447
+ return /*#__PURE__*/_jsxs(_Fragment, {
448
+ children: [/*#__PURE__*/_jsxs(View, {
449
+ style: styles.screenView,
450
+ children: [loading ? /*#__PURE__*/_jsxs(View, {
451
+ style: styles.loadingContainer,
452
+ children: [/*#__PURE__*/_jsx(LottieView, {
453
+ source: require('../../assets/animations/boxpayLogo.json'),
454
+ autoPlay: true,
455
+ loop: true,
456
+ style: styles.lottieStyle
457
+ }), /*#__PURE__*/_jsx(Text, {
458
+ children: "Loading..."
459
+ })]
460
+ }) : /*#__PURE__*/_jsxs(View, {
461
+ style: {
462
+ flex: 1
463
+ },
464
+ children: [/*#__PURE__*/_jsxs(ScrollView, {
465
+ contentContainerStyle: styles.screenView,
466
+ keyboardShouldPersistTaps: "handled",
467
+ children: [/*#__PURE__*/_jsx(Header, {
468
+ onBackPress: onProceedBack,
469
+ showDesc: true,
470
+ showSecure: true,
471
+ text: "Pay via Card"
472
+ }), /*#__PURE__*/_jsx(View, {
473
+ style: styles.divider
474
+ }), bankNameStr != '' && bankName != undefined && /*#__PURE__*/_jsxs(View, {
475
+ style: styles.container,
472
476
  children: [/*#__PURE__*/_jsxs(View, {
473
- style: styles.imageContainer,
474
- children: [imageLoad && !imageError && /*#__PURE__*/_jsx(ShimmerPlaceHolder, {
475
- visible: false // Keep shimmer until loading is done
476
- ,
477
- style: {
478
- width: 32,
479
- height: 32,
480
- borderRadius: 8
481
- }
482
- }), !imageError ? /*#__PURE__*/_jsx(SvgUri, {
483
- uri: bankUrlStr || '',
484
- width: 100 // Keep original size
485
- ,
486
- height: 100,
487
- style: {
488
- transform: [{
489
- scale: 0.4
490
- }]
491
- },
492
- onLoad: () => setImageLoad(false),
493
- onError: () => {
494
- setImageError(true);
495
- setImageLoad(false);
496
- }
497
- }) : /*#__PURE__*/_jsx(Image, {
498
- source: require('../../assets/images/ic_netbanking_semi_bold.png'),
499
- style: {
500
- transform: [{
501
- scale: 0.4
502
- }]
503
- }
504
- })]
505
- }), /*#__PURE__*/_jsx(Text, {
506
- style: [styles.nameText, {
507
- fontFamily: checkoutDetails.fontFamily.semiBold
508
- }],
509
- children: bankNameStr
510
- })]
511
- }), /*#__PURE__*/_jsxs(View, {
512
- style: styles.thickBorder,
513
- children: [/*#__PURE__*/_jsxs(Text, {
514
- style: [styles.durationText, {
515
- fontFamily: checkoutDetails.fontFamily.semiBold
516
- }],
517
- children: [duration, " months x", /*#__PURE__*/_jsxs(Text, {
518
- style: styles.currencyText,
519
- children: [' ', checkoutDetails.currencySymbol]
520
- }), amountStr]
521
- }), /*#__PURE__*/_jsxs(Text, {
522
- style: [styles.percentText, {
523
- fontFamily: checkoutDetails.fontFamily.regular
524
- }],
525
- children: ["@", percentNumber, "% p.a."]
526
- })]
527
- })]
528
- }), /*#__PURE__*/_jsx(TextInput, {
529
- mode: "outlined",
530
- label: /*#__PURE__*/_jsx(Text, {
531
- style: [styles.textFieldLabel, {
532
- color: cardNumberFocused ? '#2D2B32' : cardNumberText != '' && cardNumberText != null ? '#2D2B32' : '#ADACB0',
533
- fontFamily: checkoutDetails.fontFamily.regular
534
- }],
535
- children: "Card Number"
536
- }),
537
- value: cardNumberText || '',
538
- onChangeText: it => {
539
- handleCardNumberTextChange(it);
540
- },
541
- theme: {
542
- colors: {
543
- primary: '#2D2B32',
544
- outline: '#E6E6E6'
545
- }
546
- },
547
- style: [styles.textInput, {
548
- marginTop: 28,
549
- marginHorizontal: 16,
550
- fontFamily: checkoutDetails.fontFamily.regular
551
- }],
552
- error: cardNumberError,
553
- right: cardNumberError ? /*#__PURE__*/_jsx(TextInput.Icon, {
554
- icon: () => /*#__PURE__*/_jsx(Image, {
555
- source: require('../../assets/images/ic_upi_error.png'),
556
- style: {
557
- width: 24,
558
- height: 24
559
- }
560
- })
561
- }) : /*#__PURE__*/_jsx(TextInput.Icon, {
562
- icon: () => /*#__PURE__*/_jsx(Image, {
563
- source: cardSelectedIcon,
564
477
  style: {
565
- width: 35,
566
- height: 20
567
- }
568
- })
569
- }),
570
- outlineStyle: {
571
- borderRadius: 8,
572
- // Add this
573
- borderWidth: 1.5
574
- },
575
- keyboardType: "number-pad",
576
- maxLength: maxCardNumberLength,
577
- onFocus: () => {
578
- setCardNumberFocused(true);
579
- setCardNumberError(false);
580
- },
581
- onBlur: handleCardNumberBlur
582
- }), cardNumberError && /*#__PURE__*/_jsx(Text, {
583
- style: [styles.errorText, {
584
- fontFamily: checkoutDetails.fontFamily.regular
585
- }],
586
- children: cardNumberErrorText
587
- }), /*#__PURE__*/_jsxs(View, {
588
- style: styles.expiryCvvContainer,
589
- children: [/*#__PURE__*/_jsxs(View, {
590
- style: {
591
- flex: 1,
592
- flexDirection: 'column'
593
- },
594
- children: [/*#__PURE__*/_jsx(TextInput, {
595
- mode: "outlined",
596
- label: /*#__PURE__*/_jsx(Text, {
597
- style: [styles.textFieldLabel, {
598
- color: cardExpiryFocused ? '#2D2B32' : cardExpiryText != '' && cardExpiryText != null ? '#2D2B32' : '#ADACB0',
599
- fontFamily: checkoutDetails.fontFamily.regular
600
- }],
601
- children: "Expiry (MM/YY)"
602
- }),
603
- value: cardExpiryText || '',
604
- onChangeText: it => {
605
- handleCardExpiryTextChange(it);
478
+ flexDirection: 'row',
479
+ alignItems: 'center'
606
480
  },
607
- theme: {
608
- colors: {
609
- primary: '#2D2B32',
610
- outline: '#E6E6E6'
611
- }
612
- },
613
- style: [styles.textInput, {
614
- fontFamily: checkoutDetails.fontFamily.regular
615
- }],
616
- error: cardExpiryError,
617
- right: cardExpiryError ? /*#__PURE__*/_jsx(TextInput.Icon, {
618
- icon: () => /*#__PURE__*/_jsx(Image, {
619
- source: require('../../assets/images/ic_upi_error.png'),
481
+ children: [/*#__PURE__*/_jsxs(View, {
482
+ style: styles.imageContainer,
483
+ children: [imageLoad && !imageError && /*#__PURE__*/_jsx(ShimmerPlaceHolder, {
484
+ visible: false // Keep shimmer until loading is done
485
+ ,
620
486
  style: {
621
- width: 24,
622
- height: 24
487
+ width: 32,
488
+ height: 32,
489
+ borderRadius: 8
623
490
  }
624
- })
625
- }) : null,
626
- outlineStyle: {
627
- borderRadius: 8,
628
- // Add this
629
- borderWidth: 1.5
630
- },
631
- keyboardType: "number-pad",
632
- maxLength: 5,
633
- onFocus: () => {
634
- setCardExpiryFocused(true);
635
- setCardExpiryError(false);
636
- },
637
- onBlur: handleCardExpiryBlur
638
- }), cardExpiryError && /*#__PURE__*/_jsx(Text, {
639
- style: [styles.errorText, {
640
- fontFamily: checkoutDetails.fontFamily.regular
641
- }],
642
- children: cardExpiryErrorText
643
- })]
644
- }), /*#__PURE__*/_jsxs(View, {
645
- style: {
646
- flex: 1,
647
- flexDirection: 'column',
648
- marginStart: 16
649
- },
650
- children: [/*#__PURE__*/_jsx(TextInput, {
651
- mode: "outlined",
652
- label: /*#__PURE__*/_jsx(Text, {
653
- style: [styles.textFieldLabel, {
654
- color: cardCvvFocused ? '#2D2B32' : cardCvvText != '' && cardCvvText != null ? '#2D2B32' : '#ADACB0',
655
- fontFamily: checkoutDetails.fontFamily.regular
656
- }],
657
- children: "CVV"
658
- }),
659
- value: cardCvvText || '',
660
- onChangeText: it => {
661
- handleCardCvvTextChange(it);
662
- },
663
- theme: {
664
- colors: {
665
- primary: '#2D2B32',
666
- outline: '#E6E6E6'
667
- }
668
- },
669
- style: [styles.textInput, {
670
- fontFamily: checkoutDetails.fontFamily.regular
671
- }],
672
- error: cardCvvError,
673
- right: cardCvvError ? /*#__PURE__*/_jsx(TextInput.Icon, {
674
- icon: () => /*#__PURE__*/_jsx(Image, {
675
- source: require('../../assets/images/ic_upi_error.png'),
491
+ }), !imageError ? /*#__PURE__*/_jsx(SvgUri, {
492
+ uri: bankUrlStr || '',
493
+ width: 100 // Keep original size
494
+ ,
495
+ height: 100,
676
496
  style: {
677
- width: 24,
678
- height: 24
497
+ transform: [{
498
+ scale: 0.4
499
+ }]
500
+ },
501
+ onLoad: () => setImageLoad(false),
502
+ onError: () => {
503
+ setImageError(true);
504
+ setImageLoad(false);
679
505
  }
680
- })
681
- }) : /*#__PURE__*/_jsx(TextInput.Icon, {
682
- icon: () => /*#__PURE__*/_jsx(Image, {
683
- source: require('../../assets/images/ic_cvv_info.png'),
506
+ }) : /*#__PURE__*/_jsx(Image, {
507
+ source: require('../../assets/images/ic_netbanking_semi_bold.png'),
684
508
  style: {
685
- width: 24,
686
- height: 24
509
+ transform: [{
510
+ scale: 0.4
511
+ }]
687
512
  }
688
- }),
689
- onPress: () => {
690
- setShowCvvInfo(true);
691
- }
692
- }),
693
- outlineStyle: {
694
- borderRadius: 8,
695
- // Add this
696
- borderWidth: 1.5
697
- },
698
- keyboardType: "number-pad",
699
- maxLength: maxCvvLength,
700
- secureTextEntry: true,
701
- onBlur: handleCardCvvBlur,
702
- onFocus: () => {
703
- setCardCvvFocused(true);
704
- setCardCvvError(false);
705
- }
706
- }), cardCvvError && /*#__PURE__*/_jsx(Text, {
707
- style: [styles.errorText, {
513
+ })]
514
+ }), /*#__PURE__*/_jsx(Text, {
515
+ style: [styles.nameText, {
516
+ fontFamily: checkoutDetails.fontFamily.semiBold
517
+ }],
518
+ children: bankNameStr
519
+ })]
520
+ }), /*#__PURE__*/_jsxs(View, {
521
+ style: styles.thickBorder,
522
+ children: [/*#__PURE__*/_jsxs(Text, {
523
+ style: [styles.durationText, {
524
+ fontFamily: checkoutDetails.fontFamily.semiBold
525
+ }],
526
+ children: [duration, " months x", /*#__PURE__*/_jsxs(Text, {
527
+ style: styles.currencyText,
528
+ children: [' ', checkoutDetails.currencySymbol]
529
+ }), amountStr]
530
+ }), /*#__PURE__*/_jsxs(Text, {
531
+ style: [styles.percentText, {
532
+ fontFamily: checkoutDetails.fontFamily.regular
533
+ }],
534
+ children: ["@", percentNumber, "% p.a."]
535
+ })]
536
+ })]
537
+ }), /*#__PURE__*/_jsx(TextInput, {
538
+ mode: "outlined",
539
+ label: /*#__PURE__*/_jsx(Text, {
540
+ style: [styles.textFieldLabel, {
541
+ color: cardNumberFocused ? '#2D2B32' : cardNumberText != '' && cardNumberText != null ? '#2D2B32' : '#ADACB0',
708
542
  fontFamily: checkoutDetails.fontFamily.regular
709
543
  }],
710
- children: cardCvvErrorText
711
- })]
712
- })]
713
- }), /*#__PURE__*/_jsx(TextInput, {
714
- mode: "outlined",
715
- label: /*#__PURE__*/_jsx(Text, {
716
- style: [styles.textFieldLabel, {
717
- color: cardHolderNameFocused ? '#2D2B32' : cardHolderNameText != '' && cardHolderNameText != null ? '#2D2B32' : '#ADACB0',
544
+ children: "Card Number*"
545
+ }),
546
+ value: cardNumberText || '',
547
+ onChangeText: it => {
548
+ handleCardNumberTextChange(it);
549
+ },
550
+ theme: getTextInputTheme(),
551
+ inputAccessoryViewID: Platform.OS === 'ios' ? cardNumberAccessoryID : undefined,
552
+ style: [styles.textInput, {
553
+ marginTop: 28,
554
+ marginHorizontal: 16,
718
555
  fontFamily: checkoutDetails.fontFamily.regular
719
556
  }],
720
- children: "Name on the Card"
721
- }),
722
- value: cardHolderNameText || '',
723
- onChangeText: it => {
724
- handleCardHolderNameTextChange(it);
725
- },
726
- theme: {
727
- colors: {
728
- primary: '#2D2B32',
729
- outline: '#E6E6E6'
730
- }
731
- },
732
- style: [styles.textInput, {
733
- marginHorizontal: 16,
734
- marginTop: 16,
735
- fontFamily: checkoutDetails.fontFamily.regular
736
- }],
737
- error: cardHolderNameError,
738
- right: cardHolderNameError ? /*#__PURE__*/_jsx(TextInput.Icon, {
739
- icon: () => /*#__PURE__*/_jsx(Image, {
740
- source: require('../../assets/images/ic_upi_error.png'),
741
- style: {
742
- width: 24,
743
- height: 24
744
- }
745
- })
746
- }) : null,
747
- outlineStyle: {
748
- borderRadius: 8,
749
- // Add this
750
- borderWidth: 1.5
751
- },
752
- onBlur: handleCardHolderNameBlur,
753
- onFocus: () => {
754
- setCardHolderNameFocused(true);
755
- setCardHolderNameError(false);
756
- }
757
- }), cardHolderNameError && /*#__PURE__*/_jsx(Text, {
758
- style: [styles.errorText, {
759
- fontFamily: checkoutDetails.fontFamily.regular
760
- }],
761
- children: cardHolderNameErrorText
762
- }), shopperToken != null && shopperToken != '' && /*#__PURE__*/_jsxs(_Fragment, {
763
- children: [/*#__PURE__*/_jsx(TextInput, {
557
+ error: cardNumberError,
558
+ returnKeyType: "done",
559
+ right: cardNumberError ? /*#__PURE__*/_jsx(TextInput.Icon, {
560
+ icon: () => /*#__PURE__*/_jsx(Image, {
561
+ source: require('../../assets/images/ic_upi_error.png'),
562
+ style: {
563
+ width: 24,
564
+ height: 24
565
+ }
566
+ })
567
+ }) : /*#__PURE__*/_jsx(TextInput.Icon, {
568
+ icon: () => /*#__PURE__*/_jsx(Image, {
569
+ source: cardSelectedIcon,
570
+ style: {
571
+ width: 32,
572
+ height: 20,
573
+ tintColor: cardSelectedIcon === require('../../assets/images/ic_card.png') ? '#6B7280' // Cool Grey 500
574
+ : undefined
575
+ }
576
+ })
577
+ }),
578
+ outlineStyle: {
579
+ borderRadius: 8,
580
+ // Add this
581
+ borderWidth: 1.5
582
+ },
583
+ keyboardType: "number-pad",
584
+ maxLength: maxCardNumberLength,
585
+ onFocus: () => {
586
+ setCardNumberFocused(true);
587
+ setCardNumberError(false);
588
+ },
589
+ onBlur: handleCardNumberBlur
590
+ }), cardNumberError && /*#__PURE__*/_jsx(Text, {
591
+ style: [styles.errorText, {
592
+ fontFamily: checkoutDetails.fontFamily.regular,
593
+ marginHorizontal: 16
594
+ }],
595
+ children: cardNumberErrorText
596
+ }), /*#__PURE__*/_jsx(TextInput, {
764
597
  mode: "outlined",
765
598
  label: /*#__PURE__*/_jsx(Text, {
766
599
  style: [styles.textFieldLabel, {
767
- color: cardNickNameFocused ? '#2D2B32' : cardNickNameText != '' && cardNickNameText != null ? '#2D2B32' : '#ADACB0',
600
+ color: cardHolderNameFocused ? '#2D2B32' : cardHolderNameText != '' && cardHolderNameText != null ? '#2D2B32' : '#ADACB0',
768
601
  fontFamily: checkoutDetails.fontFamily.regular
769
602
  }],
770
- children: "Card NickName (for easy identification)"
603
+ children: "Cardholder Name*"
771
604
  }),
772
- value: cardNickNameText || '',
605
+ value: cardHolderNameText || '',
773
606
  onChangeText: it => {
774
- setCardNickNameText(it);
775
- },
776
- theme: {
777
- colors: {
778
- primary: '#2D2B32',
779
- outline: '#E6E6E6'
780
- }
607
+ handleCardHolderNameTextChange(it);
781
608
  },
609
+ theme: getTextInputTheme(),
782
610
  style: [styles.textInput, {
783
611
  marginHorizontal: 16,
784
612
  marginTop: 16,
785
613
  fontFamily: checkoutDetails.fontFamily.regular
786
614
  }],
615
+ error: cardHolderNameError,
616
+ inputAccessoryViewID: Platform.OS === 'ios' ? cardHolderNameAccessoryID : undefined,
617
+ returnKeyType: "done",
618
+ right: cardHolderNameError ? /*#__PURE__*/_jsx(TextInput.Icon, {
619
+ icon: () => /*#__PURE__*/_jsx(Image, {
620
+ source: require('../../assets/images/ic_upi_error.png'),
621
+ style: {
622
+ width: 24,
623
+ height: 24
624
+ }
625
+ })
626
+ }) : null,
787
627
  outlineStyle: {
788
628
  borderRadius: 8,
789
629
  // Add this
790
630
  borderWidth: 1.5
791
631
  },
792
- onBlur: () => {
793
- setCardNickNameFocused(false);
794
- },
632
+ onBlur: handleCardHolderNameBlur,
795
633
  onFocus: () => {
796
- setCardNickNameFocused(true);
634
+ setCardHolderNameFocused(true);
635
+ setCardHolderNameError(false);
797
636
  }
637
+ }), cardHolderNameError && /*#__PURE__*/_jsx(Text, {
638
+ style: [styles.errorText, {
639
+ fontFamily: checkoutDetails.fontFamily.regular,
640
+ marginHorizontal: 16
641
+ }],
642
+ children: cardHolderNameErrorText
798
643
  }), /*#__PURE__*/_jsxs(View, {
799
- style: styles.infoContainer,
800
- children: [/*#__PURE__*/_jsx(Image, {
801
- source: require('../../assets/images/ic_info.png'),
802
- style: styles.infoIcon
803
- }), /*#__PURE__*/_jsx(Text, {
804
- style: [styles.infoText, {
805
- fontFamily: checkoutDetails.fontFamily.regular
806
- }],
807
- children: "CVV will not be stored"
644
+ style: styles.expiryCvvContainer,
645
+ children: [/*#__PURE__*/_jsxs(View, {
646
+ style: {
647
+ flex: 1,
648
+ flexDirection: 'column'
649
+ },
650
+ children: [/*#__PURE__*/_jsx(TextInput, {
651
+ mode: "outlined",
652
+ label: /*#__PURE__*/_jsx(Text, {
653
+ style: [styles.textFieldLabel, {
654
+ color: cardExpiryFocused ? '#2D2B32' : cardExpiryText != '' && cardExpiryText != null ? '#2D2B32' : '#ADACB0',
655
+ fontFamily: checkoutDetails.fontFamily.regular
656
+ }],
657
+ children: "Expiry (MM/YY)*"
658
+ }),
659
+ value: cardExpiryText || '',
660
+ onChangeText: it => {
661
+ handleCardExpiryTextChange(it);
662
+ },
663
+ theme: getTextInputTheme(),
664
+ inputAccessoryViewID: Platform.OS === 'ios' ? cardExpiryAccessoryID : undefined,
665
+ style: [styles.textInput, {
666
+ fontFamily: checkoutDetails.fontFamily.regular
667
+ }],
668
+ error: cardExpiryError,
669
+ returnKeyType: "done",
670
+ right: cardExpiryError ? /*#__PURE__*/_jsx(TextInput.Icon, {
671
+ icon: () => /*#__PURE__*/_jsx(Image, {
672
+ source: require('../../assets/images/ic_upi_error.png'),
673
+ style: {
674
+ width: 24,
675
+ height: 24
676
+ }
677
+ })
678
+ }) : null,
679
+ outlineStyle: {
680
+ borderRadius: 8,
681
+ // Add this
682
+ borderWidth: 1.5
683
+ },
684
+ keyboardType: "number-pad",
685
+ maxLength: 5,
686
+ onFocus: () => {
687
+ setCardExpiryFocused(true);
688
+ setCardExpiryError(false);
689
+ },
690
+ onBlur: handleCardExpiryBlur
691
+ }), cardExpiryError && /*#__PURE__*/_jsx(Text, {
692
+ style: [styles.errorText, {
693
+ fontFamily: checkoutDetails.fontFamily.regular
694
+ }],
695
+ children: cardExpiryErrorText
696
+ })]
697
+ }), /*#__PURE__*/_jsxs(View, {
698
+ style: {
699
+ flex: 1,
700
+ flexDirection: 'column',
701
+ marginStart: 16
702
+ },
703
+ children: [/*#__PURE__*/_jsx(TextInput, {
704
+ mode: "outlined",
705
+ label: /*#__PURE__*/_jsx(Text, {
706
+ style: [styles.textFieldLabel, {
707
+ color: cardCvvFocused ? '#2D2B32' : cardCvvText != '' && cardCvvText != null ? '#2D2B32' : '#ADACB0',
708
+ fontFamily: checkoutDetails.fontFamily.regular
709
+ }],
710
+ children: "CVV*"
711
+ }),
712
+ value: cardCvvText || '',
713
+ onChangeText: it => {
714
+ handleCardCvvTextChange(it);
715
+ },
716
+ theme: getTextInputTheme(),
717
+ inputAccessoryViewID: Platform.OS === 'ios' ? cardCvvAccessoryID : undefined,
718
+ style: [styles.textInput, {
719
+ fontFamily: checkoutDetails.fontFamily.regular
720
+ }],
721
+ error: cardCvvError,
722
+ returnKeyType: "done",
723
+ right: cardCvvError ? /*#__PURE__*/_jsx(TextInput.Icon, {
724
+ icon: () => /*#__PURE__*/_jsx(Image, {
725
+ source: require('../../assets/images/ic_upi_error.png'),
726
+ style: {
727
+ width: 24,
728
+ height: 24
729
+ }
730
+ })
731
+ }) : /*#__PURE__*/_jsx(TextInput.Icon, {
732
+ icon: () => /*#__PURE__*/_jsx(Image, {
733
+ source: require('../../assets/images/ic_info.png'),
734
+ style: {
735
+ width: 24,
736
+ height: 24,
737
+ tintColor: checkoutDetails.buttonColor
738
+ }
739
+ }),
740
+ onPress: () => {
741
+ setShowCvvInfo(true);
742
+ }
743
+ }),
744
+ outlineStyle: {
745
+ borderRadius: 8,
746
+ // Add this
747
+ borderWidth: 1.5
748
+ },
749
+ keyboardType: "number-pad",
750
+ maxLength: maxCvvLength,
751
+ secureTextEntry: true,
752
+ onBlur: handleCardCvvBlur,
753
+ onFocus: () => {
754
+ setCardCvvFocused(true);
755
+ setCardCvvError(false);
756
+ }
757
+ }), cardCvvError && /*#__PURE__*/_jsx(Text, {
758
+ style: [styles.errorText, {
759
+ fontFamily: checkoutDetails.fontFamily.regular
760
+ }],
761
+ children: cardCvvErrorText
762
+ })]
808
763
  })]
809
- }), /*#__PURE__*/_jsxs(View, {
810
- style: styles.checkBoxContainer,
811
- children: [/*#__PURE__*/_jsx(TouchableOpacity, {
812
- onPress: () => setIsSavedCardCheckBoxClicked(!isSavedCardCheckBoxClicked),
813
- children: /*#__PURE__*/_jsx(View, {
814
- style: [styles.checkboxBox, {
815
- borderColor: checkoutDetails.buttonColor
816
- }, isSavedCardCheckBoxClicked && {
817
- backgroundColor: checkoutDetails.buttonColor
764
+ }), shopperToken != null && shopperToken != '' && /*#__PURE__*/_jsxs(_Fragment, {
765
+ children: [/*#__PURE__*/_jsx(TextInput, {
766
+ mode: "outlined",
767
+ label: /*#__PURE__*/_jsx(Text, {
768
+ style: [styles.textFieldLabel, {
769
+ color: cardNickNameFocused ? '#2D2B32' : cardNickNameText != '' && cardNickNameText != null ? '#2D2B32' : '#ADACB0',
770
+ fontFamily: checkoutDetails.fontFamily.regular
818
771
  }],
819
- children: isSavedCardCheckBoxClicked && /*#__PURE__*/_jsx(Text, {
820
- style: styles.checkmark,
821
- children: "\u2713"
822
- })
823
- })
824
- }), /*#__PURE__*/_jsx(Text, {
825
- style: [styles.checkBoxText, {
772
+ children: "Card NickName (for easy identification)"
773
+ }),
774
+ value: cardNickNameText || '',
775
+ onChangeText: it => {
776
+ setCardNickNameText(it);
777
+ },
778
+ inputAccessoryViewID: Platform.OS === 'ios' ? cardNickNameAccessoryID : undefined,
779
+ theme: getTextInputTheme(),
780
+ style: [styles.textInput, {
781
+ marginHorizontal: 16,
782
+ marginTop: 16,
826
783
  fontFamily: checkoutDetails.fontFamily.regular
827
784
  }],
828
- children: "Save this card as per RBI guidelines."
829
- }), /*#__PURE__*/_jsx(Pressable, {
830
- onPress: () => {
831
- setKnowMoreDialog(true);
785
+ returnKeyType: "done",
786
+ outlineStyle: {
787
+ borderRadius: 8,
788
+ // Add this
789
+ borderWidth: 1.5
832
790
  },
833
- style: {
834
- marginLeft: 4
791
+ onBlur: () => {
792
+ setCardNickNameFocused(false);
835
793
  },
836
- children: /*#__PURE__*/_jsx(Text, {
837
- style: [styles.clickableText, {
838
- color: checkoutDetails.buttonColor,
839
- fontFamily: checkoutDetails.fontFamily.semiBold
794
+ onFocus: () => {
795
+ setCardNickNameFocused(true);
796
+ }
797
+ }), /*#__PURE__*/_jsxs(View, {
798
+ style: styles.infoContainer,
799
+ children: [/*#__PURE__*/_jsx(Image, {
800
+ source: require('../../assets/images/ic_info.png'),
801
+ style: styles.infoIcon
802
+ }), /*#__PURE__*/_jsx(Text, {
803
+ style: [styles.infoText, {
804
+ fontFamily: checkoutDetails.fontFamily.regular
840
805
  }],
841
- children: "Know more"
842
- })
806
+ children: "CVV will not be stored"
807
+ })]
808
+ }), /*#__PURE__*/_jsxs(View, {
809
+ style: styles.checkBoxContainer,
810
+ children: [/*#__PURE__*/_jsx(TouchableOpacity, {
811
+ onPress: () => setIsSavedCardCheckBoxClicked(!isSavedCardCheckBoxClicked),
812
+ children: /*#__PURE__*/_jsx(View, {
813
+ style: [styles.checkboxBox, {
814
+ borderColor: checkoutDetails.buttonColor
815
+ }, isSavedCardCheckBoxClicked && {
816
+ backgroundColor: checkoutDetails.buttonColor
817
+ }],
818
+ children: isSavedCardCheckBoxClicked && /*#__PURE__*/_jsx(Text, {
819
+ style: styles.checkmark,
820
+ children: "\u2713"
821
+ })
822
+ })
823
+ }), /*#__PURE__*/_jsx(Text, {
824
+ style: [styles.checkBoxText, {
825
+ fontFamily: checkoutDetails.fontFamily.regular
826
+ }],
827
+ children: "Save this card as per RBI guidelines."
828
+ }), /*#__PURE__*/_jsx(Pressable, {
829
+ onPress: () => {
830
+ setKnowMoreDialog(true);
831
+ },
832
+ style: {
833
+ marginLeft: 4
834
+ },
835
+ children: /*#__PURE__*/_jsx(Text, {
836
+ style: [styles.clickableText, {
837
+ color: checkoutDetails.buttonColor,
838
+ fontFamily: checkoutDetails.fontFamily.semiBold
839
+ }],
840
+ children: "Know more"
841
+ })
842
+ })]
843
843
  })]
844
+ }), checkoutDetails.isSICheckboxVisible && checkoutDetails.isSubscriptionCheckout && /*#__PURE__*/_jsx(CheckBoxContainer, {
845
+ text: "Set up Standing Instructions (SI) for this payment.",
846
+ isCheckBoxSelected: isSICheckBoxClicked,
847
+ onCheckBoxClicked: () => {
848
+ setIsSICheckBoxClicked(!isSICheckBoxClicked);
849
+ }
850
+ }), isSubscriptionDetailsVisible && /*#__PURE__*/_jsx(View, {
851
+ style: styles.subscriptionContainer,
852
+ children: checkoutDetails.subscriptionDetails && checkoutDetails.subscriptionDetails.map(item => item.value && /*#__PURE__*/_jsx(SubscriptionRow, {
853
+ checkoutDetails: checkoutDetails,
854
+ heading: item.label,
855
+ value: item.value
856
+ }, item.label))
844
857
  })]
845
- }), checkoutDetails.isSICheckboxVisible && checkoutDetails.isSubscriptionCheckout && /*#__PURE__*/_jsx(CheckBoxContainer, {
846
- text: "Set up Standing Instructions (SI) for this payment.",
847
- isCheckBoxSelected: isSICheckBoxClicked,
848
- onCheckBoxClicked: () => {
849
- setIsSICheckBoxClicked(!isSICheckBoxClicked);
850
- }
851
- })]
852
- }), /*#__PURE__*/_jsx(View, {
853
- children: cardValid ? /*#__PURE__*/_jsx(Pressable, {
854
- style: [styles.buttonContainer, {
855
- backgroundColor: checkoutDetails.buttonColor,
856
- borderRadius: checkoutDetails.ctaBorderRadius
857
- }],
858
- onPress: () => {
859
- onProceedForward();
860
- },
861
- children: /*#__PURE__*/_jsx(Text, {
862
- style: [styles.buttonText, {
863
- fontFamily: checkoutDetails.fontFamily.semiBold
858
+ }), /*#__PURE__*/_jsx(View, {
859
+ children: cardValid ? /*#__PURE__*/_jsx(Pressable, {
860
+ style: [styles.buttonContainer, {
861
+ backgroundColor: checkoutDetails.buttonColor,
862
+ borderRadius: checkoutDetails.ctaBorderRadius
864
863
  }],
865
- children: "Make Payment"
866
- })
867
- }) : /*#__PURE__*/_jsx(Pressable, {
868
- style: [styles.buttonContainer, {
869
- backgroundColor: '#E6E6E6',
870
- borderRadius: checkoutDetails.ctaBorderRadius
871
- }],
872
- children: /*#__PURE__*/_jsx(Text, {
873
- style: [styles.buttonText, {
874
- color: checkoutDetails.buttonTextColor,
875
- fontFamily: checkoutDetails.fontFamily.semiBold
864
+ onPress: () => {
865
+ onProceedForward();
866
+ },
867
+ children: /*#__PURE__*/_jsxs(Text, {
868
+ style: [styles.buttonText, {
869
+ fontFamily: checkoutDetails.fontFamily.semiBold
870
+ }],
871
+ children: ["Pay", ' ', /*#__PURE__*/_jsxs(Text, {
872
+ style: {
873
+ fontFamily: 'Inter-SemiBold',
874
+ fontSize: 16,
875
+ color: 'white'
876
+ },
877
+ children: [' ', checkoutDetails.currencySymbol]
878
+ }), checkoutDetails.amount]
879
+ })
880
+ }) : /*#__PURE__*/_jsx(Pressable, {
881
+ style: [styles.buttonContainer, {
882
+ backgroundColor: '#E6E6E6',
883
+ borderRadius: checkoutDetails.ctaBorderRadius
876
884
  }],
877
- children: "Make Payment"
885
+ children: /*#__PURE__*/_jsxs(Text, {
886
+ style: [styles.buttonText, {
887
+ fontFamily: checkoutDetails.fontFamily.semiBold
888
+ }],
889
+ children: ["Pay", ' ', /*#__PURE__*/_jsxs(Text, {
890
+ style: {
891
+ fontFamily: 'Inter-SemiBold',
892
+ fontSize: 16,
893
+ color: 'white'
894
+ },
895
+ children: [' ', checkoutDetails.currencySymbol]
896
+ }), checkoutDetails.amount]
897
+ })
878
898
  })
899
+ })]
900
+ }), failedModalOpen && /*#__PURE__*/_jsx(PaymentFailed, {
901
+ onClick: () => setFailedModalState(false),
902
+ errorMessage: paymentFailedMessage.current
903
+ }), successModalOpen && /*#__PURE__*/_jsx(PaymentSuccess, {
904
+ onClick: onExitCheckout,
905
+ transactionId: transactionId || '',
906
+ method: "Card",
907
+ localDateTime: successfulTimeStamp
908
+ }), sessionExpireModalOpen && /*#__PURE__*/_jsx(SessionExpire, {
909
+ onClick: onExitCheckout
910
+ }), showCvvInfo && /*#__PURE__*/_jsx(CvvInfoBottomSheet, {
911
+ onClick: () => {
912
+ setShowCvvInfo(false);
913
+ }
914
+ }), showKnowMoreDialog && /*#__PURE__*/_jsx(KnowMoreBottomSheet, {
915
+ onClick: () => {
916
+ setKnowMoreDialog(false);
917
+ }
918
+ }), showWebView && /*#__PURE__*/_jsx(View, {
919
+ style: styles.webViewContainer,
920
+ children: /*#__PURE__*/_jsx(WebViewScreen, {
921
+ url: paymentUrl,
922
+ html: paymentHtml,
923
+ onBackPress: () => {
924
+ startBackgroundApiTask();
925
+ setLoading(true);
926
+ setShowWebView(false);
927
+ }
879
928
  })
880
929
  })]
881
- }), failedModalOpen && /*#__PURE__*/_jsx(PaymentFailed, {
882
- onClick: () => setFailedModalState(false),
883
- errorMessage: paymentFailedMessage.current
884
- }), successModalOpen && /*#__PURE__*/_jsx(PaymentSuccess, {
885
- onClick: onExitCheckout,
886
- transactionId: transactionId || '',
887
- method: "Card",
888
- localDateTime: successfulTimeStamp
889
- }), sessionExpireModalOpen && /*#__PURE__*/_jsx(SessionExpire, {
890
- onClick: onExitCheckout
891
- }), showCvvInfo && /*#__PURE__*/_jsx(CvvInfoBottomSheet, {
892
- onClick: () => {
893
- setShowCvvInfo(false);
894
- }
895
- }), showKnowMoreDialog && /*#__PURE__*/_jsx(KnowMoreBottomSheet, {
896
- onClick: () => {
897
- setKnowMoreDialog(false);
898
- }
899
- }), showWebView && /*#__PURE__*/_jsx(View, {
900
- style: styles.webViewContainer,
901
- children: /*#__PURE__*/_jsx(WebViewScreen, {
902
- url: paymentUrl,
903
- html: paymentHtml,
904
- onBackPress: () => {
905
- startBackgroundApiTask();
906
- setLoading(true);
907
- setShowWebView(false);
908
- }
909
- })
930
+ }), Platform.OS === 'ios' && /*#__PURE__*/_jsx(_Fragment, {
931
+ children: [cardNumberAccessoryID, cardExpiryAccessoryID, cardCvvAccessoryID, cardHolderNameAccessoryID, cardNickNameAccessoryID].map(id => /*#__PURE__*/_jsx(InputAccessoryView, {
932
+ nativeID: id,
933
+ children: /*#__PURE__*/_jsx(View, {
934
+ style: {
935
+ backgroundColor: '#f1f1f1',
936
+ padding: 10,
937
+ alignItems: 'flex-end'
938
+ },
939
+ children: /*#__PURE__*/_jsx(TouchableOpacity, {
940
+ onPress: () => Keyboard.dismiss(),
941
+ children: /*#__PURE__*/_jsx(Text, {
942
+ style: {
943
+ fontSize: 16,
944
+ fontFamily: checkoutDetails.fontFamily.semiBold
945
+ },
946
+ children: "Done"
947
+ })
948
+ })
949
+ })
950
+ }, id))
910
951
  })]
911
952
  });
912
953
  };