mirror of
https://github.com/chillpadclub/bedolaga-cabinet.git
synced 2026-07-30 02:23:47 +00:00
@@ -202,18 +202,8 @@ export default function TopUpModal({ method, onClose, initialAmountRubles }: Top
|
|||||||
onSuccess: (data) => {
|
onSuccess: (data) => {
|
||||||
const redirectUrl = data.payment_url || (data as any).invoice_url
|
const redirectUrl = data.payment_url || (data as any).invoice_url
|
||||||
if (redirectUrl) {
|
if (redirectUrl) {
|
||||||
// In Telegram Mini App, try to open directly
|
// Always show the payment link for user to click manually
|
||||||
const webApp = window.Telegram?.WebApp
|
// This ensures it works on all platforms including iOS Safari
|
||||||
if (webApp?.openLink) {
|
|
||||||
try {
|
|
||||||
webApp.openLink(redirectUrl, { try_instant_view: false, try_browser: true })
|
|
||||||
onClose()
|
|
||||||
return
|
|
||||||
} catch (e) {
|
|
||||||
console.warn('[TopUpModal] webApp.openLink failed:', e)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// Otherwise show the link for user to click
|
|
||||||
setPaymentUrl(redirectUrl)
|
setPaymentUrl(redirectUrl)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user