spree_vpago 2.2.2.pre.pre30 → 2.2.2.pre.pre31
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 +4 -4
- data/.github/workflows/test_and_publish_gem.yml +2 -0
- data/Gemfile.lock +1 -1
- data/app/assets/javascripts/vpago/vpago_payments/request_process_payment.js +1 -1
- data/app/controllers/spree/vpago_payments_controller.rb +5 -4
- data/app/views/spree/vpago_payments/forms/spree/gateway/_payway_v2.html.erb +9 -3
- data/lib/spree_vpago/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0cac2ef6c704865b5ba2c236353fd764ba0907cff281f19925947b95954fc2b7
|
|
4
|
+
data.tar.gz: 007b70f2dae2a5f2d96bae4b6372ef4f0e671d38a8950111c1e14d49d1904b2f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2188cc7d99fe2b682bb1ad8326ab0558e7630d039c6409cd322249507905cc04ee5a7a20656f4fe33649831e36bd3ed2736017679330c66e4bb12b6ec3460bfa
|
|
7
|
+
data.tar.gz: 279f897282d2479e6eeb17feaf517e792cd0fe1fb66438ac413bfd5eab49d1605a6d9a471d1d35d93bc6a000b6610d74cfc2fe3dc91c9ba34720574c7f12a9da
|
|
@@ -66,6 +66,8 @@ jobs:
|
|
|
66
66
|
# run: |
|
|
67
67
|
# bundle exec brakeman
|
|
68
68
|
|
|
69
|
+
# Run all tests except for pre-release tags (e.g., *-pre)
|
|
70
|
+
# to keep those builds fast and allow faster deployment to our testing server.
|
|
69
71
|
- name: Run test
|
|
70
72
|
if: ${{ !startsWith(github.ref, 'refs/tags/') || !contains(github.ref_name, '-pre') }}
|
|
71
73
|
env:
|
data/Gemfile.lock
CHANGED
|
@@ -68,12 +68,13 @@ module Spree
|
|
|
68
68
|
|
|
69
69
|
# for ABA reviewing mode, we can disable pushback from bank, and only process it from our app UI instead.
|
|
70
70
|
# This will give ABA team to know that we don't rely on just pushback and have fallback to process payment.
|
|
71
|
-
if @payment.payment_method.type_payway_v2? && @payment.payment_method.reviewing_mode? &&
|
|
72
|
-
Rails.logger.info("[Vpago]
|
|
71
|
+
if @payment.payment_method.type_payway_v2? && @payment.payment_method.reviewing_mode? && request_from_external_server?
|
|
72
|
+
Rails.logger.info("[Vpago] Received payment notification from bank in reviewing mode, skipping processing: #{params}")
|
|
73
73
|
return render json: { status: :ok }, status: :ok
|
|
74
74
|
end
|
|
75
75
|
|
|
76
76
|
unless @payment.order.paid?
|
|
77
|
+
Rails.logger.info("[Vpago] Enqueuing payment processor job for payment #{@payment.number}: #{params}")
|
|
77
78
|
Vpago::PaymentProcessorJob.perform_later(
|
|
78
79
|
payment_number: @payment.number
|
|
79
80
|
)
|
|
@@ -123,8 +124,8 @@ module Spree
|
|
|
123
124
|
end
|
|
124
125
|
end
|
|
125
126
|
|
|
126
|
-
def
|
|
127
|
-
|
|
127
|
+
def request_from_external_server?
|
|
128
|
+
params[:internal_client].blank? || params[:internal_client] == 'false'
|
|
128
129
|
end
|
|
129
130
|
end
|
|
130
131
|
end
|
|
@@ -19,9 +19,13 @@
|
|
|
19
19
|
}
|
|
20
20
|
|
|
21
21
|
function openUrl(url, delay = 0) {
|
|
22
|
-
|
|
22
|
+
if(delay > 0) {
|
|
23
|
+
setTimeout(function() {
|
|
24
|
+
window.location.href = url;
|
|
25
|
+
}, delay);
|
|
26
|
+
} else {
|
|
23
27
|
window.location.href = url;
|
|
24
|
-
}
|
|
28
|
+
}
|
|
25
29
|
}
|
|
26
30
|
|
|
27
31
|
function showRedirectContainer(buttonLabel = null, onClick = null) {
|
|
@@ -53,6 +57,7 @@
|
|
|
53
57
|
return response.json();
|
|
54
58
|
})
|
|
55
59
|
.then(function(data) {
|
|
60
|
+
var shouldDelayBeforeOpenCheckoutUrl = false;
|
|
56
61
|
var shouldShowRedirectContainer = false;
|
|
57
62
|
|
|
58
63
|
console.log("[Vpago] checkout response data:", JSON.stringify(data));
|
|
@@ -69,11 +74,12 @@
|
|
|
69
74
|
|
|
70
75
|
if (data.abapay_deeplink && shouldOpenAbaPayDeeplink) {
|
|
71
76
|
openDeeplinkUrl(data.abapay_deeplink);
|
|
77
|
+
shouldDelayBeforeOpenCheckoutUrl = true;
|
|
72
78
|
shouldShowRedirectContainer = true;
|
|
73
79
|
}
|
|
74
80
|
|
|
75
81
|
if (data.checkout_qr_url && shouldOpenCheckoutUrl) {
|
|
76
|
-
openUrl(data.checkout_qr_url);
|
|
82
|
+
openUrl(data.checkout_qr_url, shouldDelayBeforeOpenCheckoutUrl ? 50 : 0);
|
|
77
83
|
shouldShowRedirectContainer = false;
|
|
78
84
|
}
|
|
79
85
|
|
data/lib/spree_vpago/version.rb
CHANGED