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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 54ada56aa2da14e1dcc11960a2172ec2010b6f3d6e9c98d3d9a9aa3250859969
|
|
4
|
+
data.tar.gz: a5814414f32583c1751850d23f4e9151acd8a885f2dd3730132d39be72623115
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 01ee171943fbc46335ef5c48b214aabf9afb9fa9533d6f213ad15edd20aec6e733c252f32fc720af6b41a81d91bbaa23977d412c6819ece507c8e17a0669a773
|
|
7
|
+
data.tar.gz: 27b4e56951e99dc7807a1ffe5e2bb78f863423d8a072d7d8155e2a184a51ff6a34998a017fd812e2e2e06ddaa88e5ea458e7c6c361b2e8af9fe80fdb492a369d
|
data/Gemfile.lock
CHANGED
|
@@ -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, '
|
|
39
|
+
ActiveMerchant::Billing::Response.new(true, 'Vattanac Gateway: Purchased', params)
|
|
40
40
|
else
|
|
41
|
-
ActiveMerchant::Billing::Response.new(false, '
|
|
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
|
-
|
|
3
|
-
|
|
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
|
-
|
|
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 {
|
data/lib/spree_vpago/version.rb
CHANGED
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.
|
|
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
|
+
date: 2025-11-12 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: faraday
|