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: d7793c0aec41fce672ee0633228351ac3aac2f42b2ddd130298796a67d1ad3f0
4
- data.tar.gz: a50c7029f6a8420f60db25dccb15674f1bac7e4dad979874fbb968427f929ae1
3
+ metadata.gz: 9955a0a95b06aa963cef321fffefdf9f129dccb2366887604a4e15958b87371a
4
+ data.tar.gz: 86ace8169e398c8ddcb3d40b17531d2403e5838157e94829c4ecd72686e362e5
5
5
  SHA512:
6
- metadata.gz: 6116d80f3f46d00c573e39fa1d57bf2c8edd5eb6e1b253244a1b40f561665b47d50b71480e063ce60fbf7f21d62e09ca0f2ce46c2962c3b330c4d8a760ad2970
7
- data.tar.gz: 06d4f719cda898e6140ca8f0e449b32550540f96c4f1db3932e28924fb3e42afff25c972693f01eca0c76e841fd4462231df5d64716c34a8b530cc9959ca2e1d
6
+ metadata.gz: 7f15eb56fc4239f9cd4b476f700dc3bc7f2b94db0f100f200b5ea5861d64a1f7ba75a46da2362428cd83c51f7aca522351d17d2d6d34bfe2af39f124aafce1e9
7
+ data.tar.gz: 959f42a629dc7167c027755bd29b2cd3ae79563f91bc62bf0fe0835527beb2e002158f402f39d8375d1b89b2e5f795aab6381fdf7fecafa62815b0599f6bddc1
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- spree_vpago (2.2.2.pre.pre7)
4
+ spree_vpago (2.2.2.pre.pre9)
5
5
  faraday
6
6
  google-cloud-firestore
7
7
  spree_api (>= 4.5)
@@ -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
- window.open(data.checkout_qr_url, "_blank");
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
- }, 1500);
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) {
@@ -1,7 +1,7 @@
1
1
  module SpreeVpago
2
2
  module_function
3
3
 
4
- VERSION = '2.2.2-pre7'.freeze
4
+ VERSION = '2.2.2-pre9'.freeze
5
5
 
6
6
  def version
7
7
  Gem::Version.new VERSION
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spree_vpago
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.2.pre.pre7
4
+ version: 2.2.2.pre.pre9
5
5
  platform: ruby
6
6
  authors:
7
7
  - You