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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f7c6fc347bce48aed54a98bf47d4432f79ec1144a882f7c6cf14b55ad1f87663
4
- data.tar.gz: c62d76d1e6661bc0460b3a4be75feeb6d4c6c8a3b1278d1b62dccb53324b6e1a
3
+ metadata.gz: bdd8f50bd5b048c05af17f829cfccd26404d0d7cda2045bb035d13ad1538a07b
4
+ data.tar.gz: 4ecd233d69198bb6519c593c4fb35d72c4abe68bf113f4fc73e95178fb205aff
5
5
  SHA512:
6
- metadata.gz: 2973459504b60f1f6308e6f0db319c1b2e25f19747d2f94aeb3bf48f69b75e87c508f57c197a49440920464952df30e1cb3b6797ba9a782ff375ec1a7c0b0893
7
- data.tar.gz: e8418cf6a8298850075104813a93da543ab148327d7ee6cafdd63be2c1ce5eb64fe457888d695af4931a1b459ee3e60282553e22875a7b530d3099d002c60b8b
6
+ metadata.gz: bf536c675b11021b9c5fcbcb2eaaa4ef74e7a5ba8a201988d8254d33836a355a6bb98748fed8432ad47b5464594a6baa9c24ae843e373cffa7b1c0612cbeee66
7
+ data.tar.gz: 30b0d2b5289f52036d72d4062d7940075ab261e6d0a6f2dafe5ba39d04a6f21a7df18cda72ff4e4682ea95723d8d05f2a5bb02018e6876f24b411f1b7eb57b96
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- spree_vpago (2.3.12)
4
+ spree_vpago (2.3.13)
5
5
  faraday
6
6
  google-cloud-firestore
7
7
  spree_api (>= 4.5)
@@ -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
- # frame-ancestors (set above) supersedes X-Frame-Options in modern
157
- # browsers, but the default SAMEORIGIN header would still block legacy
158
- # browsers from embedding these pages, so drop it for the iframe actions.
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>
@@ -1,3 +1,5 @@
1
1
  <h1>
2
2
  Success
3
3
  </h1>
4
+
5
+ <%= render_success_script %>
@@ -1,7 +1,7 @@
1
1
  module SpreeVpago
2
2
  module_function
3
3
 
4
- VERSION = '2.3.12'.freeze
4
+ VERSION = '2.3.13'.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.3.12
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-07 00:00:00.000000000 Z
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