spree_vpago 2.2.2.pre.pre7 → 2.2.2.pre.pre9
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: 9955a0a95b06aa963cef321fffefdf9f129dccb2366887604a4e15958b87371a
|
|
4
|
+
data.tar.gz: 86ace8169e398c8ddcb3d40b17531d2403e5838157e94829c4ecd72686e362e5
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7f15eb56fc4239f9cd4b476f700dc3bc7f2b94db0f100f200b5ea5861d64a1f7ba75a46da2362428cd83c51f7aca522351d17d2d6d34bfe2af39f124aafce1e9
|
|
7
|
+
data.tar.gz: 959f42a629dc7167c027755bd29b2cd3ae79563f91bc62bf0fe0835527beb2e002158f402f39d8375d1b89b2e5f795aab6381fdf7fecafa62815b0599f6bddc1
|
data/Gemfile.lock
CHANGED
|
@@ -25,14 +25,40 @@ document.addEventListener("DOMContentLoaded", function () {
|
|
|
25
25
|
})
|
|
26
26
|
.then(res => res.json())
|
|
27
27
|
.then(data => {
|
|
28
|
+
// 🔹 Create webview container for better control
|
|
29
|
+
const webviewContainer = document.createElement('div');
|
|
30
|
+
webviewContainer.style.position = 'fixed';
|
|
31
|
+
webviewContainer.style.top = '0';
|
|
32
|
+
webviewContainer.style.left = '0';
|
|
33
|
+
webviewContainer.style.width = '100%';
|
|
34
|
+
webviewContainer.style.height = '100%';
|
|
35
|
+
webviewContainer.style.zIndex = '9999';
|
|
36
|
+
webviewContainer.style.backgroundColor = 'white';
|
|
37
|
+
|
|
38
|
+
// 🔹 Load QR page in webview
|
|
28
39
|
if (data.checkout_qr_url) {
|
|
29
|
-
|
|
40
|
+
const qrFrame = document.createElement('iframe');
|
|
41
|
+
qrFrame.src = data.checkout_qr_url;
|
|
42
|
+
qrFrame.style.width = '100%';
|
|
43
|
+
qrFrame.style.height = '100%';
|
|
44
|
+
qrFrame.style.border = 'none';
|
|
45
|
+
webviewContainer.appendChild(qrFrame);
|
|
46
|
+
document.body.appendChild(webviewContainer);
|
|
30
47
|
}
|
|
31
48
|
|
|
49
|
+
// 🔹 Attempt ABA deeplink after QR page loads
|
|
32
50
|
if (data.abapay_deeplink) {
|
|
33
51
|
setTimeout(() => {
|
|
52
|
+
// Try direct navigation first (more reliable for deeplinks)
|
|
34
53
|
window.location.href = data.abapay_deeplink;
|
|
35
|
-
|
|
54
|
+
|
|
55
|
+
// Fallback: try opening in new tab if direct fails
|
|
56
|
+
setTimeout(() => {
|
|
57
|
+
if (document.body.contains(webviewContainer)) {
|
|
58
|
+
window.open(data.abapay_deeplink, '_blank');
|
|
59
|
+
}
|
|
60
|
+
}, 500);
|
|
61
|
+
}, 2000);
|
|
36
62
|
}
|
|
37
63
|
|
|
38
64
|
if (!data.checkout_qr_url && !data.abapay_deeplink) {
|
data/lib/spree_vpago/version.rb
CHANGED