|
|
@@ -164,17 +164,23 @@ const stopPolling = () => {
|
|
|
}
|
|
|
|
|
|
const applyPaymentStatus = (nextPayment) => {
|
|
|
- if (!nextPayment) return
|
|
|
+ if (nextPayment.status === 'paid') {
|
|
|
+ processing.value = false
|
|
|
|
|
|
- payment.value = nextPayment
|
|
|
+ $q.notify({
|
|
|
+ type: 'positive',
|
|
|
+ message: 'Pagamento confirmado!',
|
|
|
+ position: 'top',
|
|
|
+ })
|
|
|
+
|
|
|
+ paymentStore.clearPixPaymentForServicePackage(itemId.value)
|
|
|
+ stopPolling()
|
|
|
+
|
|
|
+ onDialogOK()
|
|
|
+
|
|
|
+ return
|
|
|
+}
|
|
|
|
|
|
- if (nextPayment.status === 'paid') {
|
|
|
- success.value = true
|
|
|
- processing.value = false
|
|
|
- paymentStore.clearPixPaymentForServicePackage(itemId.value)
|
|
|
- stopPolling()
|
|
|
- return
|
|
|
- }
|
|
|
|
|
|
if (['failed', 'cancelled'].includes(nextPayment.status)) {
|
|
|
processing.value = false
|