spree_vpago 2.0.9.pre.beta2 → 2.0.9.pre.beta3
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: f296be84aaf9c992751edaa2755f496ed70899de40b876afeb7013457cf6297a
|
4
|
+
data.tar.gz: 8d586c4b779e6d6e29a60ae07bd941e920132635ec2b870e360763ad65d93caa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6891950168f31b3df2f32b39791c8ba902ae19279886dacbfc60265802674007e2a8ff7437f9ee854f6e796a4061ef00dac7d23b98e043f62d64f0b8195c8368
|
7
|
+
data.tar.gz: a1bcc701762f41001a1327ae1d0609f9b3a0b542a8a24428712eabfee28e200ec357fd946e87586f33bcbaa2ac481403619f5e8325cd286d061097e72e8a571f
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
<% @checkout = ::Vpago::TrueMoney::Checkout.new(@payment) %>
|
2
2
|
<% redirect_urls = @checkout.generate_payment_urls(params[:platform]) %>
|
3
|
+
<%= redirect_urls %>
|
3
4
|
<% @payment.user_informer.payment_is_processing(processing: true) %>
|
4
|
-
|
5
|
+
|
5
6
|
<script>
|
6
7
|
document.addEventListener("DOMContentLoaded", () => {
|
7
8
|
const platform = "<%= params[:platform] %>";
|
@@ -13,18 +14,21 @@
|
|
13
14
|
|
14
15
|
function setupConfirmPaymentButton() {
|
15
16
|
if (platform === "app") {
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
window.top.location.href = redirectUrls.deeplink;
|
20
|
-
}, 1500);
|
21
|
-
|
17
|
+
window.location.href = redirectUrls.deeplink;
|
18
|
+
window.location.href = redirectUrls.webview;
|
19
|
+
|
22
20
|
} else if (confirmButton) {
|
23
|
-
confirmButton.addEventListener("click", () =>
|
24
|
-
|
21
|
+
confirmButton.addEventListener("click", () => {
|
22
|
+
const proceed = confirm("Do you want to open the app?");
|
23
|
+
if (proceed) {
|
24
|
+
window.location.href = redirectUrls.deeplink;
|
25
|
+
}
|
26
|
+
window.open(redirectUrls.webview, "_blank");
|
27
|
+
});
|
25
28
|
}
|
26
29
|
}
|
27
30
|
|
31
|
+
|
28
32
|
function setupPaymentProcessingListener() {
|
29
33
|
if (window.initPaymentProcessingListener) {
|
30
34
|
window.initPaymentProcessingListener(firebaseConfigs, docRefPath, successUrl);
|
data/lib/spree_vpago/version.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
module Vpago
|
2
2
|
module TrueMoney
|
3
3
|
class Checkout < Base
|
4
|
-
def generate_payment_urls(
|
4
|
+
def generate_payment_urls(_platform)
|
5
5
|
request_body = {
|
6
6
|
payment_info: payload.to_json,
|
7
7
|
redirectionType: redirect_type,
|
@@ -17,14 +17,10 @@ module Vpago
|
|
17
17
|
|
18
18
|
body = parse_json(response.body)
|
19
19
|
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
}
|
25
|
-
else
|
26
|
-
body['data']['deeplink']
|
27
|
-
end
|
20
|
+
{
|
21
|
+
webview: body['data']['webview'],
|
22
|
+
deeplink: body['data']['deeplink']
|
23
|
+
}
|
28
24
|
rescue Faraday::Error, JSON::ParserError, NoMethodError => e
|
29
25
|
Rails.logger.error("Failed to generate payment URL: #{e.class} - #{e.message}")
|
30
26
|
raise
|
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.0.9.pre.
|
4
|
+
version: 2.0.9.pre.beta3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- You
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-07-
|
11
|
+
date: 2025-07-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|