spree_vpago 2.3.12 → 2.3.13
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/Gemfile.lock +1 -1
- data/app/controllers/spree/vpago_payments_controller.rb +8 -3
- data/app/helpers/vpago/vpago_payments_helper.rb +6 -0
- data/app/views/spree/vpago_payments/_success_script.html.erb +7 -0
- data/app/views/spree/vpago_payments/success.html.erb +2 -0
- data/lib/spree_vpago/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: bdd8f50bd5b048c05af17f829cfccd26404d0d7cda2045bb035d13ad1538a07b
|
|
4
|
+
data.tar.gz: 4ecd233d69198bb6519c593c4fb35d72c4abe68bf113f4fc73e95178fb205aff
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: bf536c675b11021b9c5fcbcb2eaaa4ef74e7a5ba8a201988d8254d33836a355a6bb98748fed8432ad47b5464594a6baa9c24ae843e373cffa7b1c0612cbeee66
|
|
7
|
+
data.tar.gz: 30b0d2b5289f52036d72d4062d7940075ab261e6d0a6f2dafe5ba39d04a6f21a7df18cda72ff4e4682ea95723d8d05f2a5bb02018e6876f24b411f1b7eb57b96
|
data/Gemfile.lock
CHANGED
|
@@ -23,6 +23,11 @@ module Spree
|
|
|
23
23
|
# GET
|
|
24
24
|
def processing
|
|
25
25
|
@order = @payment.order
|
|
26
|
+
|
|
27
|
+
# Common, not an edge case: the gateway callback or the checkout page's transaction
|
|
28
|
+
# checker often completes the order before the browser lands here. Skipping this page
|
|
29
|
+
# also skips its Firebase listener, so success must post order_is_completed itself
|
|
30
|
+
# (render_success_script) or an embedding iframe modal never closes.
|
|
26
31
|
return redirect_to @payment.success_url, allow_other_host: true if @order.completed?
|
|
27
32
|
|
|
28
33
|
VpagoLogger.log(label: 'Spree::VpagoPaymentsController#processing', data: vpago_log_context)
|
|
@@ -153,9 +158,9 @@ module Spree
|
|
|
153
158
|
raise ActiveRecord::RecordNotFound unless @payment.present?
|
|
154
159
|
end
|
|
155
160
|
|
|
156
|
-
#
|
|
157
|
-
#
|
|
158
|
-
#
|
|
161
|
+
# These pages are embedded in iframes on many partner sites we don't
|
|
162
|
+
# enumerate, so framing is left unrestricted: no frame-ancestors policy, and
|
|
163
|
+
# Rails' default SAMEORIGIN header is dropped for the iframe actions.
|
|
159
164
|
def allow_iframe_embedding
|
|
160
165
|
response.headers.delete('X-Frame-Options')
|
|
161
166
|
end
|
|
@@ -13,6 +13,12 @@ module Vpago
|
|
|
13
13
|
render partial: 'spree/vpago_payments/transaction_checker'
|
|
14
14
|
end
|
|
15
15
|
|
|
16
|
+
# Host apps override success.html.erb; call this from every override so an
|
|
17
|
+
# embedding iframe modal still learns the order completed.
|
|
18
|
+
def render_success_script
|
|
19
|
+
render partial: 'spree/vpago_payments/success_script'
|
|
20
|
+
end
|
|
21
|
+
|
|
16
22
|
# Each payment method may have their own additional processing script,
|
|
17
23
|
# so we will look for the partial based on the payment method class name.
|
|
18
24
|
#
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
// processing redirects here without rendering once the order is complete, so its
|
|
3
|
+
// Firebase listener never posts this. success only renders for completed orders.
|
|
4
|
+
if (window.parent !== window) {
|
|
5
|
+
window.parent.postMessage("order_is_completed", "*");
|
|
6
|
+
}
|
|
7
|
+
</script>
|
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.3.
|
|
4
|
+
version: 2.3.13
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- You
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-09-
|
|
11
|
+
date: 2026-09-30 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: faraday
|
|
@@ -344,6 +344,7 @@ files:
|
|
|
344
344
|
- app/views/spree/payway_results/success.html.erb
|
|
345
345
|
- app/views/spree/payway_v2_card_popups/_form.html.erb
|
|
346
346
|
- app/views/spree/payway_v2_card_popups/show.html.erb
|
|
347
|
+
- app/views/spree/vpago_payments/_success_script.html.erb
|
|
347
348
|
- app/views/spree/vpago_payments/_transaction_checker.html.erb
|
|
348
349
|
- app/views/spree/vpago_payments/checkout.html.erb
|
|
349
350
|
- app/views/spree/vpago_payments/forms/spree/gateway/_acleda_v2.html.erb
|