This commit is contained in:
2026-09-02 15:29:47 +08:00
parent 89f55cf884
commit bab8831732
7 changed files with 32 additions and 99 deletions
+10 -35
View File
@@ -17,7 +17,6 @@ import {
openMobikwikPayToBank,
openPhonePePayToBank,
openFreechargePayToBank,
buildFreechargePayToBankDeeplink,
openAmazonPayPayToBank,
FreechargePersonalBind,
FreechargePersonalBindResult,
@@ -85,6 +84,15 @@ const PAYEES: Payee[] = [
amount: '3',
comment: '1234',
},
{
id: 'idbi-demo',
label: 'IDBI demo',
name: 'Test User',
account: '8910888450@nyes',
ifsc: 'IDIB000K548',
amount: '2',
comment: 'test',
},
];
const PAY_PROVIDERS: { id: PayProvider; label: string; color: string }[] = [
@@ -145,11 +153,7 @@ export default function TestScreen() {
const handlePay = async () => {
try {
if (selectedProvider === 'freecharge') {
const deeplink = buildFreechargePayToBankDeeplink(
selectedPayee.account,
selectedPayee.ifsc,
);
console.log('[TestScreen] Freecharge deeplink:', deeplink);
console.log('[TestScreen] Freecharge account:', selectedPayee.account);
}
const ok = await launchPay(selectedProvider, selectedPayee);
if (!ok) {
@@ -256,35 +260,6 @@ export default function TestScreen() {
<TouchableOpacity style={[styles.btn, { backgroundColor: '#3498db' }]} onPress={handleEcho}>
<Text style={styles.btnText}>Echo Test</Text>
</TouchableOpacity>
<Modal
visible={showFcAuth}
transparent
animationType="fade"
statusBarTranslucent
onRequestClose={() => setShowFcAuth(false)}
>
<View style={styles.modalRoot}>
{apiBaseUrl ? (
<FreechargePersonalBind
apiBaseUrl={apiBaseUrl}
isDebug
userId={Api.instance.getUserId()}
processString="Waiting for Freecharge authorization…"
onClose={() => setShowFcAuth(false)}
onSuccess={handleFcAuthSuccess}
onError={msg => {
Alert.alert('Freecharge Auth Failed', msg);
}}
/>
) : (
<View style={styles.loadingBox}>
<ActivityIndicator size="large" color="#fff" />
<Text style={[styles.btnText, { marginTop: 12 }]}>Loading server URL…</Text>
</View>
)}
</View>
</Modal>
</ScrollView>
);
}