@oxyhq/services 5.7.5 → 5.8.1

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 (239) hide show
  1. package/README.md +76 -76
  2. package/lib/commonjs/core/index.js +177 -102
  3. package/lib/commonjs/core/index.js.map +1 -1
  4. package/lib/commonjs/index.js +88 -29
  5. package/lib/commonjs/index.js.map +1 -1
  6. package/lib/commonjs/node/createAuth.js +585 -7
  7. package/lib/commonjs/node/createAuth.js.map +1 -1
  8. package/lib/commonjs/node/index.js +38 -1
  9. package/lib/commonjs/node/index.js.map +1 -1
  10. package/lib/commonjs/ui/components/Avatar.js +15 -6
  11. package/lib/commonjs/ui/components/Avatar.js.map +1 -1
  12. package/lib/commonjs/ui/components/GroupedItem.js +58 -13
  13. package/lib/commonjs/ui/components/GroupedItem.js.map +1 -1
  14. package/lib/commonjs/ui/components/GroupedSection.js +7 -1
  15. package/lib/commonjs/ui/components/GroupedSection.js.map +1 -1
  16. package/lib/commonjs/ui/components/Header.js +322 -0
  17. package/lib/commonjs/ui/components/Header.js.map +1 -0
  18. package/lib/commonjs/ui/components/OxyProvider.js +23 -7
  19. package/lib/commonjs/ui/components/OxyProvider.js.map +1 -1
  20. package/lib/commonjs/ui/components/index.js +7 -0
  21. package/lib/commonjs/ui/components/index.js.map +1 -1
  22. package/lib/commonjs/ui/components/internal/GroupedPillButtons.js +1 -1
  23. package/lib/commonjs/ui/components/internal/GroupedPillButtons.js.map +1 -1
  24. package/lib/commonjs/ui/components/internal/TextField.js +606 -546
  25. package/lib/commonjs/ui/components/internal/TextField.js.map +1 -1
  26. package/lib/commonjs/ui/components/internal/TextField.md +436 -0
  27. package/lib/commonjs/ui/context/OxyContext.js +122 -78
  28. package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
  29. package/lib/commonjs/ui/hooks/useSessionSocket.js +5 -2
  30. package/lib/commonjs/ui/hooks/useSessionSocket.js.map +1 -1
  31. package/lib/commonjs/ui/navigation/OxyRouter.js +1 -1
  32. package/lib/commonjs/ui/navigation/OxyRouter.js.map +1 -1
  33. package/lib/commonjs/ui/screens/AccountCenterScreen.js +6 -6
  34. package/lib/commonjs/ui/screens/AccountCenterScreen.js.map +1 -1
  35. package/lib/commonjs/ui/screens/AccountManagementDemo.js +3 -3
  36. package/lib/commonjs/ui/screens/AccountManagementDemo.js.map +1 -1
  37. package/lib/commonjs/ui/screens/AccountOverviewScreen.js +241 -598
  38. package/lib/commonjs/ui/screens/AccountOverviewScreen.js.map +1 -1
  39. package/lib/commonjs/ui/screens/AccountSettingsScreen.js +1151 -406
  40. package/lib/commonjs/ui/screens/AccountSettingsScreen.js.map +1 -1
  41. package/lib/commonjs/ui/screens/AccountSwitcherScreen.js +135 -237
  42. package/lib/commonjs/ui/screens/AccountSwitcherScreen.js.map +1 -1
  43. package/lib/commonjs/ui/screens/AppInfoScreen.js +246 -463
  44. package/lib/commonjs/ui/screens/AppInfoScreen.js.map +1 -1
  45. package/lib/commonjs/ui/screens/FeedbackScreen.js +3 -3
  46. package/lib/commonjs/ui/screens/FeedbackScreen.js.map +1 -1
  47. package/lib/commonjs/ui/screens/PaymentGatewayScreen.js +808 -650
  48. package/lib/commonjs/ui/screens/PaymentGatewayScreen.js.map +1 -1
  49. package/lib/commonjs/ui/screens/RecoverAccountScreen.js +51 -72
  50. package/lib/commonjs/ui/screens/RecoverAccountScreen.js.map +1 -1
  51. package/lib/commonjs/ui/screens/SessionManagementScreen.js +11 -29
  52. package/lib/commonjs/ui/screens/SessionManagementScreen.js.map +1 -1
  53. package/lib/commonjs/ui/screens/SignInScreen.js +30 -303
  54. package/lib/commonjs/ui/screens/SignInScreen.js.map +1 -1
  55. package/lib/commonjs/ui/screens/SignUpScreen.js +4 -4
  56. package/lib/commonjs/ui/screens/SignUpScreen.js.map +1 -1
  57. package/lib/commonjs/ui/screens/internal/SignInPasswordStep.js +19 -31
  58. package/lib/commonjs/ui/screens/internal/SignInPasswordStep.js.map +1 -1
  59. package/lib/commonjs/ui/screens/internal/SignInUsernameStep.js +7 -10
  60. package/lib/commonjs/ui/screens/internal/SignInUsernameStep.js.map +1 -1
  61. package/lib/commonjs/ui/screens/internal/SignUpIdentityStep.js +11 -5
  62. package/lib/commonjs/ui/screens/internal/SignUpIdentityStep.js.map +1 -1
  63. package/lib/commonjs/ui/screens/internal/SignUpSecurityStep.js +11 -4
  64. package/lib/commonjs/ui/screens/internal/SignUpSecurityStep.js.map +1 -1
  65. package/lib/commonjs/ui/stores/authStore.js +12 -0
  66. package/lib/commonjs/ui/stores/authStore.js.map +1 -1
  67. package/lib/commonjs/ui/styles/authStyles.js +337 -0
  68. package/lib/commonjs/ui/styles/authStyles.js.map +1 -0
  69. package/lib/commonjs/ui/styles/index.js +11 -0
  70. package/lib/commonjs/ui/styles/index.js.map +1 -1
  71. package/lib/module/core/index.js +177 -41
  72. package/lib/module/core/index.js.map +1 -1
  73. package/lib/module/index.js +26 -4
  74. package/lib/module/index.js.map +1 -1
  75. package/lib/module/node/createAuth.js +584 -7
  76. package/lib/module/node/createAuth.js.map +1 -1
  77. package/lib/module/node/index.js +7 -1
  78. package/lib/module/node/index.js.map +1 -1
  79. package/lib/module/ui/components/Avatar.js +15 -6
  80. package/lib/module/ui/components/Avatar.js.map +1 -1
  81. package/lib/module/ui/components/GroupedItem.js +59 -14
  82. package/lib/module/ui/components/GroupedItem.js.map +1 -1
  83. package/lib/module/ui/components/GroupedSection.js +7 -1
  84. package/lib/module/ui/components/GroupedSection.js.map +1 -1
  85. package/lib/module/ui/components/Header.js +317 -0
  86. package/lib/module/ui/components/Header.js.map +1 -0
  87. package/lib/module/ui/components/OxyProvider.js +25 -9
  88. package/lib/module/ui/components/OxyProvider.js.map +1 -1
  89. package/lib/module/ui/components/index.js +1 -0
  90. package/lib/module/ui/components/index.js.map +1 -1
  91. package/lib/module/ui/components/internal/GroupedPillButtons.js +1 -1
  92. package/lib/module/ui/components/internal/GroupedPillButtons.js.map +1 -1
  93. package/lib/module/ui/components/internal/TextField.js +607 -547
  94. package/lib/module/ui/components/internal/TextField.js.map +1 -1
  95. package/lib/module/ui/components/internal/TextField.md +436 -0
  96. package/lib/module/ui/context/OxyContext.js +121 -77
  97. package/lib/module/ui/context/OxyContext.js.map +1 -1
  98. package/lib/module/ui/hooks/useSessionSocket.js +5 -2
  99. package/lib/module/ui/hooks/useSessionSocket.js.map +1 -1
  100. package/lib/module/ui/navigation/OxyRouter.js +1 -1
  101. package/lib/module/ui/navigation/OxyRouter.js.map +1 -1
  102. package/lib/module/ui/screens/AccountCenterScreen.js +6 -6
  103. package/lib/module/ui/screens/AccountCenterScreen.js.map +1 -1
  104. package/lib/module/ui/screens/AccountManagementDemo.js +3 -3
  105. package/lib/module/ui/screens/AccountManagementDemo.js.map +1 -1
  106. package/lib/module/ui/screens/AccountOverviewScreen.js +242 -597
  107. package/lib/module/ui/screens/AccountOverviewScreen.js.map +1 -1
  108. package/lib/module/ui/screens/AccountSettingsScreen.js +1152 -407
  109. package/lib/module/ui/screens/AccountSettingsScreen.js.map +1 -1
  110. package/lib/module/ui/screens/AccountSwitcherScreen.js +135 -237
  111. package/lib/module/ui/screens/AccountSwitcherScreen.js.map +1 -1
  112. package/lib/module/ui/screens/AppInfoScreen.js +248 -465
  113. package/lib/module/ui/screens/AppInfoScreen.js.map +1 -1
  114. package/lib/module/ui/screens/FeedbackScreen.js +3 -3
  115. package/lib/module/ui/screens/FeedbackScreen.js.map +1 -1
  116. package/lib/module/ui/screens/PaymentGatewayScreen.js +809 -651
  117. package/lib/module/ui/screens/PaymentGatewayScreen.js.map +1 -1
  118. package/lib/module/ui/screens/RecoverAccountScreen.js +53 -74
  119. package/lib/module/ui/screens/RecoverAccountScreen.js.map +1 -1
  120. package/lib/module/ui/screens/SessionManagementScreen.js +11 -29
  121. package/lib/module/ui/screens/SessionManagementScreen.js.map +1 -1
  122. package/lib/module/ui/screens/SignInScreen.js +32 -305
  123. package/lib/module/ui/screens/SignInScreen.js.map +1 -1
  124. package/lib/module/ui/screens/SignUpScreen.js +5 -5
  125. package/lib/module/ui/screens/SignUpScreen.js.map +1 -1
  126. package/lib/module/ui/screens/internal/SignInPasswordStep.js +19 -31
  127. package/lib/module/ui/screens/internal/SignInPasswordStep.js.map +1 -1
  128. package/lib/module/ui/screens/internal/SignInUsernameStep.js +7 -10
  129. package/lib/module/ui/screens/internal/SignInUsernameStep.js.map +1 -1
  130. package/lib/module/ui/screens/internal/SignUpIdentityStep.js +11 -5
  131. package/lib/module/ui/screens/internal/SignUpIdentityStep.js.map +1 -1
  132. package/lib/module/ui/screens/internal/SignUpSecurityStep.js +11 -4
  133. package/lib/module/ui/screens/internal/SignUpSecurityStep.js.map +1 -1
  134. package/lib/module/ui/stores/authStore.js +12 -0
  135. package/lib/module/ui/stores/authStore.js.map +1 -1
  136. package/lib/module/ui/styles/authStyles.js +332 -0
  137. package/lib/module/ui/styles/authStyles.js.map +1 -0
  138. package/lib/module/ui/styles/index.js +1 -0
  139. package/lib/module/ui/styles/index.js.map +1 -1
  140. package/lib/typescript/core/index.d.ts +68 -24
  141. package/lib/typescript/core/index.d.ts.map +1 -1
  142. package/lib/typescript/index.d.ts +13 -3
  143. package/lib/typescript/index.d.ts.map +1 -1
  144. package/lib/typescript/node/createAuth.d.ts +112 -0
  145. package/lib/typescript/node/createAuth.d.ts.map +1 -1
  146. package/lib/typescript/node/index.d.ts +2 -0
  147. package/lib/typescript/node/index.d.ts.map +1 -1
  148. package/lib/typescript/ui/components/Avatar.d.ts.map +1 -1
  149. package/lib/typescript/ui/components/GroupedItem.d.ts +6 -0
  150. package/lib/typescript/ui/components/GroupedItem.d.ts.map +1 -1
  151. package/lib/typescript/ui/components/GroupedSection.d.ts +6 -0
  152. package/lib/typescript/ui/components/GroupedSection.d.ts.map +1 -1
  153. package/lib/typescript/ui/components/Header.d.ts +22 -0
  154. package/lib/typescript/ui/components/Header.d.ts.map +1 -0
  155. package/lib/typescript/ui/components/OxyProvider.d.ts.map +1 -1
  156. package/lib/typescript/ui/components/index.d.ts +1 -0
  157. package/lib/typescript/ui/components/index.d.ts.map +1 -1
  158. package/lib/typescript/ui/components/internal/TextField.d.ts +31 -16
  159. package/lib/typescript/ui/components/internal/TextField.d.ts.map +1 -1
  160. package/lib/typescript/ui/context/OxyContext.d.ts +5 -2
  161. package/lib/typescript/ui/context/OxyContext.d.ts.map +1 -1
  162. package/lib/typescript/ui/hooks/useSessionSocket.d.ts.map +1 -1
  163. package/lib/typescript/ui/navigation/types.d.ts +9 -2
  164. package/lib/typescript/ui/navigation/types.d.ts.map +1 -1
  165. package/lib/typescript/ui/screens/AccountOverviewScreen.d.ts.map +1 -1
  166. package/lib/typescript/ui/screens/AccountSettingsScreen.d.ts.map +1 -1
  167. package/lib/typescript/ui/screens/AccountSwitcherScreen.d.ts.map +1 -1
  168. package/lib/typescript/ui/screens/AppInfoScreen.d.ts.map +1 -1
  169. package/lib/typescript/ui/screens/PaymentGatewayScreen.d.ts.map +1 -1
  170. package/lib/typescript/ui/screens/RecoverAccountScreen.d.ts +5 -1
  171. package/lib/typescript/ui/screens/RecoverAccountScreen.d.ts.map +1 -1
  172. package/lib/typescript/ui/screens/SessionManagementScreen.d.ts.map +1 -1
  173. package/lib/typescript/ui/screens/SignInScreen.d.ts.map +1 -1
  174. package/lib/typescript/ui/screens/internal/SignInPasswordStep.d.ts +1 -1
  175. package/lib/typescript/ui/screens/internal/SignInPasswordStep.d.ts.map +1 -1
  176. package/lib/typescript/ui/screens/internal/SignInUsernameStep.d.ts +0 -1
  177. package/lib/typescript/ui/screens/internal/SignInUsernameStep.d.ts.map +1 -1
  178. package/lib/typescript/ui/screens/internal/SignUpIdentityStep.d.ts.map +1 -1
  179. package/lib/typescript/ui/screens/internal/SignUpSecurityStep.d.ts.map +1 -1
  180. package/lib/typescript/ui/stores/authStore.d.ts.map +1 -1
  181. package/lib/typescript/ui/styles/authStyles.d.ts +326 -0
  182. package/lib/typescript/ui/styles/authStyles.d.ts.map +1 -0
  183. package/lib/typescript/ui/styles/index.d.ts +1 -0
  184. package/lib/typescript/ui/styles/index.d.ts.map +1 -1
  185. package/package.json +1 -4
  186. package/src/core/index.ts +195 -41
  187. package/src/index.ts +72 -4
  188. package/src/node/createAuth.ts +623 -7
  189. package/src/node/index.ts +19 -1
  190. package/src/ui/components/Avatar.tsx +11 -5
  191. package/src/ui/components/GroupedItem.tsx +57 -9
  192. package/src/ui/components/GroupedSection.tsx +12 -0
  193. package/src/ui/components/Header.tsx +364 -0
  194. package/src/ui/components/OxyProvider.tsx +31 -15
  195. package/src/ui/components/index.ts +1 -0
  196. package/src/ui/components/internal/GroupedPillButtons.tsx +1 -1
  197. package/src/ui/components/internal/TextField.md +436 -0
  198. package/src/ui/components/internal/TextField.tsx +720 -620
  199. package/src/ui/context/OxyContext.tsx +150 -63
  200. package/src/ui/hooks/useSessionSocket.ts +5 -2
  201. package/src/ui/navigation/OxyRouter.tsx +1 -1
  202. package/src/ui/navigation/types.ts +10 -2
  203. package/src/ui/screens/AccountCenterScreen.tsx +5 -5
  204. package/src/ui/screens/AccountManagementDemo.tsx +9 -9
  205. package/src/ui/screens/AccountOverviewScreen.tsx +265 -414
  206. package/src/ui/screens/AccountSettingsScreen.tsx +1165 -403
  207. package/src/ui/screens/AccountSwitcherScreen.tsx +158 -202
  208. package/src/ui/screens/AppInfoScreen.tsx +270 -497
  209. package/src/ui/screens/FeedbackScreen.tsx +3 -3
  210. package/src/ui/screens/PaymentGatewayScreen.tsx +668 -365
  211. package/src/ui/screens/ProfileScreen.tsx +5 -5
  212. package/src/ui/screens/RecoverAccountScreen.tsx +46 -74
  213. package/src/ui/screens/SessionManagementScreen.tsx +14 -22
  214. package/src/ui/screens/SignInScreen.tsx +27 -294
  215. package/src/ui/screens/SignUpScreen.tsx +5 -5
  216. package/src/ui/screens/internal/SignInPasswordStep.tsx +11 -22
  217. package/src/ui/screens/internal/SignInUsernameStep.tsx +3 -10
  218. package/src/ui/screens/internal/SignUpIdentityStep.tsx +2 -5
  219. package/src/ui/screens/internal/SignUpSecurityStep.tsx +3 -4
  220. package/src/ui/stores/authStore.ts +12 -0
  221. package/src/ui/styles/authStyles.ts +352 -0
  222. package/src/ui/styles/index.ts +1 -0
  223. package/lib/commonjs/core/auth-manager.js +0 -440
  224. package/lib/commonjs/core/auth-manager.js.map +0 -1
  225. package/lib/commonjs/core/use-auth.js +0 -244
  226. package/lib/commonjs/core/use-auth.js.map +0 -1
  227. package/lib/module/core/auth-manager.js +0 -432
  228. package/lib/module/core/auth-manager.js.map +0 -1
  229. package/lib/module/core/use-auth.js +0 -235
  230. package/lib/module/core/use-auth.js.map +0 -1
  231. package/lib/typescript/core/auth-manager.d.ts +0 -136
  232. package/lib/typescript/core/auth-manager.d.ts.map +0 -1
  233. package/lib/typescript/core/use-auth.d.ts +0 -79
  234. package/lib/typescript/core/use-auth.d.ts.map +0 -1
  235. package/src/__tests__/middleware.test.ts +0 -105
  236. package/src/__tests__/setup.ts +0 -10
  237. package/src/__tests__/zero-config-auth.test.ts +0 -607
  238. package/src/core/auth-manager.ts +0 -500
  239. package/src/core/use-auth.tsx +0 -245
