import React from "react"; import { View, Text, TouchableOpacity, StyleSheet, ScrollView, Alert, } from "react-native"; import { Ionicons } from "@expo/vector-icons"; import { useNavigation } from "@react-navigation/native"; import type { NativeStackNavigationProp } from "@react-navigation/native-stack"; import { RootStackParamList } from "../../navigation/types"; import fontSize from "../../utils/fontsizeUtils"; export const PayError = () => { const navigation = useNavigation>(); const handleRetryPayment = () => { // 导航回支付页面或确认订单页面 navigation.navigate("ConfirmOrder"); }; const viewOrderDetails = () => { // 可以查看订单详情 navigation.navigate("OrderDetails"); }; return ( 支付失败 您的支付未能完成,请检查支付方式或网络连接后重试 订单号 ONL123456789 金额 73800 FCFA 失败原因 支付处理中断 如需帮助,请联系客服: support@example.com 重新支付 订单详情 ); }; const styles = StyleSheet.create({ container: { flex: 1, backgroundColor: "#f1f5f9", }, header: { padding: 30, backgroundColor: "white", borderRadius: 10, margin: 15, shadowColor: "#000", shadowOffset: { width: 0, height: 2 }, shadowOpacity: 0.1, shadowRadius: 4, elevation: 3, }, headerError: { width: "100%", alignItems: "center", marginBottom: 20, }, errorIconContainer: { marginBottom: 15, }, headerErrorText: { marginBottom: 10, }, headerErrorTextTitle: { fontSize: fontSize(22), color: "#E53935", fontWeight: "bold", }, errorMessage: { fontSize: fontSize(14), color: "#666", textAlign: "center", marginBottom: 10, lineHeight: 20, }, errorDetail: { backgroundColor: "#FEF2F2", borderRadius: 8, padding: 15, marginBottom: 20, borderWidth: 1, borderColor: "#FECACA", }, errorDetailItem: { flexDirection: "row", justifyContent: "space-between", paddingVertical: 8, borderBottomWidth: 1, borderBottomColor: "#FECACA", }, errorDetailItemLabel: { fontSize: fontSize(14), color: "#666", fontWeight: "500", }, errorDetailItemValue: { fontSize: fontSize(14), color: "#333", fontWeight: "500", }, supportInfo: { marginBottom: 25, alignItems: "center", }, supportText: { fontSize: fontSize(13), color: "#666", }, buttonContainer: { flexDirection: "row", justifyContent: "space-between", }, button: { width: "47%", height: 44, borderRadius: 22, justifyContent: "center", alignItems: "center", }, retryButton: { backgroundColor: "#0030a7", }, detailsButton: { backgroundColor: "#666", }, buttonText: { fontSize: fontSize(16), color: "white", fontWeight: "500", }, });