|
|
@ -761,6 +761,13 @@ export default class PopupPayment extends PopupElement { |
|
|
|
onConfirmed(); |
|
|
|
onConfirmed(); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
popupPaymentVerification = new PopupPaymentVerification(paymentResult.url); |
|
|
|
popupPaymentVerification = new PopupPaymentVerification(paymentResult.url); |
|
|
|
|
|
|
|
popupPaymentVerification.addEventListener('finish', () => { |
|
|
|
|
|
|
|
popupPaymentVerification = undefined; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// setTimeout(() => {
|
|
|
|
|
|
|
|
onConfirmed(); |
|
|
|
|
|
|
|
// }, 0);
|
|
|
|
|
|
|
|
}); |
|
|
|
await new Promise<void>((resolve, reject) => { |
|
|
|
await new Promise<void>((resolve, reject) => { |
|
|
|
popupPaymentVerification.addEventListener('close', () => { |
|
|
|
popupPaymentVerification.addEventListener('close', () => { |
|
|
|
popupPaymentVerification = undefined; |
|
|
|
popupPaymentVerification = undefined; |
|
|
@ -773,11 +780,6 @@ export default class PopupPayment extends PopupElement { |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
popupPaymentVerification.addEventListener('finish', () => { |
|
|
|
|
|
|
|
popupPaymentVerification = undefined; |
|
|
|
|
|
|
|
onConfirmed(); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} catch(err) { |
|
|
|
} catch(err) { |
|
|
|
if((err as ApiError).type === 'BOT_PRECHECKOUT_TIMEOUT') { |
|
|
|
if((err as ApiError).type === 'BOT_PRECHECKOUT_TIMEOUT') { |
|
|
|