@@ -1,9 +1,8 @@
1
1
  "use strict";
2
2
 
3
3
  import React, { useState, useRef, useMemo, useCallback, useEffect } from 'react';
4
- import { View, Text, TouchableOpacity, StyleSheet, Platform, KeyboardAvoidingView, ScrollView, Animated, StatusBar, Linking, Clipboard, useWindowDimensions } from 'react-native';
4
+ import { View, Text, TouchableOpacity, StyleSheet, Platform, ScrollView, Animated, Linking, Clipboard, useWindowDimensions } from 'react-native';
5
5
  import { fontFamilies, useThemeColors, createCommonStyles } from '../styles';
6
- import OxyLogo from '../components/OxyLogo';
7
6
  import GroupedPillButtons from '../components/internal/GroupedPillButtons';
8
7
  import TextField from '../components/internal/TextField';
9
8
  import { Ionicons } from '@expo/vector-icons';
@@ -11,6 +10,7 @@ import { FAIRWalletIcon } from '../components/icon';
11
10
  import { toast } from 'sonner';
12
11
  import QRCode from 'react-native-qrcode-svg';
13
12
  import * as RNIap from 'react-native-iap';
13
+ import { GroupedSection } from '../components';
14
14
 
15
15
  // Restrict payment methods to Card, Oxy Pay, and FairCoin (QR)
16
16
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
@@ -218,12 +218,12 @@ const PaymentGatewayScreen = props => {
218
218
  Animated.timing(scaleAnim, {
219
219
  toValue: 0.95,
220
220
  duration: 150,
221
- useNativeDriver: true
221
+ useNativeDriver: Platform.OS !== 'web'
222
222
  }).start();
223
223
  Animated.timing(fadeAnim, {
224
224
  toValue: 0,
225
225
  duration: 200,
226
- useNativeDriver: true
226
+ useNativeDriver: Platform.OS !== 'web'
227
227
  }).start(() => {
228
228
  setCurrentStep(nextStep);
229
229
  slideAnim.setValue(-50);
@@ -231,17 +231,17 @@ const PaymentGatewayScreen = props => {
231
231
  Animated.parallel([Animated.timing(fadeAnim, {
232
232
  toValue: 1,
233
233
  duration: 300,
234
- useNativeDriver: true
234
+ useNativeDriver: Platform.OS !== 'web'
235
235
  }), Animated.spring(slideAnim, {
236
236
  toValue: 0,
237
237
  tension: 80,
238
238
  friction: 8,
239
- useNativeDriver: true
239
+ useNativeDriver: Platform.OS !== 'web'
240
240
  }), Animated.spring(scaleAnim, {
241
241
  toValue: 1,
242
242
  tension: 80,
243
243
  friction: 8,
244
- useNativeDriver: true
244
+ useNativeDriver: Platform.OS !== 'web'
245
245
  })]).start();
246
246
  });
247
247
  }, [fadeAnim, slideAnim, scaleAnim]);
