spree_vpago 2.1.4.pre.beta3 → 2.1.4.pre.beta4

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: e2751ee764f57d6e508418ca26559d541bc3b96b13d3b7191edf94f500cf0e5c
4
- data.tar.gz: 8542aa29b54bfd73e825669d3df6c2a2f76a3110119d441f077ef12663b61b62
3
+ metadata.gz: 54ada56aa2da14e1dcc11960a2172ec2010b6f3d6e9c98d3d9a9aa3250859969
4
+ data.tar.gz: a5814414f32583c1751850d23f4e9151acd8a885f2dd3730132d39be72623115
5
5
  SHA512:
6
- metadata.gz: 07a440440c01e69082a4ed486eea234ca4bc55970fc5258b7dc7d846275edfee8cc55f630b8151c7eab09e7218541357bc42257ed4fc015c93596e0c9fa87752
7
- data.tar.gz: '06864d9808178cd1fb68d978a09e8cea7b32ba15158814a4773c5f4e841c71528c6c96dcf950c248df73ce1613b6729684276f13ff9ddbd229af826dfb56484b'
6
+ metadata.gz: 01ee171943fbc46335ef5c48b214aabf9afb9fa9533d6f213ad15edd20aec6e733c252f32fc720af6b41a81d91bbaa23977d412c6819ece507c8e17a0669a773
7
+ data.tar.gz: 27b4e56951e99dc7807a1ffe5e2bb78f863423d8a072d7d8155e2a184a51ff6a34998a017fd812e2e2e06ddaa88e5ea458e7c6c361b2e8af9fe80fdb492a369d
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- spree_vpago (2.1.4.pre.beta3)
4
+ spree_vpago (2.1.4.pre.beta4)
5
5
  faraday
6
6
  google-cloud-firestore
7
7
  spree_api (>= 4.5)
@@ -36,9 +36,9 @@ module Spree
36
36
  params[:payment_response] = payment.transaction_response
37
37
 
38
38
  if success
39
- ActiveMerchant::Billing::Response.new(true, 'Payway Gateway: Purchased', params)
39
+ ActiveMerchant::Billing::Response.new(true, 'Vattanac Gateway: Purchased', params)
40
40
  else
41
- ActiveMerchant::Billing::Response.new(false, 'Payway Gateway: Purchasing Failed', params)
41
+ ActiveMerchant::Billing::Response.new(false, 'Vattanac Gateway: Purchasing Failed', params)
42
42
  end
43
43
  end
44
44
 
@@ -1,6 +1,11 @@
1
1
  <%
2
- checkout = Vpago::Vattanac::Checkout.new(@payment)
3
- result = checkout.create
2
+ checkout = Vpago::Vattanac::Checkout.new(@payment)
3
+ result = begin
4
+ checkout.create
5
+ rescue => e
6
+ Rails.logger.error("Vattanac checkout.create failed: #{e.message}")
7
+ { mobile_url: nil, web_url: nil }
8
+ end
4
9
  %>
5
10
 
6
11
  <script>
@@ -8,7 +13,10 @@
8
13
  const mobileUrl = "<%= raw(result[:mobile_url]) %>";
9
14
  const webUrl = "<%= raw(result[:web_url]) %>";
10
15
  if (platform === "app" && mobileUrl) {
11
- window.location.href = mobileUrl;
16
+ window.location.href = mobileUrl;
17
+ setTimeout(() => {
18
+ window.location.href = webUrl
19
+ }, 1500);
12
20
  } else if (platform === "web" && webUrl) {
13
21
  window.location.href = webUrl;
14
22
  } else {
@@ -1,7 +1,7 @@
1
1
  module SpreeVpago
2
2
  module_function
3
3
 
4
- VERSION = '2.1.4-beta3'.freeze
4
+ VERSION = '2.1.4-beta4'.freeze
5
5
 
6
6
  def version
7
7
  Gem::Version.new VERSION
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spree_vpago
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.4.pre.beta3
4
+ version: 2.1.4.pre.beta4
5
5
  platform: ruby
6
6
  authors:
7
7
  - You
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-11-11 00:00:00.000000000 Z
11
+ date: 2025-11-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday