@zezosoft/react-native-zezopay 1.0.2 → 1.0.4
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/README.md +15 -7
- package/lib/module/index.js +1 -1
- package/lib/module/zezopay/ZezoPay.js +248 -0
- package/lib/module/zezopay/ZezoPay.js.map +1 -0
- package/lib/module/{ZezoPay → zezopay}/components/Header.js +28 -10
- package/lib/module/zezopay/components/Header.js.map +1 -0
- package/lib/module/zezopay/components/PayButton.js +192 -0
- package/lib/module/zezopay/components/PayButton.js.map +1 -0
- package/lib/module/{ZezoPay → zezopay}/components/PaymentMethod.js +96 -70
- package/lib/module/zezopay/components/PaymentMethod.js.map +1 -0
- package/lib/module/{ZezoPay → zezopay}/components/Summary.js +54 -43
- package/lib/module/zezopay/components/Summary.js.map +1 -0
- package/lib/module/zezopay/components/VoucherBox.js +206 -0
- package/lib/module/zezopay/components/VoucherBox.js.map +1 -0
- package/lib/module/zezopay/components/index.js +8 -0
- package/lib/module/zezopay/components/index.js.map +1 -0
- package/lib/module/zezopay/context/ZezoPayContext.js +24 -0
- package/lib/module/zezopay/context/ZezoPayContext.js.map +1 -0
- package/lib/module/zezopay/context/index.js +4 -0
- package/lib/module/zezopay/context/index.js.map +1 -0
- package/lib/module/zezopay/hooks/index.js +5 -0
- package/lib/module/zezopay/hooks/index.js.map +1 -0
- package/lib/module/zezopay/hooks/useAsync.js +44 -0
- package/lib/module/zezopay/hooks/useAsync.js.map +1 -0
- package/lib/module/zezopay/hooks/useZezoPay.helpers.js +217 -0
- package/lib/module/zezopay/hooks/useZezoPay.helpers.js.map +1 -0
- package/lib/module/zezopay/hooks/useZezoPay.js +219 -0
- package/lib/module/zezopay/hooks/useZezoPay.js.map +1 -0
- package/lib/module/zezopay/index.js +10 -0
- package/lib/module/zezopay/index.js.map +1 -0
- package/lib/module/zezopay/payments/providers/iap/IAP.js +201 -0
- package/lib/module/zezopay/payments/providers/iap/IAP.js.map +1 -0
- package/lib/module/zezopay/payments/providers/index.js +12 -0
- package/lib/module/zezopay/payments/providers/index.js.map +1 -0
- package/lib/module/zezopay/payments/providers/payment-gateways.types.d.js +2 -0
- package/lib/module/zezopay/payments/providers/payment-gateways.types.d.js.map +1 -0
- package/lib/module/zezopay/payments/providers/razorpay/Razorpay.js +40 -0
- package/lib/module/zezopay/payments/providers/razorpay/Razorpay.js.map +1 -0
- package/lib/module/zezopay/payments/providers/stripe/Stripe.js +58 -0
- package/lib/module/zezopay/payments/providers/stripe/Stripe.js.map +1 -0
- package/lib/module/zezopay/services/api-sdk.js +24 -0
- package/lib/module/zezopay/services/api-sdk.js.map +1 -0
- package/lib/module/zezopay/services/baseService.js +55 -0
- package/lib/module/zezopay/services/baseService.js.map +1 -0
- package/lib/module/zezopay/services/common.types.js +2 -0
- package/lib/module/zezopay/services/common.types.js.map +1 -0
- package/lib/module/zezopay/services/digitalProducts/digitalProducts.js +72 -0
- package/lib/module/zezopay/services/digitalProducts/digitalProducts.js.map +1 -0
- package/lib/module/zezopay/services/digitalProducts/digitalProducts.types.js +4 -0
- package/lib/module/zezopay/services/digitalProducts/digitalProducts.types.js.map +1 -0
- package/lib/module/zezopay/services/digitalProducts/index.js +5 -0
- package/lib/module/zezopay/services/digitalProducts/index.js.map +1 -0
- package/lib/module/zezopay/services/iap/iap.js +20 -0
- package/lib/module/zezopay/services/iap/iap.js.map +1 -0
- package/lib/module/zezopay/services/iap/iap.types.js +2 -0
- package/lib/module/zezopay/services/iap/iap.types.js.map +1 -0
- package/lib/module/zezopay/services/iap/index.js +5 -0
- package/lib/module/zezopay/services/iap/index.js.map +1 -0
- package/lib/module/zezopay/services/index.js +10 -0
- package/lib/module/zezopay/services/index.js.map +1 -0
- package/lib/module/zezopay/services/payments/index.js +5 -0
- package/lib/module/zezopay/services/payments/index.js.map +1 -0
- package/lib/module/zezopay/services/payments/payments.js +52 -0
- package/lib/module/zezopay/services/payments/payments.js.map +1 -0
- package/lib/module/zezopay/services/payments/payments.types.js +52 -0
- package/lib/module/zezopay/services/payments/payments.types.js.map +1 -0
- package/lib/module/zezopay/services/subscriptions/index.js +5 -0
- package/lib/module/zezopay/services/subscriptions/index.js.map +1 -0
- package/lib/module/zezopay/services/subscriptions/plan/index.js +5 -0
- package/lib/module/zezopay/services/subscriptions/plan/index.js.map +1 -0
- package/lib/module/zezopay/services/subscriptions/plan/plan.js +57 -0
- package/lib/module/zezopay/services/subscriptions/plan/plan.js.map +1 -0
- package/lib/module/zezopay/services/subscriptions/plan/plan.types.js +4 -0
- package/lib/module/zezopay/services/subscriptions/plan/plan.types.js.map +1 -0
- package/lib/module/zezopay/services/utils/errorFormatter.js +49 -0
- package/lib/module/zezopay/services/utils/errorFormatter.js.map +1 -0
- package/lib/module/zezopay/services/utils/index.js +4 -0
- package/lib/module/zezopay/services/utils/index.js.map +1 -0
- package/lib/module/zezopay/theme.js +40 -0
- package/lib/module/zezopay/theme.js.map +1 -0
- package/lib/module/{ZezoPay → zezopay}/types/index.js.map +1 -1
- package/lib/module/{ZezoPay → zezopay}/utils/index.js +2 -1
- package/lib/module/zezopay/utils/index.js.map +1 -0
- package/lib/typescript/src/index.d.ts +1 -1
- package/lib/typescript/src/zezopay/ZezoPay.d.ts.map +1 -0
- package/lib/typescript/src/{ZezoPay → zezopay}/components/Header.d.ts +2 -0
- package/lib/typescript/src/zezopay/components/Header.d.ts.map +1 -0
- package/lib/typescript/src/{ZezoPay → zezopay}/components/PayButton.d.ts +2 -0
- package/lib/typescript/src/zezopay/components/PayButton.d.ts.map +1 -0
- package/lib/typescript/src/zezopay/components/PaymentMethod.d.ts +15 -0
- package/lib/typescript/src/zezopay/components/PaymentMethod.d.ts.map +1 -0
- package/lib/typescript/src/zezopay/components/Summary.d.ts +11 -0
- package/lib/typescript/src/zezopay/components/Summary.d.ts.map +1 -0
- package/lib/typescript/src/zezopay/components/VoucherBox.d.ts +14 -0
- package/lib/typescript/src/zezopay/components/VoucherBox.d.ts.map +1 -0
- package/lib/typescript/src/zezopay/components/index.d.ts +6 -0
- package/lib/typescript/src/zezopay/components/index.d.ts.map +1 -0
- package/lib/typescript/src/zezopay/context/ZezoPayContext.d.ts +10 -0
- package/lib/typescript/src/zezopay/context/ZezoPayContext.d.ts.map +1 -0
- package/lib/typescript/src/zezopay/context/index.d.ts +2 -0
- package/lib/typescript/src/zezopay/context/index.d.ts.map +1 -0
- package/lib/typescript/src/zezopay/hooks/index.d.ts +4 -0
- package/lib/typescript/src/zezopay/hooks/index.d.ts.map +1 -0
- package/lib/typescript/src/zezopay/hooks/useAsync.d.ts +8 -0
- package/lib/typescript/src/zezopay/hooks/useAsync.d.ts.map +1 -0
- package/lib/typescript/src/zezopay/hooks/useZezoPay.d.ts +41 -0
- package/lib/typescript/src/zezopay/hooks/useZezoPay.d.ts.map +1 -0
- package/lib/typescript/src/zezopay/hooks/useZezoPay.helpers.d.ts +23 -0
- package/lib/typescript/src/zezopay/hooks/useZezoPay.helpers.d.ts.map +1 -0
- package/lib/typescript/src/zezopay/index.d.ts +8 -0
- package/lib/typescript/src/zezopay/index.d.ts.map +1 -0
- package/lib/typescript/src/zezopay/payments/providers/iap/IAP.d.ts +17 -0
- package/lib/typescript/src/zezopay/payments/providers/iap/IAP.d.ts.map +1 -0
- package/lib/typescript/src/zezopay/payments/providers/index.d.ts +9 -0
- package/lib/typescript/src/zezopay/payments/providers/index.d.ts.map +1 -0
- package/lib/typescript/src/zezopay/payments/providers/razorpay/Razorpay.d.ts.map +1 -0
- package/lib/typescript/src/zezopay/payments/providers/stripe/Stripe.d.ts +7 -0
- package/lib/typescript/src/zezopay/payments/providers/stripe/Stripe.d.ts.map +1 -0
- package/lib/typescript/src/zezopay/services/api-sdk.d.ts +31 -0
- package/lib/typescript/src/zezopay/services/api-sdk.d.ts.map +1 -0
- package/lib/typescript/src/zezopay/services/baseService.d.ts +9 -0
- package/lib/typescript/src/zezopay/services/baseService.d.ts.map +1 -0
- package/lib/typescript/src/zezopay/services/common.types.d.ts +25 -0
- package/lib/typescript/src/zezopay/services/common.types.d.ts.map +1 -0
- package/lib/typescript/src/zezopay/services/digitalProducts/digitalProducts.d.ts +15 -0
- package/lib/typescript/src/zezopay/services/digitalProducts/digitalProducts.d.ts.map +1 -0
- package/lib/typescript/src/zezopay/services/digitalProducts/digitalProducts.types.d.ts +79 -0
- package/lib/typescript/src/zezopay/services/digitalProducts/digitalProducts.types.d.ts.map +1 -0
- package/lib/typescript/src/zezopay/services/digitalProducts/index.d.ts +3 -0
- package/lib/typescript/src/zezopay/services/digitalProducts/index.d.ts.map +1 -0
- package/lib/typescript/src/zezopay/services/iap/iap.d.ts +13 -0
- package/lib/typescript/src/zezopay/services/iap/iap.d.ts.map +1 -0
- package/lib/typescript/src/zezopay/services/iap/iap.types.d.ts +47 -0
- package/lib/typescript/src/zezopay/services/iap/iap.types.d.ts.map +1 -0
- package/lib/typescript/src/zezopay/services/iap/index.d.ts +3 -0
- package/lib/typescript/src/zezopay/services/iap/index.d.ts.map +1 -0
- package/lib/typescript/src/zezopay/services/index.d.ts +9 -0
- package/lib/typescript/src/zezopay/services/index.d.ts.map +1 -0
- package/lib/typescript/src/zezopay/services/payments/index.d.ts +3 -0
- package/lib/typescript/src/zezopay/services/payments/index.d.ts.map +1 -0
- package/lib/typescript/src/zezopay/services/payments/payments.d.ts +26 -0
- package/lib/typescript/src/zezopay/services/payments/payments.d.ts.map +1 -0
- package/lib/typescript/src/zezopay/services/payments/payments.types.d.ts +121 -0
- package/lib/typescript/src/zezopay/services/payments/payments.types.d.ts.map +1 -0
- package/lib/typescript/src/zezopay/services/subscriptions/index.d.ts +3 -0
- package/lib/typescript/src/zezopay/services/subscriptions/index.d.ts.map +1 -0
- package/lib/typescript/src/zezopay/services/subscriptions/plan/index.d.ts +3 -0
- package/lib/typescript/src/zezopay/services/subscriptions/plan/index.d.ts.map +1 -0
- package/lib/typescript/src/zezopay/services/subscriptions/plan/plan.d.ts +19 -0
- package/lib/typescript/src/zezopay/services/subscriptions/plan/plan.d.ts.map +1 -0
- package/lib/typescript/src/zezopay/services/subscriptions/plan/plan.types.d.ts +64 -0
- package/lib/typescript/src/zezopay/services/subscriptions/plan/plan.types.d.ts.map +1 -0
- package/lib/typescript/src/zezopay/services/utils/errorFormatter.d.ts +6 -0
- package/lib/typescript/src/zezopay/services/utils/errorFormatter.d.ts.map +1 -0
- package/lib/typescript/src/zezopay/services/utils/index.d.ts +2 -0
- package/lib/typescript/src/zezopay/services/utils/index.d.ts.map +1 -0
- package/lib/typescript/src/zezopay/theme.d.ts +38 -0
- package/lib/typescript/src/zezopay/theme.d.ts.map +1 -0
- package/lib/typescript/src/zezopay/types/index.d.ts +85 -0
- package/lib/typescript/src/zezopay/types/index.d.ts.map +1 -0
- package/lib/typescript/src/{ZezoPay → zezopay}/utils/index.d.ts.map +1 -1
- package/package.json +14 -7
- package/lib/module/ZezoPay/Payments/Providers/PaymentGateways.types.d.js +0 -2
- package/lib/module/ZezoPay/Payments/Providers/PaymentGateways.types.d.js.map +0 -1
- package/lib/module/ZezoPay/Payments/Providers/Razorpay/Razorpay.js +0 -39
- package/lib/module/ZezoPay/Payments/Providers/Razorpay/Razorpay.js.map +0 -1
- package/lib/module/ZezoPay/Payments/Providers/index.js +0 -10
- package/lib/module/ZezoPay/Payments/Providers/index.js.map +0 -1
- package/lib/module/ZezoPay/ZezoPay.js +0 -178
- package/lib/module/ZezoPay/ZezoPay.js.map +0 -1
- package/lib/module/ZezoPay/components/Header.js.map +0 -1
- package/lib/module/ZezoPay/components/PayButton.js +0 -143
- package/lib/module/ZezoPay/components/PayButton.js.map +0 -1
- package/lib/module/ZezoPay/components/PaymentMethod.js.map +0 -1
- package/lib/module/ZezoPay/components/Summary.js.map +0 -1
- package/lib/module/ZezoPay/components/VoucherBox.js +0 -124
- package/lib/module/ZezoPay/components/VoucherBox.js.map +0 -1
- package/lib/module/ZezoPay/index.js +0 -5
- package/lib/module/ZezoPay/index.js.map +0 -1
- package/lib/module/ZezoPay/utils/hooks/useAsync.js +0 -32
- package/lib/module/ZezoPay/utils/hooks/useAsync.js.map +0 -1
- package/lib/module/ZezoPay/utils/hooks/useZezoPay.js +0 -265
- package/lib/module/ZezoPay/utils/hooks/useZezoPay.js.map +0 -1
- package/lib/module/ZezoPay/utils/index.js.map +0 -1
- package/lib/typescript/src/ZezoPay/Payments/Providers/Razorpay/Razorpay.d.ts.map +0 -1
- package/lib/typescript/src/ZezoPay/Payments/Providers/index.d.ts +0 -7
- package/lib/typescript/src/ZezoPay/Payments/Providers/index.d.ts.map +0 -1
- package/lib/typescript/src/ZezoPay/ZezoPay.d.ts.map +0 -1
- package/lib/typescript/src/ZezoPay/components/Header.d.ts.map +0 -1
- package/lib/typescript/src/ZezoPay/components/PayButton.d.ts.map +0 -1
- package/lib/typescript/src/ZezoPay/components/PaymentMethod.d.ts +0 -12
- package/lib/typescript/src/ZezoPay/components/PaymentMethod.d.ts.map +0 -1
- package/lib/typescript/src/ZezoPay/components/Summary.d.ts +0 -7
- package/lib/typescript/src/ZezoPay/components/Summary.d.ts.map +0 -1
- package/lib/typescript/src/ZezoPay/components/VoucherBox.d.ts +0 -9
- package/lib/typescript/src/ZezoPay/components/VoucherBox.d.ts.map +0 -1
- package/lib/typescript/src/ZezoPay/index.d.ts +0 -3
- package/lib/typescript/src/ZezoPay/index.d.ts.map +0 -1
- package/lib/typescript/src/ZezoPay/types/index.d.ts +0 -66
- package/lib/typescript/src/ZezoPay/types/index.d.ts.map +0 -1
- package/lib/typescript/src/ZezoPay/utils/hooks/useAsync.d.ts +0 -6
- package/lib/typescript/src/ZezoPay/utils/hooks/useAsync.d.ts.map +0 -1
- package/lib/typescript/src/ZezoPay/utils/hooks/useZezoPay.d.ts +0 -46
- package/lib/typescript/src/ZezoPay/utils/hooks/useZezoPay.d.ts.map +0 -1
- package/src/ZezoPay/Payments/Providers/PaymentGateways.types.d.ts +0 -48
- package/src/ZezoPay/Payments/Providers/Razorpay/Razorpay.ts +0 -46
- package/src/ZezoPay/Payments/Providers/index.ts +0 -8
- package/src/ZezoPay/ZezoPay.tsx +0 -176
- package/src/ZezoPay/components/Header.tsx +0 -107
- package/src/ZezoPay/components/PayButton.tsx +0 -132
- package/src/ZezoPay/components/PaymentMethod.tsx +0 -263
- package/src/ZezoPay/components/Summary.tsx +0 -188
- package/src/ZezoPay/components/VoucherBox.tsx +0 -133
- package/src/ZezoPay/index.ts +0 -2
- package/src/ZezoPay/types/index.ts +0 -70
- package/src/ZezoPay/utils/hooks/useAsync.ts +0 -38
- package/src/ZezoPay/utils/hooks/useZezoPay.ts +0 -320
- package/src/ZezoPay/utils/index.ts +0 -16
- package/src/index.tsx +0 -1
- /package/lib/module/{ZezoPay → zezopay}/types/index.js +0 -0
- /package/lib/typescript/src/{ZezoPay → zezopay}/ZezoPay.d.ts +0 -0
- /package/lib/typescript/src/{ZezoPay/Payments/Providers/Razorpay → zezopay/payments/providers/razorpay}/Razorpay.d.ts +0 -0
- /package/lib/typescript/src/{ZezoPay → zezopay}/utils/index.d.ts +0 -0
package/src/ZezoPay/ZezoPay.tsx
DELETED
|
@@ -1,176 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
View,
|
|
4
|
-
StyleSheet,
|
|
5
|
-
Keyboard,
|
|
6
|
-
TouchableWithoutFeedback,
|
|
7
|
-
StatusBar,
|
|
8
|
-
Text,
|
|
9
|
-
} from 'react-native';
|
|
10
|
-
import { ArrowLeft } from 'lucide-react-native';
|
|
11
|
-
import { scale, verticalScale, moderateScale } from 'react-native-size-matters';
|
|
12
|
-
import { KeyboardAwareScrollView } from 'react-native-keyboard-aware-scroll-view';
|
|
13
|
-
import { SafeAreaProvider, SafeAreaView } from 'react-native-safe-area-context';
|
|
14
|
-
import Header from './components/Header';
|
|
15
|
-
import type { ZezoPayProps } from './types';
|
|
16
|
-
import PaymentMethod from './components/PaymentMethod';
|
|
17
|
-
import { Summary } from './components/Summary';
|
|
18
|
-
import PayButton from './components/PayButton';
|
|
19
|
-
import { useZezoPay } from './utils/hooks/useZezoPay';
|
|
20
|
-
import { formatCurrency } from './utils';
|
|
21
|
-
|
|
22
|
-
const ZezoPay: React.FC<ZezoPayProps> = ({
|
|
23
|
-
title = 'Payments',
|
|
24
|
-
summaryItems,
|
|
25
|
-
onBack,
|
|
26
|
-
userInfo,
|
|
27
|
-
publicKey,
|
|
28
|
-
digitalProductId,
|
|
29
|
-
subscriptionId,
|
|
30
|
-
callback,
|
|
31
|
-
handlePayment,
|
|
32
|
-
}) => {
|
|
33
|
-
const {
|
|
34
|
-
selectedPayment,
|
|
35
|
-
setSelectedPayment,
|
|
36
|
-
summaryItems: items,
|
|
37
|
-
totalPrice,
|
|
38
|
-
isSuccess,
|
|
39
|
-
error,
|
|
40
|
-
isProcessing,
|
|
41
|
-
providers,
|
|
42
|
-
loading,
|
|
43
|
-
providerError,
|
|
44
|
-
removeItem,
|
|
45
|
-
handlePayNow,
|
|
46
|
-
} = useZezoPay({
|
|
47
|
-
publicKey: publicKey,
|
|
48
|
-
userInfo: {
|
|
49
|
-
_id: userInfo._id,
|
|
50
|
-
name: userInfo?.name || '',
|
|
51
|
-
email: userInfo?.email || '',
|
|
52
|
-
},
|
|
53
|
-
subscriptionId: subscriptionId,
|
|
54
|
-
digitalProductId: digitalProductId,
|
|
55
|
-
summaryItems: summaryItems || [],
|
|
56
|
-
callback,
|
|
57
|
-
handlePayment,
|
|
58
|
-
});
|
|
59
|
-
|
|
60
|
-
return (
|
|
61
|
-
<SafeAreaProvider>
|
|
62
|
-
<SafeAreaView style={styles.safeArea} edges={['bottom', 'left', 'right']}>
|
|
63
|
-
<StatusBar
|
|
64
|
-
barStyle="dark-content"
|
|
65
|
-
backgroundColor={styles.safeArea.backgroundColor}
|
|
66
|
-
/>
|
|
67
|
-
<SafeAreaView style={styles.headerSafeArea} edges={['top']}>
|
|
68
|
-
<View style={styles.headerWrapper}>
|
|
69
|
-
<Header
|
|
70
|
-
title={title}
|
|
71
|
-
onBack={onBack}
|
|
72
|
-
leftIcon={<ArrowLeft size={moderateScale(24)} color="#000" />}
|
|
73
|
-
/>
|
|
74
|
-
</View>
|
|
75
|
-
</SafeAreaView>
|
|
76
|
-
|
|
77
|
-
<TouchableWithoutFeedback onPress={Keyboard.dismiss} accessible={false}>
|
|
78
|
-
<View style={styles.container}>
|
|
79
|
-
<KeyboardAwareScrollView
|
|
80
|
-
style={styles.scrollView}
|
|
81
|
-
contentContainerStyle={styles.scrollContent}
|
|
82
|
-
keyboardShouldPersistTaps="handled"
|
|
83
|
-
enableOnAndroid
|
|
84
|
-
extraScrollHeight={verticalScale(20)}
|
|
85
|
-
showsVerticalScrollIndicator={false}
|
|
86
|
-
contentInsetAdjustmentBehavior="never"
|
|
87
|
-
>
|
|
88
|
-
<View style={styles.content}>
|
|
89
|
-
<PaymentMethod
|
|
90
|
-
providers={providers || []}
|
|
91
|
-
onProviderChange={setSelectedPayment}
|
|
92
|
-
selectedProvider={selectedPayment}
|
|
93
|
-
isLoading={loading}
|
|
94
|
-
error={providerError?.message}
|
|
95
|
-
/>
|
|
96
|
-
|
|
97
|
-
<Summary items={items} onRemoveItem={removeItem} />
|
|
98
|
-
</View>
|
|
99
|
-
</KeyboardAwareScrollView>
|
|
100
|
-
|
|
101
|
-
{/* Bottom container for error + PayButton */}
|
|
102
|
-
<View style={styles.bottomContainer}>
|
|
103
|
-
{error ? (
|
|
104
|
-
<View style={styles.errorWrapper}>
|
|
105
|
-
<Text style={styles.errorText}>{error}</Text>
|
|
106
|
-
</View>
|
|
107
|
-
) : null}
|
|
108
|
-
|
|
109
|
-
<PayButton
|
|
110
|
-
onPaymentInitiate={handlePayNow}
|
|
111
|
-
status={
|
|
112
|
-
isSuccess
|
|
113
|
-
? 'success'
|
|
114
|
-
: isProcessing
|
|
115
|
-
? 'processing'
|
|
116
|
-
: !selectedPayment || totalPrice === 0
|
|
117
|
-
? 'disabled'
|
|
118
|
-
: 'idle'
|
|
119
|
-
}
|
|
120
|
-
paymentButtonText={`Pay ${formatCurrency({
|
|
121
|
-
amount: totalPrice,
|
|
122
|
-
minimumFractionDigits: 0,
|
|
123
|
-
})}`}
|
|
124
|
-
noteText="Powered by Zezo Pay"
|
|
125
|
-
/>
|
|
126
|
-
</View>
|
|
127
|
-
</View>
|
|
128
|
-
</TouchableWithoutFeedback>
|
|
129
|
-
</SafeAreaView>
|
|
130
|
-
</SafeAreaProvider>
|
|
131
|
-
);
|
|
132
|
-
};
|
|
133
|
-
|
|
134
|
-
const styles = StyleSheet.create({
|
|
135
|
-
safeArea: { flex: 1, backgroundColor: '#FFFFFF' },
|
|
136
|
-
headerSafeArea: { backgroundColor: '#FFFFFF' },
|
|
137
|
-
headerWrapper: {
|
|
138
|
-
borderBottomWidth: 1,
|
|
139
|
-
borderBottomColor: '#E5E7EB',
|
|
140
|
-
zIndex: 10,
|
|
141
|
-
},
|
|
142
|
-
container: { flex: 1, position: 'relative' },
|
|
143
|
-
scrollView: { flex: 1, paddingBottom: verticalScale(80) },
|
|
144
|
-
scrollContent: {
|
|
145
|
-
flexGrow: 1,
|
|
146
|
-
paddingTop: verticalScale(10),
|
|
147
|
-
paddingBottom: verticalScale(80),
|
|
148
|
-
},
|
|
149
|
-
content: { paddingHorizontal: scale(16) },
|
|
150
|
-
bottomContainer: {
|
|
151
|
-
position: 'absolute',
|
|
152
|
-
bottom: 0,
|
|
153
|
-
left: 0,
|
|
154
|
-
right: 0,
|
|
155
|
-
paddingHorizontal: scale(16),
|
|
156
|
-
paddingVertical: verticalScale(16),
|
|
157
|
-
backgroundColor: '#FFFFFF',
|
|
158
|
-
borderTopWidth: 1,
|
|
159
|
-
borderTopColor: '#E5E7EB',
|
|
160
|
-
alignItems: 'center',
|
|
161
|
-
zIndex: 5,
|
|
162
|
-
},
|
|
163
|
-
errorWrapper: {
|
|
164
|
-
marginBottom: verticalScale(8),
|
|
165
|
-
width: '100%',
|
|
166
|
-
alignItems: 'center',
|
|
167
|
-
},
|
|
168
|
-
errorText: {
|
|
169
|
-
color: '#DC2626',
|
|
170
|
-
fontSize: moderateScale(14),
|
|
171
|
-
fontWeight: '500',
|
|
172
|
-
textAlign: 'center',
|
|
173
|
-
},
|
|
174
|
-
});
|
|
175
|
-
|
|
176
|
-
export default ZezoPay;
|
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { View, Text, Pressable, StyleSheet, Platform } from 'react-native';
|
|
3
|
-
import type { ViewStyle, TextStyle } from 'react-native';
|
|
4
|
-
import { ArrowLeft } from 'lucide-react-native';
|
|
5
|
-
import { scale, moderateScale } from 'react-native-size-matters';
|
|
6
|
-
|
|
7
|
-
export interface HeaderProps {
|
|
8
|
-
title: string;
|
|
9
|
-
titleStyle?: TextStyle;
|
|
10
|
-
containerStyle?: ViewStyle;
|
|
11
|
-
leftIcon?: React.ReactNode;
|
|
12
|
-
onBack?: () => void;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
const Header: React.FC<HeaderProps> = ({
|
|
16
|
-
title,
|
|
17
|
-
titleStyle,
|
|
18
|
-
containerStyle,
|
|
19
|
-
leftIcon,
|
|
20
|
-
onBack,
|
|
21
|
-
}) => {
|
|
22
|
-
return (
|
|
23
|
-
<View style={[styles.header, containerStyle]}>
|
|
24
|
-
{/* Left Button Container */}
|
|
25
|
-
<View style={styles.gridItemLeft}>
|
|
26
|
-
<View style={styles.backBtnContainer}>
|
|
27
|
-
<Pressable
|
|
28
|
-
onPress={onBack}
|
|
29
|
-
android_ripple={{
|
|
30
|
-
color: 'rgba(0,0,0,0.1)',
|
|
31
|
-
borderless: false,
|
|
32
|
-
radius: scale(100),
|
|
33
|
-
}}
|
|
34
|
-
style={({ pressed }) => [
|
|
35
|
-
styles.backBtnWrapper,
|
|
36
|
-
pressed && Platform.OS === 'ios' && styles.backBtnPressed,
|
|
37
|
-
]}
|
|
38
|
-
hitSlop={10}
|
|
39
|
-
>
|
|
40
|
-
<View style={styles.backBtn}>
|
|
41
|
-
{leftIcon ? (
|
|
42
|
-
leftIcon
|
|
43
|
-
) : (
|
|
44
|
-
<ArrowLeft size={moderateScale(20)} color="#000" />
|
|
45
|
-
)}
|
|
46
|
-
</View>
|
|
47
|
-
</Pressable>
|
|
48
|
-
</View>
|
|
49
|
-
</View>
|
|
50
|
-
|
|
51
|
-
{/* Title */}
|
|
52
|
-
<View style={styles.gridItem}>
|
|
53
|
-
<Text style={[styles.title, titleStyle]} numberOfLines={1}>
|
|
54
|
-
{title}
|
|
55
|
-
</Text>
|
|
56
|
-
</View>
|
|
57
|
-
|
|
58
|
-
<View style={styles.gridItem} />
|
|
59
|
-
</View>
|
|
60
|
-
);
|
|
61
|
-
};
|
|
62
|
-
|
|
63
|
-
const styles = StyleSheet.create({
|
|
64
|
-
header: {
|
|
65
|
-
flexDirection: 'row',
|
|
66
|
-
alignItems: 'center',
|
|
67
|
-
width: '100%',
|
|
68
|
-
height: scale(44),
|
|
69
|
-
paddingHorizontal: scale(16),
|
|
70
|
-
justifyContent: 'space-between',
|
|
71
|
-
},
|
|
72
|
-
gridItem: {
|
|
73
|
-
flex: 1,
|
|
74
|
-
alignItems: 'center',
|
|
75
|
-
justifyContent: 'center',
|
|
76
|
-
},
|
|
77
|
-
gridItemLeft: {
|
|
78
|
-
flex: 1,
|
|
79
|
-
alignItems: 'flex-start',
|
|
80
|
-
justifyContent: 'center',
|
|
81
|
-
},
|
|
82
|
-
backBtnContainer: {
|
|
83
|
-
borderRadius: scale(100),
|
|
84
|
-
overflow: 'hidden', // crucial for Android ripple
|
|
85
|
-
},
|
|
86
|
-
backBtnWrapper: {
|
|
87
|
-
borderRadius: scale(100),
|
|
88
|
-
},
|
|
89
|
-
backBtn: {
|
|
90
|
-
justifyContent: 'center',
|
|
91
|
-
alignItems: 'center',
|
|
92
|
-
padding: scale(10),
|
|
93
|
-
width: scale(35),
|
|
94
|
-
height: scale(35),
|
|
95
|
-
},
|
|
96
|
-
backBtnPressed: {
|
|
97
|
-
backgroundColor: 'rgba(0,0,0,0.1)', // iOS pressed effect
|
|
98
|
-
},
|
|
99
|
-
title: {
|
|
100
|
-
fontSize: moderateScale(18),
|
|
101
|
-
fontWeight: '700',
|
|
102
|
-
color: '#000',
|
|
103
|
-
textAlign: 'center',
|
|
104
|
-
},
|
|
105
|
-
});
|
|
106
|
-
|
|
107
|
-
export default Header;
|
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
View,
|
|
4
|
-
Text,
|
|
5
|
-
Pressable,
|
|
6
|
-
StyleSheet,
|
|
7
|
-
ActivityIndicator,
|
|
8
|
-
} from 'react-native';
|
|
9
|
-
import { scale, verticalScale, moderateScale } from 'react-native-size-matters';
|
|
10
|
-
import LinearGradient from 'react-native-linear-gradient';
|
|
11
|
-
import { Check } from 'lucide-react-native';
|
|
12
|
-
|
|
13
|
-
interface PayButtonProps {
|
|
14
|
-
onPaymentInitiate: () => void;
|
|
15
|
-
status?: 'idle' | 'processing' | 'success' | 'disabled';
|
|
16
|
-
paymentButtonText?: string;
|
|
17
|
-
paymentProcessingText?: string;
|
|
18
|
-
paymentSuccessText?: string;
|
|
19
|
-
noteText?: string;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
const PayButton: React.FC<PayButtonProps> = ({
|
|
23
|
-
onPaymentInitiate,
|
|
24
|
-
status = 'idle',
|
|
25
|
-
paymentButtonText = 'Pay Now',
|
|
26
|
-
paymentProcessingText = 'Processing...',
|
|
27
|
-
paymentSuccessText = 'Payment Successful',
|
|
28
|
-
noteText = 'Powered by Zezo Pay',
|
|
29
|
-
}) => {
|
|
30
|
-
const colorsMap = {
|
|
31
|
-
idle: ['#0251ca', '#063482'],
|
|
32
|
-
processing: ['#0a84ff', '#1784e6'],
|
|
33
|
-
success: ['#28a745', '#1c7c31'],
|
|
34
|
-
disabled: ['#556fadff', '#3d71e9ff'],
|
|
35
|
-
};
|
|
36
|
-
|
|
37
|
-
return (
|
|
38
|
-
<View style={styles.container}>
|
|
39
|
-
{status === 'success' ? (
|
|
40
|
-
<View style={styles.shadowWrapper}>
|
|
41
|
-
<LinearGradient
|
|
42
|
-
colors={colorsMap.success}
|
|
43
|
-
start={{ x: 0, y: 0 }}
|
|
44
|
-
end={{ x: 1, y: 0 }}
|
|
45
|
-
style={styles.paymentButton}
|
|
46
|
-
>
|
|
47
|
-
<Check size={20} color="#fff" />
|
|
48
|
-
<Text style={[styles.successText, { marginLeft: scale(8) }]}>
|
|
49
|
-
{paymentSuccessText}
|
|
50
|
-
</Text>
|
|
51
|
-
</LinearGradient>
|
|
52
|
-
</View>
|
|
53
|
-
) : (
|
|
54
|
-
<Pressable
|
|
55
|
-
onPress={onPaymentInitiate}
|
|
56
|
-
disabled={status === 'processing' || status === 'disabled'}
|
|
57
|
-
style={({ pressed }) => [
|
|
58
|
-
{ opacity: pressed ? 0.85 : 1, width: '100%' },
|
|
59
|
-
]}
|
|
60
|
-
>
|
|
61
|
-
<View style={styles.shadowWrapper}>
|
|
62
|
-
<LinearGradient
|
|
63
|
-
colors={colorsMap[status]}
|
|
64
|
-
start={{ x: 0, y: 0 }}
|
|
65
|
-
end={{ x: 1, y: 0 }}
|
|
66
|
-
style={styles.paymentButton}
|
|
67
|
-
>
|
|
68
|
-
{status === 'processing' ? (
|
|
69
|
-
<View style={{ flexDirection: 'row', alignItems: 'center' }}>
|
|
70
|
-
<ActivityIndicator
|
|
71
|
-
color="#fff"
|
|
72
|
-
style={{ marginRight: scale(8) }}
|
|
73
|
-
/>
|
|
74
|
-
<Text style={styles.paymentText}>
|
|
75
|
-
{paymentProcessingText}
|
|
76
|
-
</Text>
|
|
77
|
-
</View>
|
|
78
|
-
) : (
|
|
79
|
-
<Text style={styles.paymentText}>{paymentButtonText}</Text>
|
|
80
|
-
)}
|
|
81
|
-
</LinearGradient>
|
|
82
|
-
</View>
|
|
83
|
-
</Pressable>
|
|
84
|
-
)}
|
|
85
|
-
|
|
86
|
-
{noteText && <Text style={styles.noteText}>{noteText}</Text>}
|
|
87
|
-
</View>
|
|
88
|
-
);
|
|
89
|
-
};
|
|
90
|
-
|
|
91
|
-
const styles = StyleSheet.create({
|
|
92
|
-
container: { width: '100%', alignItems: 'center' },
|
|
93
|
-
shadowWrapper: {
|
|
94
|
-
width: '100%',
|
|
95
|
-
height: verticalScale(50),
|
|
96
|
-
borderRadius: scale(12),
|
|
97
|
-
shadowColor: '#000',
|
|
98
|
-
shadowOffset: { width: 0, height: 3 },
|
|
99
|
-
shadowOpacity: 0.2,
|
|
100
|
-
shadowRadius: 4,
|
|
101
|
-
elevation: 3,
|
|
102
|
-
backgroundColor: '#0000',
|
|
103
|
-
justifyContent: 'center',
|
|
104
|
-
},
|
|
105
|
-
paymentButton: {
|
|
106
|
-
width: '100%',
|
|
107
|
-
height: '100%',
|
|
108
|
-
borderRadius: scale(12),
|
|
109
|
-
justifyContent: 'center',
|
|
110
|
-
alignItems: 'center',
|
|
111
|
-
flexDirection: 'row',
|
|
112
|
-
},
|
|
113
|
-
paymentText: {
|
|
114
|
-
color: '#fff',
|
|
115
|
-
fontSize: moderateScale(18),
|
|
116
|
-
fontWeight: '700',
|
|
117
|
-
},
|
|
118
|
-
successText: {
|
|
119
|
-
color: '#fff',
|
|
120
|
-
fontSize: moderateScale(18),
|
|
121
|
-
fontWeight: '700',
|
|
122
|
-
},
|
|
123
|
-
noteText: {
|
|
124
|
-
marginTop: verticalScale(10),
|
|
125
|
-
fontSize: moderateScale(13),
|
|
126
|
-
fontWeight: '600',
|
|
127
|
-
color: '#FF7847',
|
|
128
|
-
textAlign: 'center',
|
|
129
|
-
},
|
|
130
|
-
});
|
|
131
|
-
|
|
132
|
-
export default PayButton;
|
|
@@ -1,263 +0,0 @@
|
|
|
1
|
-
import type { PaymentProviderData } from '@zezosoft/zezopay-client';
|
|
2
|
-
import React, { memo, useCallback } from 'react';
|
|
3
|
-
import { Pressable, StyleSheet, Text, View, Animated } from 'react-native';
|
|
4
|
-
import { scale, moderateScale, verticalScale } from 'react-native-size-matters';
|
|
5
|
-
|
|
6
|
-
interface PaymentMethodProps {
|
|
7
|
-
providers: PaymentProviderData[];
|
|
8
|
-
selectedProvider: string | null;
|
|
9
|
-
onProviderChange: (provider: string) => void;
|
|
10
|
-
isLoading?: boolean;
|
|
11
|
-
error?: string | null;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
const COLORS = {
|
|
15
|
-
background: '#ffffff',
|
|
16
|
-
lightGray: '#f9fafb',
|
|
17
|
-
grayBorder: '#e5e7eb',
|
|
18
|
-
grayText: '#6b7280',
|
|
19
|
-
darkText: '#111827',
|
|
20
|
-
logoFallback: '#9ca3af',
|
|
21
|
-
skeleton: '#d1d5db',
|
|
22
|
-
error: '#dc2626',
|
|
23
|
-
selectedBorder: '#2563EB',
|
|
24
|
-
selectedBackground: '#eff6ff',
|
|
25
|
-
radioBorder: '#9ca3af',
|
|
26
|
-
};
|
|
27
|
-
|
|
28
|
-
const ProviderLogo: React.FC<{
|
|
29
|
-
name: string;
|
|
30
|
-
logo?: string;
|
|
31
|
-
isLoading?: boolean;
|
|
32
|
-
}> = ({ name, logo, isLoading }) => {
|
|
33
|
-
if (isLoading) return <View style={styles.skeletonLogo} />;
|
|
34
|
-
|
|
35
|
-
if (logo) {
|
|
36
|
-
return (
|
|
37
|
-
<View style={styles.logoWrapper}>
|
|
38
|
-
<Animated.Image
|
|
39
|
-
source={{ uri: logo }}
|
|
40
|
-
style={styles.logo}
|
|
41
|
-
accessibilityLabel={`${name} logo`}
|
|
42
|
-
/>
|
|
43
|
-
</View>
|
|
44
|
-
);
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
return (
|
|
48
|
-
<View style={styles.logoFallback}>
|
|
49
|
-
<Text style={styles.logoFallbackText}>{name[0]}</Text>
|
|
50
|
-
</View>
|
|
51
|
-
);
|
|
52
|
-
};
|
|
53
|
-
|
|
54
|
-
const ProviderItem: React.FC<{
|
|
55
|
-
provider: PaymentProviderData;
|
|
56
|
-
isProviderSelected: boolean;
|
|
57
|
-
isLoading: boolean;
|
|
58
|
-
onPress: (provider: string) => void;
|
|
59
|
-
}> = memo(({ provider, isProviderSelected, isLoading, onPress }) => (
|
|
60
|
-
<Pressable
|
|
61
|
-
onPress={() => onPress(provider.provider)}
|
|
62
|
-
key={provider.provider}
|
|
63
|
-
style={[
|
|
64
|
-
styles.gatewayItem,
|
|
65
|
-
isProviderSelected && styles.gatewaySelected,
|
|
66
|
-
isLoading && styles.disabled,
|
|
67
|
-
]}
|
|
68
|
-
disabled={isLoading}
|
|
69
|
-
accessibilityState={{ selected: isProviderSelected, disabled: isLoading }}
|
|
70
|
-
>
|
|
71
|
-
<View style={styles.providerContainer}>
|
|
72
|
-
<ProviderLogo
|
|
73
|
-
name={provider.provider}
|
|
74
|
-
logo={provider.logo}
|
|
75
|
-
isLoading={isLoading}
|
|
76
|
-
/>
|
|
77
|
-
{isLoading ? (
|
|
78
|
-
<View style={styles.skeletonText} />
|
|
79
|
-
) : (
|
|
80
|
-
<Text style={styles.gatewayText}>{provider.provider}</Text>
|
|
81
|
-
)}
|
|
82
|
-
</View>
|
|
83
|
-
<View style={[styles.radio, isProviderSelected && styles.radioSelected]}>
|
|
84
|
-
{isProviderSelected && <View style={styles.radioDot} />}
|
|
85
|
-
</View>
|
|
86
|
-
</Pressable>
|
|
87
|
-
));
|
|
88
|
-
|
|
89
|
-
const PaymentMethod: React.FC<PaymentMethodProps> = ({
|
|
90
|
-
providers,
|
|
91
|
-
selectedProvider,
|
|
92
|
-
onProviderChange,
|
|
93
|
-
isLoading = false,
|
|
94
|
-
error = null,
|
|
95
|
-
}) => {
|
|
96
|
-
const handleProviderChange = useCallback(
|
|
97
|
-
(provider: string) => onProviderChange(provider),
|
|
98
|
-
[onProviderChange]
|
|
99
|
-
);
|
|
100
|
-
|
|
101
|
-
const skeletonItems = Array.from({ length: 3 }, (_, i) => ({
|
|
102
|
-
provider: `loading-${i}`,
|
|
103
|
-
logo: '',
|
|
104
|
-
}));
|
|
105
|
-
|
|
106
|
-
return (
|
|
107
|
-
<View style={styles.container}>
|
|
108
|
-
<Text style={styles.title} accessibilityRole="header">
|
|
109
|
-
Payment Gateways
|
|
110
|
-
</Text>
|
|
111
|
-
|
|
112
|
-
{error ? (
|
|
113
|
-
<View style={styles.noProvidersWrapper}>
|
|
114
|
-
<Text style={styles.errorText}>{error}</Text>
|
|
115
|
-
</View>
|
|
116
|
-
) : (
|
|
117
|
-
<>
|
|
118
|
-
{(isLoading ? skeletonItems : providers).map((provider) => (
|
|
119
|
-
<ProviderItem
|
|
120
|
-
key={provider.provider}
|
|
121
|
-
provider={provider as PaymentProviderData}
|
|
122
|
-
isProviderSelected={provider.provider === selectedProvider}
|
|
123
|
-
isLoading={isLoading}
|
|
124
|
-
onPress={handleProviderChange}
|
|
125
|
-
/>
|
|
126
|
-
))}
|
|
127
|
-
|
|
128
|
-
{!isLoading && providers.length === 0 && (
|
|
129
|
-
<View style={styles.noProvidersWrapper}>
|
|
130
|
-
<Text style={styles.noProvidersText}>
|
|
131
|
-
No payment gateways available
|
|
132
|
-
</Text>
|
|
133
|
-
</View>
|
|
134
|
-
)}
|
|
135
|
-
</>
|
|
136
|
-
)}
|
|
137
|
-
</View>
|
|
138
|
-
);
|
|
139
|
-
};
|
|
140
|
-
|
|
141
|
-
const styles = StyleSheet.create({
|
|
142
|
-
container: {
|
|
143
|
-
padding: scale(16),
|
|
144
|
-
backgroundColor: COLORS.background,
|
|
145
|
-
position: 'relative',
|
|
146
|
-
borderRadius: scale(12),
|
|
147
|
-
elevation: 4,
|
|
148
|
-
marginBottom: verticalScale(16),
|
|
149
|
-
shadowColor: '#000',
|
|
150
|
-
shadowOpacity: 0.05,
|
|
151
|
-
shadowRadius: 10,
|
|
152
|
-
shadowOffset: { width: 0, height: 2 },
|
|
153
|
-
flexShrink: 1,
|
|
154
|
-
},
|
|
155
|
-
title: {
|
|
156
|
-
fontSize: moderateScale(16),
|
|
157
|
-
fontWeight: '700',
|
|
158
|
-
marginBottom: verticalScale(8),
|
|
159
|
-
color: COLORS.darkText,
|
|
160
|
-
},
|
|
161
|
-
errorText: {
|
|
162
|
-
fontSize: moderateScale(14),
|
|
163
|
-
color: COLORS.error,
|
|
164
|
-
textAlign: 'center',
|
|
165
|
-
marginVertical: verticalScale(16),
|
|
166
|
-
},
|
|
167
|
-
noProvidersWrapper: {
|
|
168
|
-
flex: 1,
|
|
169
|
-
justifyContent: 'center',
|
|
170
|
-
alignItems: 'center',
|
|
171
|
-
minHeight: 150,
|
|
172
|
-
},
|
|
173
|
-
noProvidersText: {
|
|
174
|
-
fontSize: moderateScale(14),
|
|
175
|
-
color: COLORS.grayText,
|
|
176
|
-
textAlign: 'center',
|
|
177
|
-
},
|
|
178
|
-
gatewayItem: {
|
|
179
|
-
flexDirection: 'row',
|
|
180
|
-
justifyContent: 'space-between',
|
|
181
|
-
alignItems: 'center',
|
|
182
|
-
padding: scale(10),
|
|
183
|
-
borderRadius: scale(10),
|
|
184
|
-
backgroundColor: COLORS.lightGray,
|
|
185
|
-
borderWidth: 1,
|
|
186
|
-
borderColor: COLORS.grayBorder,
|
|
187
|
-
marginBottom: verticalScale(8),
|
|
188
|
-
},
|
|
189
|
-
gatewaySelected: {
|
|
190
|
-
borderColor: COLORS.selectedBorder,
|
|
191
|
-
backgroundColor: COLORS.selectedBackground,
|
|
192
|
-
},
|
|
193
|
-
disabled: { opacity: 0.6 },
|
|
194
|
-
providerContainer: { flexDirection: 'row', alignItems: 'center' },
|
|
195
|
-
logoWrapper: {
|
|
196
|
-
width: scale(32),
|
|
197
|
-
height: scale(32),
|
|
198
|
-
backgroundColor: COLORS.background,
|
|
199
|
-
borderRadius: scale(6),
|
|
200
|
-
padding: scale(3),
|
|
201
|
-
alignItems: 'center',
|
|
202
|
-
justifyContent: 'center',
|
|
203
|
-
marginRight: scale(12),
|
|
204
|
-
},
|
|
205
|
-
logo: {
|
|
206
|
-
width: '100%',
|
|
207
|
-
height: '100%',
|
|
208
|
-
resizeMode: 'contain',
|
|
209
|
-
borderRadius: scale(4),
|
|
210
|
-
},
|
|
211
|
-
skeletonLogo: {
|
|
212
|
-
width: scale(28),
|
|
213
|
-
height: scale(28),
|
|
214
|
-
borderRadius: scale(14),
|
|
215
|
-
backgroundColor: COLORS.skeleton,
|
|
216
|
-
marginRight: scale(12),
|
|
217
|
-
},
|
|
218
|
-
logoFallback: {
|
|
219
|
-
width: scale(28),
|
|
220
|
-
height: scale(28),
|
|
221
|
-
borderRadius: scale(14),
|
|
222
|
-
backgroundColor: COLORS.logoFallback,
|
|
223
|
-
alignItems: 'center',
|
|
224
|
-
justifyContent: 'center',
|
|
225
|
-
marginRight: scale(12),
|
|
226
|
-
},
|
|
227
|
-
logoFallbackText: {
|
|
228
|
-
fontSize: moderateScale(12),
|
|
229
|
-
fontWeight: '700',
|
|
230
|
-
color: COLORS.background,
|
|
231
|
-
textTransform: 'uppercase',
|
|
232
|
-
},
|
|
233
|
-
gatewayText: {
|
|
234
|
-
fontSize: moderateScale(15),
|
|
235
|
-
fontWeight: '600',
|
|
236
|
-
textTransform: 'capitalize',
|
|
237
|
-
color: COLORS.darkText,
|
|
238
|
-
},
|
|
239
|
-
skeletonText: {
|
|
240
|
-
width: scale(80),
|
|
241
|
-
height: verticalScale(14),
|
|
242
|
-
backgroundColor: COLORS.skeleton,
|
|
243
|
-
borderRadius: scale(4),
|
|
244
|
-
},
|
|
245
|
-
radio: {
|
|
246
|
-
width: scale(20),
|
|
247
|
-
height: scale(20),
|
|
248
|
-
borderRadius: scale(10),
|
|
249
|
-
borderWidth: scale(2),
|
|
250
|
-
borderColor: COLORS.radioBorder,
|
|
251
|
-
alignItems: 'center',
|
|
252
|
-
justifyContent: 'center',
|
|
253
|
-
},
|
|
254
|
-
radioSelected: { borderColor: COLORS.selectedBorder },
|
|
255
|
-
radioDot: {
|
|
256
|
-
width: scale(10),
|
|
257
|
-
height: scale(10),
|
|
258
|
-
borderRadius: scale(5),
|
|
259
|
-
backgroundColor: COLORS.selectedBorder,
|
|
260
|
-
},
|
|
261
|
-
});
|
|
262
|
-
|
|
263
|
-
export default memo(PaymentMethod);
|