totalPayment.tsx 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649
  1. import { router, useFocusEffect, useNavigation } from 'expo-router';
  2. import {
  3. View,
  4. Text,
  5. ScrollView,
  6. Pressable,
  7. StyleSheet,
  8. Image,
  9. BackHandler,
  10. Alert,
  11. Linking,
  12. AppState,
  13. Modal,
  14. ActivityIndicator
  15. } from 'react-native';
  16. import { SafeAreaView } from 'react-native-safe-area-context';
  17. import NormalButton from '../../../../component/global/normal_button';
  18. import { PreviousPageBlackSvg } from '../../../../component/global/SVG';
  19. import { useChargingStore } from '../../../../providers/scan_qr_payload_store';
  20. import { useCallback, useEffect, useLayoutEffect, useRef, useState } from 'react';
  21. import useUserInfoStore from '../../../../providers/userinfo_store';
  22. import { chargeStationService } from '../../../../service/chargeStationService';
  23. import { authenticationService } from '../../../../service/authService';
  24. import axios from 'axios';
  25. import sha256 from 'crypto-js/sha256';
  26. import { walletService } from '../../../../service/walletService';
  27. import AsyncStorage from '@react-native-async-storage/async-storage';
  28. const TotalPayment = () => {
  29. const {
  30. promotion_code,
  31. stationID,
  32. sum_of_coupon,
  33. scanned_qr_code,
  34. coupon_detail,
  35. total_power,
  36. processed_coupon_store,
  37. setPromotionCode,
  38. setCouponDetail,
  39. setTotalPower,
  40. setProcessedCouponStore,
  41. setSumOfCoupon,
  42. setCurrentPriceStore
  43. } = useChargingStore();
  44. const [currentPriceTotalPayment, setCurrentPriceTotalPayment] = useState<number | null>(null);
  45. const [walletBalance, setWalletBalance] = useState<number | null>(null);
  46. const [loading, setLoading] = useState(false);
  47. const [outTradeNo, setOutTradeNo] = useState('');
  48. const [isExpectingPayment, setIsExpectingPayment] = useState(false);
  49. const paymentInitiatedTime = useRef(null);
  50. const PAYMENT_CHECK_TIMEOUT = 5 * 60 * 1000; // 5 minutes in milliseconds
  51. const appState = useRef(AppState.currentState);
  52. const [totalPrice, setTotalPrice] = useState<number | null>(null);
  53. const [paymentStatus, setPaymentStatus] = useState(null);
  54. const [loadingModalVisible, setLoadingModalVisible] = useState(false);
  55. //fetch current price based on using coupon or not. use coupon = $3.5
  56. useEffect(() => {
  57. const fetchCurrentPrice = async () => {
  58. try {
  59. //if promotion_code.length > 0, fetch original price, otherwise fetch current price
  60. //then calculate total price for display purpose
  61. if (promotion_code.length > 0) {
  62. const response = await chargeStationService.getOriginalPriceInPay(stationID);
  63. setCurrentPriceTotalPayment(response);
  64. let totalPrice = Number(total_power) * Number(response) - Number(sum_of_coupon);
  65. if (totalPrice < 0) {
  66. totalPrice = 0;
  67. } else {
  68. totalPrice = totalPrice;
  69. }
  70. setTotalPrice(totalPrice);
  71. } else {
  72. const response = await chargeStationService.getCurrentPriceInPay(stationID);
  73. setCurrentPriceTotalPayment(response);
  74. let totalPrice = Number(total_power) * Number(response);
  75. setTotalPrice(totalPrice);
  76. }
  77. } catch (error) {
  78. // More specific error handling
  79. if (axios.isAxiosError(error)) {
  80. const errorMessage = error.response?.data?.message || 'Network error occurred';
  81. Alert.alert('Error', `Unable to fetch price: ${errorMessage}`, [
  82. {
  83. text: 'OK',
  84. onPress: () => {
  85. cleanupData();
  86. router.push('/mainPage');
  87. }
  88. }
  89. ]);
  90. } else {
  91. Alert.alert('Error', 'An unexpected error occurred while fetching the price', [
  92. {
  93. text: 'OK',
  94. onPress: () => {
  95. cleanupData();
  96. router.push('/mainPage');
  97. }
  98. }
  99. ]);
  100. }
  101. }
  102. };
  103. fetchCurrentPrice();
  104. }, []);
  105. // Add this effect to handle Android back button
  106. useFocusEffect(
  107. useCallback(() => {
  108. const onBackPress = () => {
  109. cleanupData();
  110. if (router.canGoBack()) {
  111. router.back();
  112. } else {
  113. router.replace('/scanQrPage');
  114. }
  115. return true;
  116. };
  117. BackHandler.addEventListener('hardwareBackPress', onBackPress);
  118. return () => BackHandler.removeEventListener('hardwareBackPress', onBackPress);
  119. }, [])
  120. );
  121. //check payment status
  122. useEffect(() => {
  123. const subscription = AppState.addEventListener('change', (nextAppState: any) => {
  124. if (
  125. appState.current.match(/inactive|background/) &&
  126. nextAppState === 'active' &&
  127. isExpectingPayment &&
  128. // outTradeNo &&
  129. paymentInitiatedTime.current
  130. ) {
  131. const currentTime = new Date().getTime();
  132. if (currentTime - paymentInitiatedTime.current < PAYMENT_CHECK_TIMEOUT) {
  133. checkPaymentStatus();
  134. } else {
  135. // Payment check timeout reached
  136. setIsExpectingPayment(false);
  137. setOutTradeNo('');
  138. paymentInitiatedTime.current = null;
  139. Alert.alert(
  140. 'Payment Timeout',
  141. 'The payment status check has timed out. Please check your payment history.'
  142. );
  143. }
  144. }
  145. appState.current = nextAppState;
  146. });
  147. return () => {
  148. subscription.remove();
  149. };
  150. }, [outTradeNo, isExpectingPayment]);
  151. const navigation = useNavigation();
  152. useLayoutEffect(() => {
  153. navigation.setOptions({
  154. gestureEnabled: false
  155. });
  156. }, [navigation]);
  157. const checkPaymentStatus = async () => {
  158. try {
  159. // console.log('outTradeNo in scanQR Page checkpaymentstatus ', outTradeNo);
  160. const result = await walletService.checkPaymentStatus(outTradeNo);
  161. setPaymentStatus(result);
  162. // console.log('checkPaymentStatus from scan QR checkpaymentStatus', result);
  163. if (result && !result.some((item) => item.errmsg?.includes('處理中'))) {
  164. // Payment successful
  165. // console.log('totalFee', totalFee);
  166. Alert.alert('付款已成功', `你已成功增值。請重新掃描去啟動充電槍。`, [
  167. {
  168. text: '確認',
  169. onPress: async () => {
  170. cleanupData();
  171. router.push('/mainPage');
  172. }
  173. }
  174. ]);
  175. } else {
  176. Alert.alert('付款失敗', '請再試一次。', [
  177. {
  178. text: '確定',
  179. onPress: () => {
  180. cleanupData();
  181. router.push('/mainPage');
  182. }
  183. }
  184. ]);
  185. }
  186. setIsExpectingPayment(false);
  187. setOutTradeNo('');
  188. paymentInitiatedTime.current = null;
  189. } catch (error) {
  190. console.error('Failed to check payment status:', error);
  191. Alert.alert('Error', 'Failed to check payment status. Please check your payment history.');
  192. }
  193. };
  194. const showLoadingAndNavigate = async () => {
  195. setLoadingModalVisible(true);
  196. // Wait for 2 seconds
  197. await new Promise((resolve) => setTimeout(resolve, 2000));
  198. setLoadingModalVisible(false);
  199. router.navigate('(auth)/(tabs)/(home)/mainPage');
  200. router.push('(auth)/(tabs)/(charging)/chargingPage');
  201. };
  202. const cleanupData = () => {
  203. setPromotionCode([]);
  204. setCouponDetail([]);
  205. setProcessedCouponStore([]);
  206. setSumOfCoupon(0);
  207. setTotalPower(null);
  208. };
  209. const handlePay = async () => {
  210. try {
  211. let car, user_id, walletBalance, price_for_pay;
  212. setLoading(true);
  213. if (currentPriceTotalPayment === null) {
  214. Alert.alert('Please wait', 'Still loading price information...');
  215. return;
  216. }
  217. //fetch car with proper try catch
  218. try {
  219. car = await chargeStationService.getUserDefaultCars();
  220. if (!car?.data?.id) {
  221. Alert.alert('Failed to fetch UDCC', 'Please try again later');
  222. return;
  223. }
  224. } catch (error) {
  225. console.error('Failed to fetch user default car:', error);
  226. Alert.alert('Failed to fetch UDC', 'Please try again later');
  227. return;
  228. }
  229. //fetch user id with proper try catch
  230. try {
  231. user_id = await authenticationService.getUserInfo();
  232. if (!user_id?.data?.id) {
  233. Alert.alert('Failed to fetch userID', 'Please try again later');
  234. return;
  235. }
  236. } catch (error) {
  237. console.error('Failed to fetch user ID:', error);
  238. Alert.alert('Failed to fetch user ID', 'Please try again later');
  239. return;
  240. }
  241. // fetch user wallet with proper try catch
  242. try {
  243. walletBalance = await walletService.getWalletBalance();
  244. } catch (error) {
  245. console.error('Failed to fetch user wallet:', error);
  246. Alert.alert('Failed to fetch user wallet', 'Please try again later');
  247. return;
  248. }
  249. //now i have all information ready, i check penalty reservation
  250. //by first fetching all history, then check if penalty_fee > 0 and penalty_paid_status is false
  251. //if there is any, i will show an alert to the user, and once click the alert it will takes them to a page that show the detail of the reservation.
  252. try {
  253. const reservationHistories = await chargeStationService.fetchReservationHistories();
  254. // console.log('reservationHistories', reservationHistories);
  255. //here if i successfully fetch the reservationHistories, i will check if there are penalty, if i cannot fetch, i will simply continue the payment flow
  256. if (reservationHistories || Array.isArray(reservationHistories)) {
  257. const unpaidPenalties = reservationHistories.filter(
  258. (reservation: any) => reservation.penalty_fee > 0 && reservation.penalty_paid_status === false
  259. );
  260. const mostRecentUnpaidReservation = unpaidPenalties.reduce((mostRecent: any, current: any) => {
  261. return new Date(mostRecent.created_at) > new Date(current.created_at) ? mostRecent : current;
  262. }, unpaidPenalties[0]);
  263. if (unpaidPenalties.length > 0) {
  264. Alert.alert(
  265. '未付罰款',
  266. '您有未支付的罰款。請先支付罰款後再重新掃描充電。',
  267. [
  268. {
  269. text: '查看詳情',
  270. onPress: () => {
  271. // Navigate to a page showing penalty details
  272. cleanupData();
  273. router.push({
  274. pathname: '(auth)/(tabs)/(home)/penaltyPaymentPage',
  275. params: {
  276. book_time: mostRecentUnpaidReservation.book_time,
  277. end_time: mostRecentUnpaidReservation.end_time,
  278. actual_end_time: mostRecentUnpaidReservation.actual_end_time,
  279. penalty_fee: mostRecentUnpaidReservation.penalty_fee,
  280. format_order_id: mostRecentUnpaidReservation.format_order_id,
  281. id: mostRecentUnpaidReservation.id
  282. }
  283. });
  284. }
  285. },
  286. {
  287. text: '返回',
  288. onPress: () => {
  289. cleanupData();
  290. if (router.canGoBack()) {
  291. router.push('/mainPage');
  292. } else {
  293. router.push('/mainPage');
  294. }
  295. }
  296. }
  297. ],
  298. { cancelable: false }
  299. );
  300. return;
  301. }
  302. }
  303. } catch (error) {
  304. Alert.alert('Error', 'Failed to fetch reservation histories for penalty checking purpose');
  305. }
  306. const now = new Date();
  307. const end_time_map: {
  308. [key: number]: number;
  309. } = {
  310. 20: 25,
  311. 25: 30,
  312. 30: 40,
  313. 40: 45,
  314. 80: 120
  315. };
  316. const end_time = new Date(now.getTime() + end_time_map[total_power] * 60000);
  317. const payloadForPay = {
  318. stationID: stationID,
  319. connector: scanned_qr_code,
  320. user: user_id.data.id,
  321. book_time: now.toISOString(),
  322. end_time: end_time.toISOString(),
  323. total_power: total_power,
  324. total_fee: total_power * currentPriceTotalPayment,
  325. promotion_code: promotion_code,
  326. with_coupon: promotion_code.length > 0 ? true : false,
  327. car: car.data.id,
  328. type: 'walking',
  329. is_ic_call: false
  330. };
  331. // check if user has enough wallet, if not, link to qf pay page
  332. if (totalPrice === null) {
  333. Alert.alert('Error', 'Unable to fetch totalPrice', [
  334. {
  335. text: 'OK',
  336. onPress: () => {
  337. cleanupData();
  338. router.push('/mainPage');
  339. }
  340. }
  341. ]);
  342. return;
  343. }
  344. if (walletBalance < totalPrice) {
  345. oneTimeCharging(totalPrice);
  346. return;
  347. } else {
  348. // if user has enough wallet, proceed to payment
  349. try {
  350. const response = await walletService.newSubmitPayment(
  351. payloadForPay.stationID,
  352. payloadForPay.connector,
  353. payloadForPay.user,
  354. payloadForPay.book_time,
  355. payloadForPay.end_time,
  356. payloadForPay.total_power,
  357. payloadForPay.total_fee,
  358. payloadForPay.promotion_code,
  359. payloadForPay.with_coupon,
  360. payloadForPay.car,
  361. payloadForPay.type,
  362. payloadForPay.is_ic_call
  363. );
  364. console.log('response in new submit payyment in total payment', response);
  365. if (response.error) {
  366. console.log('bbbbbb');
  367. // Handle error response from the service
  368. Alert.alert('掃描失敗 請稍後再試。', response.message || '未知錯誤', [
  369. {
  370. text: '返回主頁',
  371. onPress: () => {
  372. cleanupData();
  373. router.push('/mainPage');
  374. }
  375. }
  376. ]);
  377. return;
  378. }
  379. if (response === 200 || response === 201) {
  380. Alert.alert('啟動成功', '請按下確認並等待頁面稍後自動跳轉至充電介面', [
  381. {
  382. text: '確認',
  383. onPress: showLoadingAndNavigate
  384. }
  385. ]);
  386. } else {
  387. console.log('avvvvvvvvvvvvva');
  388. Alert.alert('掃描失敗 請稍後再試。', response.error_msg || '未知錯誤', [
  389. {
  390. text: '返回主頁',
  391. onPress: () => {
  392. cleanupData();
  393. router.push('/mainPage');
  394. }
  395. }
  396. ]);
  397. }
  398. } catch (error) {
  399. console.error('Payment submission failed:', error);
  400. Alert.alert('錯誤', '付款提交失敗,請稍後再試。', [
  401. {
  402. text: 'OK',
  403. onPress: () => {
  404. cleanupData();
  405. router.push('/mainPage');
  406. }
  407. }
  408. ]);
  409. }
  410. }
  411. } catch (error) {
  412. console.log('I am here in this block', error);
  413. } finally {
  414. setLoading(false);
  415. }
  416. };
  417. function formatTime(utcTimeString: any) {
  418. // Parse the UTC time string
  419. const date = new Date(utcTimeString);
  420. // Add 8 hours
  421. date.setHours(date.getHours());
  422. // Format the date
  423. const year = date.getFullYear();
  424. const month = String(date.getMonth() + 1).padStart(2, '0');
  425. const day = String(date.getDate()).padStart(2, '0');
  426. const hours = String(date.getHours()).padStart(2, '0');
  427. const minutes = String(date.getMinutes()).padStart(2, '0');
  428. const seconds = String(date.getSeconds()).padStart(2, '0');
  429. // Return the formatted string
  430. return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
  431. }
  432. const oneTimeCharging = async (inputAmount: number) => {
  433. try {
  434. const response = await walletService.getOutTradeNo();
  435. if (response) {
  436. setOutTradeNo(response);
  437. setIsExpectingPayment(true);
  438. paymentInitiatedTime.current = new Date().getTime();
  439. const now = new Date();
  440. const formattedTime = formatTime(now);
  441. let amount = inputAmount * 100;
  442. const origin = 'https://openapi-hk.qfapi.com/checkstand/#/?';
  443. const obj = {
  444. // appcode: '6937EF25DF6D4FA78BB2285441BC05E9',
  445. appcode: '636E234FB30D43598FC8F0140A1A7282',
  446. goods_name: 'Crazy Charge 錢包增值',
  447. out_trade_no: response,
  448. paysource: 'crazycharge_checkout',
  449. return_url: 'https://crazycharge.com.hk/completed',
  450. failed_url: 'https://crazycharge.com.hk/failed',
  451. notify_url: 'https://api.crazycharge.com.hk/api/v1/clients/qfpay/webhook',
  452. sign_type: 'sha256',
  453. txamt: amount,
  454. txcurrcd: 'HKD',
  455. txdtm: formattedTime
  456. };
  457. const paramStringify = (json, flag?) => {
  458. let str = '';
  459. let keysArr = Object.keys(json);
  460. keysArr.sort().forEach((val) => {
  461. if (!json[val]) return;
  462. str += `${val}=${flag ? encodeURIComponent(json[val]) : json[val]}&`;
  463. });
  464. return str.slice(0, -1);
  465. };
  466. // const api_key = '8F59E31F6ADF4D2894365F2BB6D2FF2C';
  467. const api_key = '3E2727FBA2DA403EA325E73F36B07824';
  468. const params = paramStringify(obj);
  469. const sign = sha256(`${params}${api_key}`).toString();
  470. const url = `${origin}${paramStringify(obj, true)}&sign=${sign}`;
  471. try {
  472. const supported = await Linking.canOpenURL(url);
  473. if (supported) {
  474. Alert.alert('', '偵測到您錢包餘額不足,現在為您跳轉到充值頁面', [
  475. {
  476. text: '確定',
  477. onPress: async () => {
  478. await Linking.openURL(url);
  479. }
  480. }
  481. ]);
  482. } else {
  483. Alert.alert('錯誤', '請稍後再試');
  484. }
  485. } catch (error) {
  486. console.error('Top-up failed:', error);
  487. Alert.alert('Error', '一次性付款失敗,請稍後再試');
  488. }
  489. } else {
  490. Alert.alert('Error', 'failed to fetch outTradeNo.');
  491. }
  492. } catch (error) {
  493. Alert.alert('錯誤', '一次性付款失敗,請稍後再試');
  494. }
  495. };
  496. return (
  497. <SafeAreaView className="flex-1 bg-white" edges={['top', 'left', 'right']}>
  498. <Modal transparent={true} visible={loadingModalVisible} animationType="fade">
  499. <View className="flex-1 justify-center items-center bg-black/50">
  500. <View className="bg-white p-6 rounded-lg items-center">
  501. <ActivityIndicator size="large" color="#02677D" />
  502. <Text className="mt-3">請稍候...</Text>
  503. </View>
  504. </View>
  505. </Modal>
  506. <ScrollView className="flex-1 mx-[5%]" showsVerticalScrollIndicator={false}>
  507. <View style={{ marginTop: 25 }}>
  508. <Pressable
  509. onPress={() => {
  510. cleanupData();
  511. if (router.canGoBack()) {
  512. router.back();
  513. } else {
  514. router.replace('/scanQrPage');
  515. }
  516. }}
  517. >
  518. <PreviousPageBlackSvg />
  519. </Pressable>
  520. </View>
  521. <View style={{ marginTop: 25 }}>
  522. <Text style={{ fontSize: 45, paddingBottom: 12 }}>付款概要</Text>
  523. <View>
  524. <View className="flex-row justify-between">
  525. <Text className="text-base lg:text-lg ">充電費用</Text>
  526. <Text className="text-base lg:text-lg">
  527. HK $ {currentPriceTotalPayment ? currentPriceTotalPayment * total_power : 'Loading...'}
  528. </Text>
  529. </View>
  530. <Text style={styles.grayColor} className="text-sm lg:text-base mt-4">
  531. 結算電度數 : {total_power == 80 ? '充滿停機' : `${total_power} KWh`}
  532. </Text>
  533. <Text style={styles.grayColor} className="text-sm lg:text-base mt-4">
  534. 每度電價錢 : $ {currentPriceTotalPayment ? currentPriceTotalPayment : 'Loading...'}
  535. </Text>
  536. <View className="h-0.5 my-3 bg-[#f4f4f4]" />
  537. {processed_coupon_store && processed_coupon_store.length > 0 && (
  538. <Text className="text-base lg:text-lg mb-4 lg:mb-6">優惠劵</Text>
  539. )}
  540. {processed_coupon_store &&
  541. processed_coupon_store?.map((couponObj: any) => (
  542. <View
  543. key={`${couponObj.coupon_detail.amount}-${couponObj.coupon_detail.expire_date}`}
  544. className="flex flex-row items-center justify-between"
  545. >
  546. <View className="flex flex-row items-start ">
  547. <Image
  548. className="w-6 lg:w-8 xl:w-10 h-6 lg:h-8 xl:h-10"
  549. source={require('../../../../assets/couponlogo.png')}
  550. />
  551. <View key={couponObj.coupon_detail.id} className="flex flex-col ml-2 lg:ml-4 ">
  552. <Text className="text-base lg:text-xl text-[#888888] ">
  553. ${couponObj.coupon_detail.amount} 現金劵
  554. </Text>
  555. <Text className=" text-sm lg:text-base my-1 lg:mt-2 lg:mb-4 text-[#888888]">
  556. 有效期{' '}
  557. <Text className="font-[500] text-[#02677D]">
  558. 至 {couponObj.coupon_detail.expire_date.slice(0, 10)}
  559. </Text>
  560. </Text>
  561. </View>
  562. </View>
  563. {/* x 1 */}
  564. <View className="flex flex-row items-center">
  565. <Text className="text-sm lg:text-base">X {' '}</Text>
  566. <View className="w-8 h-8 rounded-full bg-[#02677D] flex items-center justify-center">
  567. <Text className="text-white text-center text-lg">
  568. {couponObj.frequency}
  569. </Text>
  570. </View>
  571. </View>
  572. </View>
  573. ))}
  574. {processed_coupon_store && processed_coupon_store.length > 0 && (
  575. <View className="h-0.5 my-3 bg-[#f4f4f4]" />
  576. )}
  577. <View className="flex-row justify-between ">
  578. <Text className="text-xl">總計</Text>
  579. <Text className="text-3xl">HK$ {totalPrice !== null ? totalPrice : 'Loading...'}</Text>
  580. </View>
  581. <View className="mt-4 ">
  582. <NormalButton
  583. title={
  584. <Text
  585. style={{
  586. color: 'white',
  587. fontSize: 16,
  588. fontWeight: '800'
  589. }}
  590. >
  591. {loading ? '處理中...' : '付款確認'}
  592. </Text>
  593. }
  594. onPress={handlePay}
  595. extendedStyle={{ padding: 24 }}
  596. />
  597. </View>
  598. <View className="h-8" />
  599. </View>
  600. </View>
  601. </ScrollView>
  602. </SafeAreaView>
  603. );
  604. };
  605. export default TotalPayment;
  606. const styles = StyleSheet.create({
  607. grayColor: {
  608. color: '#888888'
  609. },
  610. greenColor: {
  611. color: '#02677D'
  612. }
  613. });