@@ -396,140 +396,9 @@ const PaymentGatewayScreen = props => {
396
396
 
397
397
  // PaymentGatewayHeader component
398
398
  const stepTitles = ['Complete Your Payment', 'Select Payment Method', 'Enter Payment Details', 'Review & Pay', 'Success'];
399
- const PaymentGatewayHeader = ({
400
- currentStep,
401
- totalSteps,
402
- title
403
- }) => /*#__PURE__*/_jsxs(View, {
404
- style: styles.headerWrapper,
405
- children: [/*#__PURE__*/_jsx(OxyLogo, {
406
- style: styles.logo
407
- }), /*#__PURE__*/_jsx(Text, {
408
- style: styles.headerTitle,
409
- children: title
410
- }), /*#__PURE__*/_jsx(View, {
411
- style: styles.headerStepIndicatorContainer,
412
- children: Array.from({
413
- length: totalSteps
414
- }).map((_, idx) => /*#__PURE__*/_jsx(View, {
415
- style: getStepIndicatorStyle(currentStep + 1 === idx + 1)
416
- }, idx))
417
- })]
418
- });
419
-
420
- // Card container for main content
421
- const Card = ({
422
- children,
423
- style
424
- }) => /*#__PURE__*/_jsx(View, {
425
- style: [styles.card, style],
426
- children: children
427
- });
428
-
429
- // Product/Item summary card for step 1
430
- const renderItemSummary = () => {
431
- if (paymentItems && paymentItems.length > 0) {
432
- return /*#__PURE__*/_jsxs(Card, {
433
- style: {
434
- marginBottom: 10
435
- },
436
- children: [paymentItems.map((item, idx) => /*#__PURE__*/_jsxs(View, {
437
- style: {
438
- marginBottom: 8
439
- },
440
- children: [/*#__PURE__*/_jsxs(View, {
441
- style: {
442
- flexDirection: 'row',
443
- justifyContent: 'space-between',
444
- alignItems: 'center'
445
- },
446
- children: [/*#__PURE__*/_jsxs(Text, {
447
- style: {
448
- fontWeight: '600',
449
- color: colors.text
450
- },
451
- children: [item.type === 'product' && item.quantity ? `${item.quantity} × ` : '', item.name, item.type === 'subscription' && item.period ? ` (${item.period})` : '']
452
- }), /*#__PURE__*/_jsxs(Text, {
453
- style: {
454
- color: colors.text
455
- },
456
- children: [item.currency ? CURRENCY_SYMBOLS[item.currency.toUpperCase()] || item.currency : currencySymbol, " ", item.price * (item.quantity ?? 1)]
457
- })]
458
- }), item.description ? /*#__PURE__*/_jsx(Text, {
459
- style: {
460
- color: colors.secondaryText,
461
- fontSize: 13
462
- },
463
- children: item.description
464
- }) : null]
465
- }, idx)), /*#__PURE__*/_jsxs(View, {
466
- style: {
467
- borderTopWidth: 1,
468
- borderColor: colors.border,
469
- marginTop: 8,
470
- paddingTop: 8,
471
- flexDirection: 'row',
472
- justifyContent: 'space-between',
473
- alignItems: 'center'
474
- },
475
- children: [/*#__PURE__*/_jsx(Text, {
476
- style: {
477
- fontWeight: '700',
478
- color: colors.text
479
- },
480
- children: "Total"
481
- }), /*#__PURE__*/_jsxs(Text, {
482
- style: {
483
- fontWeight: '700',
484
- color: colors.primary,
485
- fontSize: 18
486
- },
487
- children: [currencySymbol, " ", computedTotal]
488
- })]
489
- })]
490
- });
491
- } else if (description) {
492
- return /*#__PURE__*/_jsxs(Card, {
493
- style: {
494
- marginBottom: 10
495
- },
496
- children: [/*#__PURE__*/_jsx(Text, {
497
- style: {
498
- color: colors.text
499
- },
500
- children: description
501
- }), /*#__PURE__*/_jsxs(View, {
502
- style: {
503
- borderTopWidth: 1,
504
- borderColor: colors.border,
505
- marginTop: 8,
506
- paddingTop: 8,
507
- flexDirection: 'row',
508
- justifyContent: 'space-between',
509
- alignItems: 'center'
510
- },
511
- children: [/*#__PURE__*/_jsx(Text, {
512
- style: {
513
- fontWeight: '700',
514
- color: colors.text
515
- },
516
- children: "Total"
517
- }), /*#__PURE__*/_jsxs(Text, {
518
- style: {
519
- fontWeight: '700',
520
- color: colors.primary,
521
- fontSize: 18
522
- },
523
- children: [currencySymbol, " ", computedTotal]
524
- })]
525
- })]
526
- });
527
- }
528
- return null;
529
- };
530
399
 
531
400
  // Step 1: Summary step (new first step, no header/dots here)
532
- const renderSummaryStep = () => /*#__PURE__*/_jsx(Animated.View, {
401
+ const renderSummaryStep = () => /*#__PURE__*/_jsxs(Animated.View, {
533
402
  style: [styles.stepContainer, {
534
403
  opacity: fadeAnim,
535
404
  transform: [{
@@ -538,68 +407,121 @@ const PaymentGatewayScreen = props => {
538
407
  scale: scaleAnim
539
408
  }]
540
409
  }],
541
- children: /*#__PURE__*/_jsxs(Card, {
410
+ children: [/*#__PURE__*/_jsxs(View, {
411
+ style: styles.section,
542
412
  children: [/*#__PURE__*/_jsx(Text, {
543
- style: {
544
- color: colors.secondaryText,
545
- fontSize: 15,
546
- marginBottom: 16
547
- },
548
- children: "You're about to pay for the following:"
549
- }), paymentItems && paymentItems.length > 0 ? paymentItems.map((item, idx) => /*#__PURE__*/_jsxs(View, {
550
- style: {
551
- marginBottom: 12,
552
- flexDirection: 'row',
553
- alignItems: 'flex-start'
554
- },
555
- children: [getItemTypeIcon(item.type, colors.primary), /*#__PURE__*/_jsxs(View, {
556
- style: {
557
- flex: 1
558
- },
559
- children: [/*#__PURE__*/_jsxs(Text, {
560
- style: {
561
- fontWeight: '600',
562
- color: colors.text,
563
- fontSize: 16
564
- },
565
- children: [item.type === 'product' && item.quantity ? `${item.quantity} × ` : '', item.name, item.type === 'subscription' && item.period ? ` (${item.period})` : '']
566
- }), item.description ? /*#__PURE__*/_jsx(Text, {
567
- style: {
568
- color: colors.secondaryText,
569
- fontSize: 13,
570
- marginTop: 2
571
- },
572
- children: item.description
573
- }) : null]
574
- }), /*#__PURE__*/_jsxs(Text, {
575
- style: {
576
- color: colors.text,
577
- fontWeight: '600',
578
- fontSize: 16,
579
- marginLeft: 8
580
- },
581
- children: [item.currency ? CURRENCY_SYMBOLS[item.currency.toUpperCase()] || item.currency : currencySymbol, " ", item.price * (item.quantity ?? 1)]
582
- })]
583
- }, idx)) : /*#__PURE__*/_jsx(Text, {
584
- style: {
585
- color: colors.text
586
- },
587
- children: description
588
- }), /*#__PURE__*/_jsx(GroupedPillButtons, {
589
- buttons: [{
590
- text: 'Close',
591
- onPress: handleClose,
592
- icon: 'close',
593
- variant: 'transparent'
594
- }, {
595
- text: 'Continue',
596
- onPress: nextStep,
597
- icon: 'arrow-forward',
598
- variant: 'primary'
599
- }],
600
- colors: colors
413
+ style: styles.sectionTitle,
414
+ children: "Payment Summary"
415
+ }), /*#__PURE__*/_jsx(View, {
416
+ style: styles.summaryCard,
417
+ children: /*#__PURE__*/_jsxs(View, {
418
+ style: styles.summaryCardContent,
419
+ children: [/*#__PURE__*/_jsx(Ionicons, {
420
+ name: "receipt-outline",
421
+ size: 64,
422
+ color: colors.primary,
423
+ style: styles.summaryCardIcon
424
+ }), /*#__PURE__*/_jsx(Text, {
425
+ style: styles.summaryCardMainTitle,
426
+ children: paymentItems && paymentItems.length > 0 ? 'Order Summary' : 'Payment'
427
+ }), /*#__PURE__*/_jsx(Text, {
428
+ style: styles.summaryCardSubtitle,
429
+ children: paymentItems && paymentItems.length > 0 ? 'Review your payment details' : 'Complete your payment'
430
+ }), paymentItems && paymentItems.length > 0 ? /*#__PURE__*/_jsxs(_Fragment, {
431
+ children: [/*#__PURE__*/_jsx(View, {
432
+ style: styles.summaryCardItems,
433
+ children: /*#__PURE__*/_jsx(GroupedSection, {
434
+ items: paymentItems.map((item, idx) => ({
435
+ id: `item-${idx}`,
436
+ icon: getItemTypeIcon(item.type, colors.primary).props.name,
437
+ iconColor: colors.primary,
438
+ title: `${item.type === 'product' && item.quantity ? `${item.quantity} × ` : ''}${item.name}${item.type === 'subscription' && item.period ? ` (${item.period})` : ''}`,
439
+ subtitle: item.description || `${item.currency ? CURRENCY_SYMBOLS[item.currency.toUpperCase()] || item.currency : currencySymbol} ${item.price * (item.quantity ?? 1)}`,
440
+ customContent: /*#__PURE__*/_jsxs(Text, {
441
+ style: styles.summaryItemPrice,
442
+ children: [item.currency ? CURRENCY_SYMBOLS[item.currency.toUpperCase()] || item.currency : currencySymbol, " ", item.price * (item.quantity ?? 1)]
443
+ })
444
+ })),
445
+ theme: theme
446
+ })
447
+ }), /*#__PURE__*/_jsx(View, {
448
+ style: styles.summaryCardDivider
449
+ }), /*#__PURE__*/_jsxs(View, {
450
+ style: styles.summaryCardTotalSection,
451
+ children: [/*#__PURE__*/_jsxs(View, {
452
+ style: styles.summaryCardTotalRow,
453
+ children: [/*#__PURE__*/_jsx(Text, {
454
+ style: styles.summaryCardTotalLabel,
455
+ children: "Subtotal"
456
+ }), /*#__PURE__*/_jsxs(Text, {
457
+ style: styles.summaryCardTotalValue,
458
+ children: [currencySymbol, " ", amount]
459
+ })]
460
+ }), /*#__PURE__*/_jsxs(View, {
461
+ style: styles.summaryCardTotalRow,
462
+ children: [/*#__PURE__*/_jsx(Text, {
463
+ style: styles.summaryCardTotalLabel,
464
+ children: "Tax"
465
+ }), /*#__PURE__*/_jsxs(Text, {
466
+ style: styles.summaryCardTotalValue,
467
+ children: [currencySymbol, " 0.00"]
468
+ })]
469
+ }), /*#__PURE__*/_jsxs(View, {
470
+ style: styles.summaryCardTotalRow,
471
+ children: [/*#__PURE__*/_jsx(Text, {
472
+ style: styles.summaryCardTotalLabel,
473
+ children: "Total"
474
+ }), /*#__PURE__*/_jsxs(Text, {
475
+ style: styles.summaryCardTotalValue,
476
+ children: [currencySymbol, " ", amount]
477
+ })]
478
+ })]
479
+ })]
480
+ }) : /*#__PURE__*/_jsxs(_Fragment, {
481
+ children: [/*#__PURE__*/_jsxs(View, {
482
+ style: styles.summaryCardAmount,
483
+ children: [/*#__PURE__*/_jsx(Text, {
484
+ style: styles.summaryCardAmountLabel,
485
+ children: "Amount to Pay"
486
+ }), /*#__PURE__*/_jsxs(Text, {
487
+ style: styles.summaryCardAmountValue,
488
+ children: [currencySymbol, " ", amount]
489
+ }), description && /*#__PURE__*/_jsx(Text, {
490
+ style: styles.summaryCardAmountDescription,
491
+ children: description
492
+ })]
493
+ }), /*#__PURE__*/_jsx(View, {
494
+ style: styles.summaryCardDivider
495
+ }), /*#__PURE__*/_jsx(View, {
496
+ style: styles.summaryCardTotalSection,
497
+ children: /*#__PURE__*/_jsxs(View, {
498
+ style: styles.summaryCardTotalRow,
499
+ children: [/*#__PURE__*/_jsx(Text, {
500
+ style: styles.summaryCardTotalLabel,
501
+ children: "Total"
502
+ }), /*#__PURE__*/_jsxs(Text, {
503
+ style: styles.summaryCardTotalValue,
504
+ children: [currencySymbol, " ", amount]
505
+ })]
506
+ })
507
+ })]
508
+ })]
509
+ })
601
510
  })]
602
- })
511
+ }), /*#__PURE__*/_jsx(GroupedPillButtons, {
512
+ buttons: [{
513
+ text: 'Close',
514
+ onPress: handleClose,
515
+ icon: 'close',
516
+ variant: 'transparent'
517
+ }, {
518
+ text: 'Continue',
519
+ onPress: nextStep,
520
+ icon: 'arrow-forward',
521
+ variant: 'primary'
522
+ }],
523
+ colors: colors
524
+ })]
603
525
  });
604
526
 
605
527
  // Step 2: Choose Payment Method (now the second step, no header/dots here)
@@ -612,38 +534,27 @@ const PaymentGatewayScreen = props => {
612
534
  scale: scaleAnim
613
535
  }]
614
536
  }],
615
- children: [/*#__PURE__*/_jsx(Card, {
616
- children: /*#__PURE__*/_jsx(View, {
617
- style: styles.circleListContainer,
618
- children: availablePaymentMethods.map(method => {
619
- const isSelected = paymentMethod === method.key;
620
- return /*#__PURE__*/_jsxs(TouchableOpacity, {
621
- onPress: () => setPaymentMethod(method.key),
622
- activeOpacity: 0.85,
623
- style: [styles.circleMethod, isSelected && styles.circleMethodSelected],
624
- children: [/*#__PURE__*/_jsxs(View, {
625
- style: styles.circleIconWrapper,
626
- children: [method.key === 'faircoin' ? /*#__PURE__*/_jsx(FAIRWalletIcon, {
627
- size: 28
628
- }) : /*#__PURE__*/_jsx(Ionicons, {
629
- name: method.icon,
630
- size: 28,
631
- color: isSelected ? colors.primary : colors.text
632
- }), isSelected && /*#__PURE__*/_jsx(View, {
633
- style: styles.circleCheckOverlay,
634
- children: /*#__PURE__*/_jsx(Ionicons, {
635
- name: "checkmark-circle",
636
- size: 28,
637
- color: colors.primary
638
- })
639
- })]
640
- }), /*#__PURE__*/_jsx(Text, {
641
- style: [styles.circleLabel, isSelected && styles.circleLabelSelected],
642
- children: method.label
643
- })]
644
- }, method.key);
645
- })
646
- })
537
+ children: [/*#__PURE__*/_jsxs(View, {
538
+ style: styles.section,
539
+ children: [/*#__PURE__*/_jsx(Text, {
540
+ style: styles.sectionTitle,
541
+ children: "Choose Payment Method"
542
+ }), /*#__PURE__*/_jsx(GroupedSection, {
543
+ items: availablePaymentMethods.map(method => ({
544
+ id: method.key,
545
+ icon: method.key === 'faircoin' ? undefined : method.icon,
546
+ iconColor: method.key === 'card' ? '#007AFF' : method.key === 'oxy' ? '#32D74B' : method.key === 'faircoin' ? '#9ffb50' : colors.primary,
547
+ title: method.label,
548
+ subtitle: method.description,
549
+ onPress: () => setPaymentMethod(method.key),
550
+ selected: paymentMethod === method.key,
551
+ showChevron: false,
552
+ customIcon: method.key === 'faircoin' ? /*#__PURE__*/_jsx(FAIRWalletIcon, {
553
+ size: 20
554
+ }) : undefined
555
+ })),
556
+ theme: theme
557
+ })]
647
558
  }), /*#__PURE__*/_jsx(GroupedPillButtons, {
648
559
  buttons: [{
649
560
  text: 'Back',
@@ -670,226 +581,235 @@ const PaymentGatewayScreen = props => {
670
581
  scale: scaleAnim
671
582
  }]
672
583
  }],
673
- children: [/*#__PURE__*/_jsxs(Card, {
674
- style: paymentMethod === 'faircoin' ? {
675
- backgroundColor: '#f6fff0',
676
- paddingVertical: 24,
677
- paddingHorizontal: 0
678
- } : undefined,
679
- children: [paymentMethod === 'card' && /*#__PURE__*/_jsxs(_Fragment, {
680
- children: [/*#__PURE__*/_jsxs(View, {
681
- style: styles.cardRowInfo,
584
+ children: [/*#__PURE__*/_jsxs(View, {
585
+ style: styles.section,
586
+ children: [/*#__PURE__*/_jsx(Text, {
587
+ style: styles.sectionTitle,
588
+ children: paymentMethod === 'card' ? 'Card Details' : paymentMethod === 'oxy' ? 'Oxy Pay' : paymentMethod === 'faircoin' ? 'FairCoin Payment' : 'Payment Details'
589
+ }), paymentMethod === 'card' && /*#__PURE__*/_jsx(View, {
590
+ style: styles.cardPaymentCard,
591
+ children: /*#__PURE__*/_jsxs(View, {
592
+ style: styles.cardPaymentContent,
682
593
  children: [/*#__PURE__*/_jsx(Ionicons, {
683
594
  name: "card-outline",
684
- size: 24,
595
+ size: 64,
685
596
  color: colors.primary,
686
- style: styles.cardRowIcon
597
+ style: styles.cardPaymentIcon
687
598
  }), /*#__PURE__*/_jsx(Text, {
688
- style: styles.cardRowText,
689
- children: "We accept Visa, Mastercard, and more"
690
- })]
691
- }), /*#__PURE__*/_jsx(TextField, {
692
- value: cardDetails.number,
693
- onChangeText: text => setCardDetails({
694
- ...cardDetails,
695
- number: text
696
- }),
697
- placeholder: "Card Number",
698
- keyboardType: "numeric",
699
- containerStyle: styles.cardFieldContainer,
700
- leftComponent: /*#__PURE__*/_jsx(Ionicons, {
701
- name: "card-outline",
702
- size: 18,
703
- color: colors.primary
704
- })
705
- }), /*#__PURE__*/_jsxs(View, {
706
- style: styles.cardFieldRow,
707
- children: [/*#__PURE__*/_jsx(TextField, {
708
- value: cardDetails.expiry,
709
- onChangeText: text => setCardDetails({
710
- ...cardDetails,
711
- expiry: text
712
- }),
713
- placeholder: "MM/YY",
714
- containerStyle: styles.cardFieldHalfLeft,
715
- leftComponent: /*#__PURE__*/_jsx(Ionicons, {
716
- name: "calendar-outline",
717
- size: 16,
718
- color: colors.primary
719
- })
720
- }), /*#__PURE__*/_jsx(TextField, {
721
- value: cardDetails.cvv,
722
- onChangeText: text => setCardDetails({
723
- ...cardDetails,
724
- cvv: text
725
- }),
726
- placeholder: "CVV",
727
- keyboardType: "numeric",
728
- containerStyle: styles.cardFieldHalfRight,
729
- leftComponent: /*#__PURE__*/_jsx(Ionicons, {
730
- name: "lock-closed-outline",
731
- size: 16,
732
- color: colors.primary
733
- })
734
- })]
735
- })]
736
- }), paymentMethod === 'oxy' && /*#__PURE__*/_jsxs(View, {
737
- style: styles.oxyPayContainer,
738
- children: [/*#__PURE__*/_jsx(Ionicons, {
739
- name: "wallet-outline",
740
- size: 48,
741
- color: colors.primary,
742
- style: styles.oxyPayIcon
743
- }), /*#__PURE__*/_jsx(Text, {
744
- style: styles.oxyPayTitle,
745
- children: "Pay with Oxy Pay"
746
- }), /*#__PURE__*/_jsx(Text, {
747
- style: styles.oxyPaySubtitle,
748
- children: "(Oxy Pay is your in-app wallet. Make sure you have enough balance.)"
749
- }), /*#__PURE__*/_jsx(View, {
750
- style: styles.oxyPayBalanceBox,
751
- children: /*#__PURE__*/_jsx(Text, {
752
- style: styles.oxyPayBalanceText,
753
- children: "Balance: \u229C 123.45"
754
- })
755
- })]
756
- }), paymentMethod === 'faircoin' && /*#__PURE__*/_jsxs(View, {
757
- style: {
758
- alignItems: 'center',
759
- width: '100%'
760
- },
761
- children: [/*#__PURE__*/_jsx(FAIRWalletIcon, {
762
- size: 64,
763
- style: [styles.faircoinIcon, {
764
- shadowColor: '#1b1f0a',
765
- shadowOpacity: 0.18,
766
- shadowRadius: 12,
767
- elevation: 6,
768
- marginBottom: 12
769
- }]
770
- }), /*#__PURE__*/_jsx(Text, {
771
- style: {
772
- fontFamily: fontFamilies.phuduBold,
773
- fontWeight: 'bold',
774
- fontSize: 28,
775
- color: '#1b1f0a',
776
- marginBottom: 2,
777
- textAlign: 'center',
778
- letterSpacing: 0.5
779
- },
780
- children: "FAIRWallet"
781
- }), /*#__PURE__*/_jsx(Text, {
782
- style: {
783
- color: '#1b1f0a',
784
- fontWeight: '700',
785
- fontSize: 17,
786
- marginBottom: 18,
787
- textAlign: 'center',
788
- letterSpacing: 0.2
789
- },
790
- children: "Pay with FairCoin"
791
- }), !isMobile ? /*#__PURE__*/_jsxs(_Fragment, {
792
- children: [/*#__PURE__*/_jsx(Text, {
793
- style: {
794
- color: '#1b1f0a',
795
- fontWeight: '600',
796
- fontSize: 15,
797
- marginBottom: 8
798
- },
799
- children: "Scan to Pay"
599
+ style: styles.cardPaymentMainTitle,
600
+ children: "Credit Card"
601
+ }), /*#__PURE__*/_jsx(Text, {
602
+ style: styles.cardPaymentSubtitle,
603
+ children: "Enter your card details securely"
800
604
  }), /*#__PURE__*/_jsxs(View, {
801
- style: [styles.faircoinQRBox, {
802
- width: qrSize,
803
- height: qrSize,
804
- borderColor: '#9ffb50',
805
- borderWidth: 3,
806
- position: 'relative',
807
- backgroundColor: '#fff',
808
- boxShadow: '0 2px 12px #9ffb5040',
809
- justifyContent: 'center',
810
- alignItems: 'center'
811
- }],
812
- children: [/*#__PURE__*/_jsx(QRCode, {
813
- value: faircoinAddress,
814
- size: qrSize - 32
815
- }), /*#__PURE__*/_jsx(View, {
816
- style: {
817
- position: 'absolute',
818
- bottom: 8,
819
- right: 8
605
+ style: styles.cardPaymentFields,
606
+ children: [/*#__PURE__*/_jsxs(View, {
607
+ style: styles.cardRowInfo,
608
+ children: [/*#__PURE__*/_jsx(Ionicons, {
609
+ name: "card-outline",
610
+ size: 24,
611
+ color: colors.primary,
612
+ style: styles.cardRowIcon
613
+ }), /*#__PURE__*/_jsx(Text, {
614
+ style: styles.cardRowText,
615
+ children: "We accept Visa, Mastercard, and more"
616
+ })]
617
+ }), /*#__PURE__*/_jsx(TextField, {
618
+ value: cardDetails.number,
619
+ onChangeText: text => {
620
+ // Format card number with spaces
621
+ const formatted = text.replace(/\s/g, '').replace(/(\d{4})/g, '$1 ').trim();
622
+ setCardDetails({
623
+ ...cardDetails,
624
+ number: formatted
625
+ });
820
626
  },
821
- children: /*#__PURE__*/_jsx(FAIRWalletIcon, {
822
- size: 28
627
+ placeholder: "1234 5678 9012 3456",
628
+ keyboardType: "numeric",
629
+ maxLength: 19,
630
+ style: styles.cardFieldContainer,
631
+ leading: /*#__PURE__*/_jsx(Ionicons, {
632
+ name: "card-outline",
633
+ size: 18,
634
+ color: colors.primary
823
635
  })
636
+ }), /*#__PURE__*/_jsxs(View, {
637
+ style: styles.cardFieldRow,
638
+ children: [/*#__PURE__*/_jsx(TextField, {
639
+ value: cardDetails.expiry,
640
+ onChangeText: text => {
641
+ // Format expiry date
642
+ const formatted = text.replace(/\D/g, '').replace(/(\d{2})(\d)/, '$1/$2');
643
+ setCardDetails({
644
+ ...cardDetails,
645
+ expiry: formatted
646
+ });
647
+ },
648
+ placeholder: "MM/YY",
649
+ maxLength: 5,
650
+ style: styles.cardFieldHalfLeft,
651
+ leading: /*#__PURE__*/_jsx(Ionicons, {
652
+ name: "calendar-outline",
653
+ size: 16,
654
+ color: colors.primary
655
+ })
656
+ }), /*#__PURE__*/_jsx(TextField, {
657
+ value: cardDetails.cvv,
658
+ onChangeText: text => {
659
+ // Only allow numbers
660
+ const formatted = text.replace(/\D/g, '');
661
+ setCardDetails({
662
+ ...cardDetails,
663
+ cvv: formatted
664
+ });
665
+ },
666
+ placeholder: "123",
667
+ keyboardType: "numeric",
668
+ maxLength: 4,
669
+ style: styles.cardFieldHalfRight,
670
+ leading: /*#__PURE__*/_jsx(Ionicons, {
671
+ name: "lock-closed-outline",
672
+ size: 16,
673
+ color: colors.primary
674
+ })
675
+ })]
824
676
  })]
677
+ }), /*#__PURE__*/_jsx(View, {
678
+ style: {
679
+ height: 18
680
+ }
681
+ }), /*#__PURE__*/_jsx(Text, {
682
+ style: styles.cardPaymentWaiting,
683
+ children: "Ready to process payment..."
825
684
  })]
826
- }) : /*#__PURE__*/_jsxs(_Fragment, {
827
- children: [/*#__PURE__*/_jsx(Text, {
828
- style: styles.faircoinTitle,
829
- children: "Use the options below to pay with FAIRWallet"
685
+ })
686
+ }), paymentMethod === 'oxy' && /*#__PURE__*/_jsx(View, {
687
+ style: styles.oxyPayCard,
688
+ children: /*#__PURE__*/_jsxs(View, {
689
+ style: styles.oxyPayContent,
690
+ children: [/*#__PURE__*/_jsx(Ionicons, {
691
+ name: "wallet-outline",
692
+ size: 64,
693
+ color: colors.primary,
694
+ style: styles.oxyPayIcon
830
695
  }), /*#__PURE__*/_jsx(Text, {
831
- style: styles.faircoinAddress,
832
- children: faircoinAddress
833
- }), /*#__PURE__*/_jsxs(TouchableOpacity, {
834
- style: [styles.faircoinButton, {
835
- backgroundColor: '#9ffb50',
836
- borderRadius: 18,
837
- marginTop: 12,
838
- width: '90%',
839
- flexDirection: 'row',
840
- alignItems: 'center',
841
- justifyContent: 'center'
842
- }],
843
- onPress: handleOpenFairWallet,
844
- children: [/*#__PURE__*/_jsx(FAIRWalletIcon, {
845
- size: 20,
846
- style: {
847
- marginRight: 8
848
- }
849
- }), /*#__PURE__*/_jsx(Text, {
850
- style: [styles.faircoinButtonText, {
851
- color: '#1b1f0a',
852
- fontWeight: 'bold',
853
- fontSize: 16
854
- }],
855
- children: "Open in FAIRWallet"
696
+ style: styles.oxyPayMainTitle,
697
+ children: "Oxy Pay"
698
+ }), /*#__PURE__*/_jsx(Text, {
699
+ style: styles.oxyPaySubtitle,
700
+ children: "Pay with your in-app wallet"
701
+ }), /*#__PURE__*/_jsx(View, {
702
+ style: styles.oxyPayBalanceBox,
703
+ children: /*#__PURE__*/_jsx(Text, {
704
+ style: styles.oxyPayBalanceText,
705
+ children: "Balance: \u229C 123.45"
706
+ })
707
+ }), /*#__PURE__*/_jsx(View, {
708
+ style: {
709
+ height: 18
710
+ }
711
+ }), /*#__PURE__*/_jsx(Text, {
712
+ style: styles.oxyPayWaiting,
713
+ children: "Ready to process payment..."
714
+ })]
715
+ })
716
+ }), paymentMethod === 'faircoin' && /*#__PURE__*/_jsx(View, {
717
+ style: styles.faircoinCard,
718
+ children: /*#__PURE__*/_jsxs(View, {
719
+ style: styles.faircoinContent,
720
+ children: [/*#__PURE__*/_jsx(FAIRWalletIcon, {
721
+ size: 64,
722
+ style: styles.faircoinIcon
723
+ }), /*#__PURE__*/_jsx(Text, {
724
+ style: styles.faircoinMainTitle,
725
+ children: "FAIRWallet"
726
+ }), /*#__PURE__*/_jsx(Text, {
727
+ style: styles.faircoinSubtitle,
728
+ children: "Pay with FairCoin"
729
+ }), !isMobile ? /*#__PURE__*/_jsxs(_Fragment, {
730
+ children: [/*#__PURE__*/_jsx(Text, {
731
+ style: styles.faircoinScanText,
732
+ children: "Scan to Pay"
733
+ }), /*#__PURE__*/_jsxs(View, {
734
+ style: styles.faircoinQRCard,
735
+ children: [/*#__PURE__*/_jsx(QRCode, {
736
+ value: faircoinAddress,
737
+ size: qrSize - 32
738
+ }), /*#__PURE__*/_jsx(View, {
739
+ style: styles.faircoinQRBadge,
740
+ children: /*#__PURE__*/_jsx(FAIRWalletIcon, {
741
+ size: 28
742
+ })
743
+ })]
856
744
  })]
857
- }), /*#__PURE__*/_jsxs(TouchableOpacity, {
858
- style: [styles.faircoinButton, {
859
- backgroundColor: '#9ffb50',
860
- borderRadius: 18,
861
- marginTop: 10,
862
- width: '90%',
863
- flexDirection: 'row',
864
- alignItems: 'center',
865
- justifyContent: 'center'
866
- }],
867
- onPress: handleCopyAddress,
868
- children: [/*#__PURE__*/_jsx(FAIRWalletIcon, {
869
- size: 20,
870
- style: {
871
- marginRight: 8
872
- }
745
+ }) : /*#__PURE__*/_jsxs(_Fragment, {
746
+ children: [/*#__PURE__*/_jsx(Text, {
747
+ style: styles.faircoinTitle,
748
+ children: "Use the options below to pay with FAIRWallet"
873
749
  }), /*#__PURE__*/_jsx(Text, {
874
- style: [styles.faircoinButtonText, {
875
- color: '#1b1f0a',
876
- fontWeight: 'bold',
877
- fontSize: 16
750
+ style: styles.faircoinAddress,
751
+ children: faircoinAddress
752
+ }), /*#__PURE__*/_jsxs(TouchableOpacity, {
753
+ style: [styles.faircoinButton, {
754
+ backgroundColor: '#9ffb50',
755
+ borderRadius: 18,
756
+ marginTop: 12,
757
+ width: '90%',
758
+ flexDirection: 'row',
759
+ alignItems: 'center',
760
+ justifyContent: 'center'
761
+ }],
762
+ onPress: handleOpenFairWallet,
763
+ children: [/*#__PURE__*/_jsx(FAIRWalletIcon, {
764
+ size: 20,
765
+ style: {
766
+ marginRight: 8
767
+ }
768
+ }), /*#__PURE__*/_jsx(Text, {
769
+ style: [styles.faircoinButtonText, {
770
+ color: '#1b1f0a',
771
+ fontWeight: 'bold',
772
+ fontSize: 16
773
+ }],
774
+ children: "Open in FAIRWallet"
775
+ })]
776
+ }), /*#__PURE__*/_jsxs(TouchableOpacity, {
777
+ style: [styles.faircoinButton, {
778
+ backgroundColor: '#9ffb50',
779
+ borderRadius: 18,
780
+ marginTop: 10,
781
+ width: '90%',
782
+ flexDirection: 'row',
783
+ alignItems: 'center',
784
+ justifyContent: 'center'
878
785
  }],
879
- children: "Copy Address"
786
+ onPress: handleCopyAddress,
787
+ children: [/*#__PURE__*/_jsx(FAIRWalletIcon, {
788
+ size: 20,
789
+ style: {
790
+ marginRight: 8
791
+ }
792
+ }), /*#__PURE__*/_jsx(Text, {
793
+ style: [styles.faircoinButtonText, {
794
+ color: '#1b1f0a',
795
+ fontWeight: 'bold',
796
+ fontSize: 16
797
+ }],
798
+ children: "Copy Address"
799
+ })]
880
800
  })]
801
+ }), /*#__PURE__*/_jsx(View, {
802
+ style: {
803
+ height: 18
804
+ }
805
+ }), /*#__PURE__*/_jsx(Text, {
806
+ style: styles.faircoinWaiting,
807
+ children: "Waiting for payment..."
808
+ }), /*#__PURE__*/_jsx(Text, {
809
+ style: styles.faircoinPlaceholder,
810
+ children: "(This is a placeholder. Integrate with a QR code generator for production.)"
881
811
  })]
882
- }), /*#__PURE__*/_jsx(View, {
883
- style: {
884
- height: 18
885
- }
886
- }), /*#__PURE__*/_jsx(Text, {
887
- style: styles.faircoinWaiting,
888
- children: "Waiting for payment..."
889
- }), /*#__PURE__*/_jsx(Text, {
890
- style: styles.faircoinPlaceholder,
891
- children: "(This is a placeholder. Integrate with a QR code generator for production.)"
892
- })]
812
+ })
893
813
  })]
894
814
  }), /*#__PURE__*/_jsx(GroupedPillButtons, {
895
815
  buttons: [{
@@ -918,71 +838,50 @@ const PaymentGatewayScreen = props => {
918
838
  scale: scaleAnim
919
839
  }]
920
840
  }],
921
- children: [/*#__PURE__*/_jsxs(Card, {
922
- children: [/*#__PURE__*/_jsxs(View, {
923
- style: styles.reviewSecureRow,
924
- children: [/*#__PURE__*/_jsx(Ionicons, {
925
- name: "shield-checkmark",
926
- size: 20,
927
- color: colors.success || '#4BB543',
928
- style: styles.reviewSecureIcon
929
- }), /*#__PURE__*/_jsx(Text, {
930
- style: styles.reviewSecureText,
931
- children: "Secure payment"
932
- })]
933
- }), /*#__PURE__*/_jsxs(View, {
934
- style: styles.reviewRow,
935
- children: [/*#__PURE__*/_jsx(Text, {
936
- style: styles.reviewLabel,
937
- children: "Amount"
938
- }), /*#__PURE__*/_jsxs(Text, {
939
- style: styles.reviewValue,
940
- children: [currencySymbol, " ", amount]
941
- })]
942
- }), /*#__PURE__*/_jsxs(View, {
943
- style: styles.reviewRow,
944
- children: [/*#__PURE__*/_jsx(Text, {
945
- style: styles.reviewLabel,
946
- children: "Method"
947
- }), /*#__PURE__*/_jsxs(View, {
948
- style: styles.reviewMethodRow,
949
- children: [/*#__PURE__*/_jsx(Ionicons, {
950
- name: PAYMENT_METHODS.find(m => m.key === paymentMethod)?.icon,
951
- size: 18,
952
- color: colors.primary,
953
- style: styles.reviewMethodIcon
954
- }), /*#__PURE__*/_jsx(Text, {
955
- style: styles.reviewMethodText,
956
- children: PAYMENT_METHODS.find(m => m.key === paymentMethod)?.label
957
- })]
958
- })]
959
- }), paymentMethod === 'card' && /*#__PURE__*/_jsxs(View, {
960
- style: styles.reviewRow,
961
- children: [/*#__PURE__*/_jsx(Text, {
962
- style: styles.reviewLabel,
963
- children: "Card"
964
- }), /*#__PURE__*/_jsx(Text, {
965
- style: styles.reviewValue,
966
- children: cardDetails.number.replace(/.(?=.{4})/g, '*')
967
- })]
968
- }), paymentMethod === 'oxy' && /*#__PURE__*/_jsxs(View, {
969
- style: styles.reviewRow,
970
- children: [/*#__PURE__*/_jsx(Text, {
971
- style: styles.reviewLabel,
972
- children: "Oxy Pay Account"
973
- }), /*#__PURE__*/_jsx(Text, {
974
- style: styles.reviewValue,
975
- children: "Balance: \u229C 123.45"
976
- })]
977
- }), paymentMethod === 'faircoin' && /*#__PURE__*/_jsxs(View, {
978
- style: styles.reviewRow,
979
- children: [/*#__PURE__*/_jsx(Text, {
980
- style: styles.reviewLabel,
981
- children: "FairCoin Wallet"
982
- }), /*#__PURE__*/_jsx(Text, {
983
- style: styles.reviewValue,
984
- children: "Paid via QR"
985
- })]
841
+ children: [/*#__PURE__*/_jsxs(View, {
842
+ style: styles.section,
843
+ children: [/*#__PURE__*/_jsx(Text, {
844
+ style: styles.sectionTitle,
845
+ children: "Review Payment"
846
+ }), /*#__PURE__*/_jsx(GroupedSection, {
847
+ items: [{
848
+ id: 'secure-payment',
849
+ icon: 'shield-checkmark',
850
+ iconColor: colors.success || '#4BB543',
851
+ title: 'Secure payment',
852
+ subtitle: 'Your payment is protected by industry-standard encryption'
853
+ }, {
854
+ id: 'amount',
855
+ icon: 'cash',
856
+ iconColor: colors.primary,
857
+ title: 'Amount',
858
+ subtitle: `${currencySymbol} ${amount}`
859
+ }, {
860
+ id: 'payment-method',
861
+ icon: PAYMENT_METHODS.find(m => m.key === paymentMethod)?.icon,
862
+ iconColor: colors.primary,
863
+ title: 'Payment Method',
864
+ subtitle: PAYMENT_METHODS.find(m => m.key === paymentMethod)?.label
865
+ }, ...(paymentMethod === 'card' ? [{
866
+ id: 'card-details',
867
+ icon: 'card',
868
+ iconColor: colors.primary,
869
+ title: 'Card',
870
+ subtitle: cardDetails.number.replace(/.(?=.{4})/g, '*')
871
+ }] : []), ...(paymentMethod === 'oxy' ? [{
872
+ id: 'oxy-balance',
873
+ icon: 'wallet',
874
+ iconColor: colors.primary,
875
+ title: 'Oxy Pay Account',
876
+ subtitle: 'Balance: 123.45'
877
+ }] : []), ...(paymentMethod === 'faircoin' ? [{
878
+ id: 'faircoin-wallet',
879
+ icon: 'qr-code',
880
+ iconColor: colors.primary,
881
+ title: 'FairCoin Wallet',
882
+ subtitle: 'Paid via QR'
883
+ }] : [])],
884
+ theme: theme
986
885
  })]
987
886
  }), /*#__PURE__*/_jsx(GroupedPillButtons, {
988
887
  buttons: [{
@@ -1012,20 +911,34 @@ const PaymentGatewayScreen = props => {
1012
911
  }]
1013
912
  }],
1014
913
  children: [/*#__PURE__*/_jsxs(View, {
1015
- style: styles.successContainer,
1016
- children: [/*#__PURE__*/_jsx(View, {
1017
- style: styles.successIconBox,
1018
- children: /*#__PURE__*/_jsx(Ionicons, {
1019
- name: "checkmark-circle",
1020
- size: 64,
1021
- color: colors.success || '#4BB543'
914
+ style: styles.section,
915
+ children: [/*#__PURE__*/_jsx(Text, {
916
+ style: styles.sectionTitle,
917
+ children: "Payment Complete"
918
+ }), /*#__PURE__*/_jsx(View, {
919
+ style: styles.successCard,
920
+ children: /*#__PURE__*/_jsxs(View, {
921
+ style: styles.successContent,
922
+ children: [/*#__PURE__*/_jsx(Ionicons, {
923
+ name: "checkmark-circle",
924
+ size: 64,
925
+ color: colors.success || '#4BB543',
926
+ style: styles.successIcon
927
+ }), /*#__PURE__*/_jsx(Text, {
928
+ style: styles.successMainTitle,
929
+ children: "Payment Successful!"
930
+ }), /*#__PURE__*/_jsx(Text, {
931
+ style: styles.successSubtitle,
932
+ children: "Thank you for your payment."
933
+ }), /*#__PURE__*/_jsx(View, {
934
+ style: {
935
+ height: 18
936
+ }
937
+ }), /*#__PURE__*/_jsx(Text, {
938
+ style: styles.successMessage,
939
+ children: "Your transaction has been processed successfully."
940
+ })]
1022
941
  })
1023
- }), /*#__PURE__*/_jsx(Text, {
1024
- style: styles.successTitle,
1025
- children: "Payment Successful!"
1026
- }), /*#__PURE__*/_jsx(Text, {
1027
- style: styles.successSubtitle,
1028
- children: "Thank you for your payment."
1029
942
  })]
1030
943
  }), /*#__PURE__*/_jsx(GroupedPillButtons, {
1031
944
  buttons: [{
@@ -1048,44 +961,40 @@ const PaymentGatewayScreen = props => {
1048
961
  scale: scaleAnim
1049
962
  }]
1050
963
  }],
1051
- children: [/*#__PURE__*/_jsxs(Card, {
964
+ children: [/*#__PURE__*/_jsxs(View, {
965
+ style: styles.section,
1052
966
  children: [/*#__PURE__*/_jsx(Text, {
1053
- style: {
1054
- color: colors.text,
1055
- fontWeight: '600',
1056
- fontSize: 16,
1057
- marginBottom: 12
1058
- },
1059
- children: "Select a product to purchase:"
1060
- }), iapLoading && /*#__PURE__*/_jsx(Text, {
1061
- style: {
1062
- color: colors.secondaryText
1063
- },
1064
- children: "Loading products..."
1065
- }), iapError && /*#__PURE__*/_jsx(Text, {
1066
- style: {
1067
- color: 'red'
1068
- },
1069
- children: iapError
1070
- }), iapProducts.map(product => /*#__PURE__*/_jsx(TouchableOpacity, {
1071
- style: [styles.paymentMethodButton, {
1072
- marginBottom: 8
1073
- }],
1074
- onPress: () => handleIapBuy(product.productId),
1075
- disabled: iapLoading,
1076
- children: /*#__PURE__*/_jsxs(Text, {
1077
- style: {
1078
- color: colors.text,
1079
- fontSize: 16
1080
- },
1081
- children: [product.title, " - ", product.localizedPrice]
967
+ style: styles.sectionTitle,
968
+ children: "Google Play Products"
969
+ }), iapLoading && /*#__PURE__*/_jsx(View, {
970
+ style: styles.loadingContainer,
971
+ children: /*#__PURE__*/_jsx(Text, {
972
+ style: styles.loadingText,
973
+ children: "Loading products..."
974
+ })
975
+ }), iapError && /*#__PURE__*/_jsx(View, {
976
+ style: styles.paymentErrorContainer,
977
+ children: /*#__PURE__*/_jsx(Text, {
978
+ style: styles.paymentErrorText,
979
+ children: iapError
980
+ })
981
+ }), !iapLoading && !iapError && /*#__PURE__*/_jsx(GroupedSection, {
982
+ items: iapProducts.map(product => ({
983
+ id: product.productId,
984
+ icon: 'pricetag',
985
+ iconColor: colors.primary,
986
+ title: product.title,
987
+ subtitle: product.localizedPrice,
988
+ onPress: () => handleIapBuy(product.productId),
989
+ disabled: iapLoading
990
+ })),
991
+ theme: theme
992
+ }), iapPurchase && /*#__PURE__*/_jsx(View, {
993
+ style: styles.iapSuccessContainer,
994
+ children: /*#__PURE__*/_jsx(Text, {
995
+ style: styles.iapSuccessText,
996
+ children: "Purchase successful!"
1082
997
  })
1083
- }, product.productId)), iapPurchase && /*#__PURE__*/_jsx(Text, {
1084
- style: {
1085
- color: colors.success,
1086
- marginTop: 10
1087
- },
1088
- children: "Purchase successful!"
1089
998
  })]
1090
999
  }), /*#__PURE__*/_jsx(GroupedPillButtons, {
1091
1000
  buttons: [{
@@ -1114,41 +1023,51 @@ const PaymentGatewayScreen = props => {
1114
1023
  return renderSummaryStep();
1115
1024
  }
1116
1025
  };
1117
- return /*#__PURE__*/_jsxs(KeyboardAvoidingView, {
1026
+
1027
+ // Memoize theme-related calculations to prevent unnecessary recalculations
1028
+ const themeStyles = useMemo(() => {
1029
+ const isDarkTheme = theme === 'dark';
1030
+ return {
1031
+ isDarkTheme,
1032
+ backgroundColor: isDarkTheme ? '#121212' : '#f2f2f2',
1033
+ primaryColor: '#007AFF'
1034
+ };
1035
+ }, [theme]);
1036
+ return /*#__PURE__*/_jsx(View, {
1118
1037
  style: [styles.container, {
1119
- backgroundColor: colors.background
1038
+ backgroundColor: themeStyles.backgroundColor
1120
1039
  }],
1121
- behavior: Platform.OS === 'ios' ? 'padding' : 'height',
1122
- children: [/*#__PURE__*/_jsx(StatusBar, {
1123
- barStyle: theme === 'dark' ? 'light-content' : 'dark-content',
1124
- backgroundColor: colors.background
1125
- }), /*#__PURE__*/_jsx(PaymentGatewayHeader, {
1126
- currentStep: currentStep,
1127
- totalSteps: 5,
1128
- title: stepTitles[currentStep]
1129
- }), /*#__PURE__*/_jsx(ScrollView, {
1130
- contentContainerStyle: styles.scrollContent,
1040
+ children: /*#__PURE__*/_jsx(ScrollView, {
1041
+ style: styles.content,
1131
1042
  showsVerticalScrollIndicator: false,
1132
- keyboardShouldPersistTaps: "handled",
1133
1043
  children: renderCurrentStep()
1134
- })]
1044
+ })
1135
1045
  });
1136
1046
  };
1137
1047
  const createStyles = (colors, theme) => StyleSheet.create({
1138
1048
  container: {
1139
1049
  flex: 1
1140
1050
  },
1141
- scrollContent: {
1142
- flexGrow: 1,
1143
- paddingHorizontal: 24,
1144
- paddingBottom: 20
1051
+ content: {
1052
+ flex: 1,
1053
+ padding: 16
1145
1054
  },
1146
1055
  stepContainer: {
1147
- flex: 1,
1148
1056
  justifyContent: 'flex-start',
1149
1057
  alignItems: 'flex-start',
1150
1058
  width: '100%'
1151
1059
  },
1060
+ section: {
1061
+ marginBottom: 24,
1062
+ width: '100%'
1063
+ },
1064
+ sectionTitle: {
1065
+ fontSize: 16,
1066
+ fontWeight: '600',
1067
+ color: colors.text,
1068
+ marginBottom: 12,
1069
+ fontFamily: fontFamilies.phuduSemiBold
1070
+ },
1152
1071
  stepIndicatorContainer: {
1153
1072
  flexDirection: 'row',
1154
1073
  justifyContent: 'center',
@@ -1181,30 +1100,6 @@ const createStyles = (colors, theme) => StyleSheet.create({
1181
1100
  color: colors.text,
1182
1101
  letterSpacing: -0.5
1183
1102
  },
1184
- headerWrapper: {
1185
- flexDirection: 'column',
1186
- alignItems: 'center',
1187
- justifyContent: 'center',
1188
- width: '100%',
1189
- gap: 8,
1190
- paddingVertical: 8
1191
- },
1192
- card: {
1193
- backgroundColor: '#fff',
1194
- borderRadius: 20,
1195
- padding: 28,
1196
- shadowColor: '#000',
1197
- shadowOffset: {
1198
- width: 0,
1199
- height: 2
1200
- },
1201
- shadowOpacity: 0.08,
1202
- shadowRadius: 8,
1203
- elevation: 3,
1204
- marginVertical: 8,
1205
- width: '100%',
1206
- alignSelf: 'center'
1207
- },
1208
1103
  paymentMethodButton: {
1209
1104
  flexDirection: 'row',
1210
1105
  alignItems: 'center',
@@ -1316,6 +1211,33 @@ const createStyles = (colors, theme) => StyleSheet.create({
1316
1211
  color: colors.primary,
1317
1212
  fontWeight: '600'
1318
1213
  },
1214
+ oxyPayCard: {
1215
+ backgroundColor: '#fff',
1216
+ borderRadius: 16,
1217
+ padding: 24,
1218
+ marginBottom: 24,
1219
+ alignItems: 'center',
1220
+ width: '100%'
1221
+ },
1222
+ oxyPayContent: {
1223
+ alignItems: 'center',
1224
+ width: '100%'
1225
+ },
1226
+ oxyPayMainTitle: {
1227
+ fontFamily: fontFamilies.phuduBold,
1228
+ fontWeight: 'bold',
1229
+ fontSize: 28,
1230
+ color: colors.text,
1231
+ marginBottom: 2,
1232
+ textAlign: 'center',
1233
+ letterSpacing: 0.5
1234
+ },
1235
+ oxyPayWaiting: {
1236
+ fontSize: 14,
1237
+ color: colors.secondaryText,
1238
+ textAlign: 'center',
1239
+ marginBottom: 8
1240
+ },
1319
1241
  faircoinContainer: {
1320
1242
  alignItems: 'center',
1321
1243
  marginBottom: 24,
@@ -1324,6 +1246,66 @@ const createStyles = (colors, theme) => StyleSheet.create({
1324
1246
  faircoinIcon: {
1325
1247
  marginBottom: 8
1326
1248
  },
1249
+ faircoinMainTitle: {
1250
+ fontFamily: fontFamilies.phuduBold,
1251
+ fontWeight: 'bold',
1252
+ fontSize: 28,
1253
+ color: '#1b1f0a',
1254
+ marginBottom: 2,
1255
+ textAlign: 'center',
1256
+ letterSpacing: 0.5
1257
+ },
1258
+ faircoinSubtitle: {
1259
+ color: '#1b1f0a',
1260
+ fontWeight: '700',
1261
+ fontSize: 17,
1262
+ marginBottom: 18,
1263
+ textAlign: 'center',
1264
+ letterSpacing: 0.2
1265
+ },
1266
+ faircoinScanText: {
1267
+ color: '#1b1f0a',
1268
+ fontWeight: '600',
1269
+ fontSize: 15,
1270
+ marginBottom: 8
1271
+ },
1272
+ faircoinQRCard: {
1273
+ width: 200,
1274
+ height: 200,
1275
+ backgroundColor: '#fff',
1276
+ borderRadius: 32,
1277
+ justifyContent: 'center',
1278
+ alignItems: 'center',
1279
+ marginBottom: 16,
1280
+ padding: 16,
1281
+ borderWidth: 3,
1282
+ borderColor: '#9ffb50',
1283
+ shadowColor: '#9ffb50',
1284
+ shadowOffset: {
1285
+ width: 0,
1286
+ height: 4
1287
+ },
1288
+ shadowOpacity: 0.25,
1289
+ shadowRadius: 12,
1290
+ elevation: 8,
1291
+ position: 'relative'
1292
+ },
1293
+ faircoinQRBadge: {
1294
+ position: 'absolute',
1295
+ bottom: 12,
1296
+ right: 12,
1297
+ backgroundColor: '#fff',
1298
+ borderRadius: 16,
1299
+ padding: 4,
1300
+ shadowColor: '#000',
1301
+ shadowOffset: {
1302
+ width: 0,
1303
+ height: 2
1304
+ },
1305
+ shadowOpacity: 0.1,
1306
+ shadowRadius: 4,
1307
+ elevation: 2
1308
+ },
1327
1309
  faircoinTitle: {
1328
1310
  fontSize: 16,
1329
1311
  marginBottom: 8,
@@ -1356,66 +1338,41 @@ const createStyles = (colors, theme) => StyleSheet.create({
1356
1338
  color: colors.secondaryText,
1357
1339
  textAlign: 'center'
1358
1340
  },
1359
- reviewSecureRow: {
1360
- flexDirection: 'row',
1341
+ faircoinCard: {
1342
+ backgroundColor: '#fff',
1343
+ borderRadius: 16,
1344
+ padding: 24,
1345
+ marginBottom: 24,
1361
1346
  alignItems: 'center',
1362
- marginBottom: 12
1363
- },
1364
- reviewSecureIcon: {
1365
- marginRight: 8
1366
- },
1367
- reviewSecureText: {
1368
- color: colors.success || '#4BB543',
1369
- fontWeight: '600',
1370
- fontSize: 15
1347
+ width: '100%'
1371
1348
  },
1372
- reviewRow: {
1373
- flexDirection: 'row',
1374
- justifyContent: 'space-between',
1349
+ faircoinContent: {
1375
1350
  alignItems: 'center',
1376
- marginBottom: 8
1377
- },
1378
- reviewLabel: {
1379
- fontSize: 15,
1380
- color: colors.secondaryText
1381
- },
1382
- reviewValue: {
1383
- fontSize: 18,
1384
- fontWeight: '700',
1385
- color: colors.text
1386
- },
1387
- reviewMethodRow: {
1388
- flexDirection: 'row',
1389
- alignItems: 'center'
1390
- },
1391
- reviewMethodIcon: {
1392
- marginRight: 6
1393
- },
1394
- reviewMethodText: {
1395
- fontSize: 16,
1396
- color: colors.text
1351
+ width: '100%'
1397
1352
  },
1398
- successContainer: {
1399
- alignItems: 'center',
1400
- justifyContent: 'center',
1353
+ successCard: {
1354
+ backgroundColor: '#fff',
1355
+ borderRadius: 16,
1356
+ padding: 24,
1401
1357
  marginBottom: 24,
1358
+ alignItems: 'center',
1402
1359
  width: '100%'
1403
1360
  },
1404
- successIconBox: {
1405
- backgroundColor: colors.success + '22',
1406
- borderRadius: 48,
1407
- padding: 18,
1408
- marginBottom: 12,
1361
+ successContent: {
1409
1362
  alignItems: 'center',
1410
- justifyContent: 'center'
1363
+ width: '100%'
1411
1364
  },
1412
- successTitle: {
1413
- fontSize: 26,
1414
- fontWeight: '700',
1365
+ successIcon: {
1366
+ marginBottom: 8
1367
+ },
1368
+ successMainTitle: {
1369
+ fontFamily: fontFamilies.phuduBold,
1370
+ fontWeight: 'bold',
1371
+ fontSize: 28,
1415
1372
  color: colors.success || '#4BB543',
1416
- marginBottom: 8,
1373
+ marginBottom: 2,
1417
1374
  textAlign: 'center',
1418
- width: '100%'
1375
+ letterSpacing: 0.5
1419
1376
  },
1420
1377
  successSubtitle: {
1421
1378
  fontSize: 16,
@@ -1424,6 +1381,12 @@ const createStyles = (colors, theme) => StyleSheet.create({
1424
1381
  marginBottom: 8,
1425
1382
  width: '100%'
1426
1383
  },
1384
+ successMessage: {
1385
+ fontSize: 14,
1386
+ color: colors.secondaryText,
1387
+ textAlign: 'center',
1388
+ marginBottom: 8
1389
+ },
1427
1390
  methodCard: {
1428
1391
  flexDirection: 'row',
1429
1392
  alignItems: 'center',
@@ -1540,15 +1503,6 @@ const createStyles = (colors, theme) => StyleSheet.create({
1540
1503
  minHeight: 36,
1541
1504
  marginBottom: 2
1542
1505
  },
1543
- circleCheckOverlay: {
1544
- position: 'absolute',
1545
- bottom: -8,
1546
- right: -8,
1547
- backgroundColor: '#fff',
1548
- borderRadius: 16,
1549
- padding: 0,
1550
- zIndex: 2
1551
- },
1552
1506
  headerStepIndicatorContainer: {
1553
1507
  marginVertical: 2,
1554
1508
  flexDirection: 'row',
@@ -1577,6 +1531,210 @@ const createStyles = (colors, theme) => StyleSheet.create({
1577
1531
  textAlign: 'center',
1578
1532
  marginTop: 6,
1579
1533
  marginBottom: 2
1534
+ },
1535
+ // Google Play step styles
1536
+ loadingContainer: {
1537
+ padding: 16,
1538
+ alignItems: 'center',
1539
+ backgroundColor: '#fff',
1540
+ borderRadius: 12,
1541
+ marginBottom: 16
1542
+ },
1543
+ loadingText: {
1544
+ color: colors.secondaryText,
1545
+ fontSize: 16,
1546
+ fontStyle: 'italic'
1547
+ },
1548
+ paymentErrorContainer: {
1549
+ padding: 16,
1550
+ backgroundColor: '#ffebee',
1551
+ borderRadius: 12,
1552
+ marginBottom: 16,
1553
+ borderWidth: 1,
1554
+ borderColor: '#ffcdd2'
1555
+ },
1556
+ paymentErrorText: {
1557
+ color: '#d32f2f',
1558
+ fontSize: 14,
1559
+ textAlign: 'center'
1560
+ },
1561
+ iapSuccessContainer: {
1562
+ padding: 16,
1563
+ backgroundColor: '#e8f5e8',
1564
+ borderRadius: 12,
1565
+ marginTop: 16,
1566
+ borderWidth: 1,
1567
+ borderColor: '#c8e6c9'
1568
+ },
1569
+ iapSuccessText: {
1570
+ color: colors.success || '#4BB543',
1571
+ fontSize: 16,
1572
+ textAlign: 'center',
1573
+ fontWeight: '600'
1574
+ },
1575
+ // Summary step styles
1576
+ summaryDescriptionContainer: {
1577
+ marginBottom: 16
1578
+ },
1579
+ summaryDescriptionText: {
1580
+ color: colors.secondaryText,
1581
+ fontSize: 15,
1582
+ lineHeight: 20
1583
+ },
1584
+ summaryItemPrice: {
1585
+ color: colors.text,
1586
+ fontWeight: '600',
1587
+ fontSize: 16
1588
+ },
1589
+ summaryFallbackContainer: {
1590
+ padding: 16,
1591
+ backgroundColor: '#fff',
1592
+ borderRadius: 12,
1593
+ borderWidth: 1,
1594
+ borderColor: colors.border
1595
+ },
1596
+ summaryFallbackText: {
1597
+ color: colors.text,
1598
+ fontSize: 16,
1599
+ textAlign: 'center'
1600
+ },
1601
+ // Card payment styles
1602
+ cardPaymentCard: {
1603
+ backgroundColor: '#fff',
1604
+ borderRadius: 16,
1605
+ padding: 24,
1606
+ marginBottom: 24,
1607
+ alignItems: 'center',
1608
+ width: '100%'
1609
+ },
1610
+ cardPaymentContent: {
1611
+ alignItems: 'center',
1612
+ width: '100%'
1613
+ },
1614
+ cardPaymentIcon: {
1615
+ marginBottom: 8
1616
+ },
1617
+ cardPaymentMainTitle: {
1618
+ fontFamily: fontFamilies.phuduBold,
1619
+ fontWeight: 'bold',
1620
+ fontSize: 28,
1621
+ color: colors.text,
1622
+ marginBottom: 2,
1623
+ textAlign: 'center',
1624
+ letterSpacing: 0.5
1625
+ },
1626
+ cardPaymentSubtitle: {
1627
+ fontSize: 16,
1628
+ color: colors.secondaryText,
1629
+ textAlign: 'center',
1630
+ marginBottom: 24,
1631
+ width: '100%'
1632
+ },
1633
+ cardPaymentFields: {
1634
+ width: '100%',
1635
+ marginBottom: 16
1636
+ },
1637
+ cardPaymentWaiting: {
1638
+ fontSize: 14,
1639
+ color: colors.secondaryText,
1640
+ textAlign: 'center',
1641
+ marginBottom: 8
1642
+ },
1643
+ // Summary card styles
1644
+ summaryCard: {
1645
+ backgroundColor: '#fff',
1646
+ borderRadius: 16,
1647
+ padding: 24,
1648
+ marginBottom: 24,
1649
+ alignItems: 'center',
1650
+ width: '100%'
1651
+ },
1652
+ summaryCardContent: {
1653
+ alignItems: 'center',
1654
+ width: '100%'
1655
+ },
1656
+ summaryCardIcon: {
1657
+ marginBottom: 8
1658
+ },
1659
+ summaryCardMainTitle: {
1660
+ fontFamily: fontFamilies.phuduBold,
1661
+ fontWeight: 'bold',
1662
+ fontSize: 28,
1663
+ color: colors.text,
1664
+ marginBottom: 2,
1665
+ textAlign: 'center',
1666
+ letterSpacing: 0.5
1667
+ },
1668
+ summaryCardSubtitle: {
1669
+ fontSize: 16,
1670
+ color: colors.secondaryText,
1671
+ textAlign: 'center',
1672
+ marginBottom: 24,
1673
+ width: '100%'
1674
+ },
1675
+ summaryCardItems: {
1676
+ width: '100%',
1677
+ marginBottom: 16
1678
+ },
1679
+ summaryCardTotal: {
1680
+ fontSize: 18,
1681
+ fontWeight: 'bold',
1682
+ color: colors.text,
1683
+ textAlign: 'center',
1684
+ marginBottom: 8
1685
+ },
1686
+ // Simple amount styles
1687
+ summaryCardAmount: {
1688
+ alignItems: 'center',
1689
+ width: '100%',
1690
+ marginBottom: 16
1691
+ },
1692
+ summaryCardAmountLabel: {
1693
+ fontSize: 16,
1694
+ color: colors.secondaryText,
1695
+ textAlign: 'center',
1696
+ marginBottom: 8
1697
+ },
1698
+ summaryCardAmountValue: {
1699
+ fontSize: 32,
1700
+ fontWeight: 'bold',
1701
+ color: colors.text,
1702
+ textAlign: 'center',
1703
+ marginBottom: 8,
1704
+ fontFamily: fontFamilies.phuduBold
1705
+ },
1706
+ summaryCardAmountDescription: {
1707
+ fontSize: 14,
1708
+ color: colors.secondaryText,
1709
+ textAlign: 'center',
1710
+ lineHeight: 20
1711
+ },
1712
+ // Enhanced summary styles
1713
+ summaryCardDivider: {
1714
+ height: 1,
1715
+ backgroundColor: colors.border,
1716
+ marginVertical: 16,
1717
+ width: '100%'
1718
+ },
1719
+ summaryCardTotalSection: {
1720
+ width: '100%',
1721
+ marginBottom: 8
1722
+ },
1723
+ summaryCardTotalRow: {
1724
+ flexDirection: 'row',
1725
+ justifyContent: 'space-between',
1726
+ alignItems: 'center',
1727
+ paddingVertical: 4
1728
+ },
1729
+ summaryCardTotalLabel: {
1730
+ fontSize: 16,
1731
+ color: colors.secondaryText,
1732
+ fontWeight: '500'
1733
+ },
1734
+ summaryCardTotalValue: {
1735
+ fontSize: 16,
1736
+ color: colors.text,
1737
+ fontWeight: '600'
1580
1738
  }
1581
1739
  });
1582
1740
  export default PaymentGatewayScreen;