spree_vpago 2.2.2.pre.pre13 → 2.2.2.pre.pre14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e94689187876e623541aaec9dcb455c5115764ac821e267e459481946d3aa7c7
|
|
4
|
+
data.tar.gz: e7770a4ce6e8917a30cc4f6fa48c35c84092dbdf57eea16dbfd2841c6a0cb04a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b640e0a537b543c96218267cce0d700904acf92e8bb20f0f2a86f56371ad10c17a596b54d560165ce957f0703e6893b867cc099f26a2b117d4db219bf9af1605
|
|
7
|
+
data.tar.gz: e148c061234a0bdba0f8bb0423d02e6e9a6ad0f0c10357f1aab1703785e644b7dccddc8cdce9acd84e550e916d21ec576a4394d01dfc98ed37892d2a18fbf92f
|
data/Gemfile.lock
CHANGED
|
@@ -25,23 +25,24 @@ document.addEventListener("DOMContentLoaded", function () {
|
|
|
25
25
|
})
|
|
26
26
|
.then(res => res.json())
|
|
27
27
|
.then(data => {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
throw new Error("Missing payment URLs");
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
if (data.checkout_qr_url) {
|
|
28
|
+
if (data.checkout_qr_url && data.abapay_deeplink) {
|
|
29
|
+
// 1) Open checkout first (new tab)
|
|
34
30
|
window.open(data.checkout_qr_url, "_blank");
|
|
35
|
-
}
|
|
36
31
|
|
|
37
|
-
|
|
32
|
+
// 2) Then redirect this tab to deeplink
|
|
33
|
+
setTimeout(() => {
|
|
34
|
+
window.location.href = data.abapay_deeplink;
|
|
35
|
+
}, 1000);
|
|
36
|
+
} else if (data.checkout_qr_url) {
|
|
37
|
+
// Only checkout URL available
|
|
38
|
+
window.location.href = data.checkout_qr_url;
|
|
39
|
+
} else if (data.abapay_deeplink) {
|
|
40
|
+
// Only deeplink available
|
|
38
41
|
window.location.href = data.abapay_deeplink;
|
|
39
42
|
}
|
|
40
|
-
|
|
41
43
|
})
|
|
42
44
|
.catch(err => {
|
|
43
45
|
console.error("Error:", err);
|
|
44
|
-
form.submit();
|
|
45
46
|
});
|
|
46
47
|
|
|
47
48
|
} else {
|
data/lib/spree_vpago/version.rb
CHANGED