async payWithPaypal(context, id) {
context.commit("set_busy", { data: true }, { root: true });
var response = await ApiService.PAY_WITH_PAYPAL(id);
if (response.code == 200 && response.data.success) {
var invoice = response.data.invoice;
AlertUtil.SHOW_SUCCESS_ALERT("Erledigt!");
context.commit("updateInvoice", invoice);
window.open(response.data.redirectUri, "_blank"); // Opening a new window here
} else {
AlertUtil.SHOW_SUCCESS_ALERT(response.data.message);
}
context.commit("set_busy", { data: false }, { root: true });
},
As shown above, I encounter an issue where the browser's popup blocker prevents the opening of a new window when the response is successful. How can I resolve this problem?