solidus_six_saferpay 0.1.5 → 0.1.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8848c45b0e022027642158af899f3b1c9d577c2e996f9fefece9f18b98d9d23f
4
- data.tar.gz: 6d58c5b848c8afa2b29f3ed61e3af5d59d2972fb4092b91e749ddb9e049fa745
3
+ metadata.gz: 7202fabe3b8884bc1ab183e397f2ff18c419acd6c654ae75460b25f4c90fe470
4
+ data.tar.gz: 1e49380bf2304bd3694b307ee6231a73c212f3af216bf24bf44a4dd31f369f8a
5
5
  SHA512:
6
- metadata.gz: 858c40016a86e47f86b804b58b1196ff9ede4207123923d0a4bb4b2f6ea479eca58eac3d1dc7360ddeedeebe4c058f772a7be09f25b2035f7465d3da14db0cb6
7
- data.tar.gz: ef2cff8cdb39f534a610358ba3d66f53261ebd48f7c394e1deb06d379b313db8fa9d375d932fbb0d606a2538d4f8dfd1ef7207a1ee287a5db934273cb331e11c
6
+ metadata.gz: 6467caba523bb6a51aed70eeacf38f2b45e2bc9b0b9a2c5d43d23e4777ae89cca00bbce71312ce108cb2ce981d8bcf4cc1efebcef8a1abececa3c8170ff87550
7
+ data.tar.gz: 2b2ee111227b9b7df5de845d3ad471916ac73557379e5d77a7ccf43fac6d6ef4523f4b9d4d69f5c9f5aac8dd32093d37c0c3065cdab035a4c86d4bea98ab8147
@@ -4,8 +4,6 @@ module Spree
4
4
 
5
5
  before_action :load_order
6
6
 
7
- after_action :allow_embed, only: [:success, :fail]
8
-
9
7
  def init
10
8
  payment_method = Spree::PaymentMethod.find(params[:payment_method_id])
11
9
  initialized_payment = initialize_payment(@order, payment_method)
@@ -22,7 +20,7 @@ module Spree
22
20
  saferpay_payment = Spree::SixSaferpayPayment.where(order_id: @order.id).order(:created_at).last
23
21
 
24
22
  if saferpay_payment.nil?
25
- raise Spree::Core::GatewayError, t('.payment_source_not_created')
23
+ raise Spree::Core::GatewayError, t('.saferpay_payment_not_found')
26
24
  end
27
25
 
28
26
  # NOTE: PaymentPage payments are authorized directly. Instead, we
@@ -57,20 +55,19 @@ module Spree
57
55
  def fail
58
56
  saferpay_payment = Spree::SixSaferpayPayment.where(order_id: @order.id).order(:created_at).last
59
57
 
60
- payment_inquiry = inquire_payment(saferpay_payment)
58
+ if saferpay_payment
59
+ payment_inquiry = inquire_payment(saferpay_payment)
60
+ flash[:error] = payment_inquiry.user_message
61
+ else
62
+ flash[:error] = I18n.t(:general_error, scope: [:solidus_six_saferpay, :errors])
63
+ end
61
64
 
62
65
  @redirect_path = order_checkout_path(:payment)
63
- flash[:error] = payment_inquiry.user_message
64
66
  render :iframe_breakout_redirect, layout: false
65
67
  end
66
68
 
67
69
  private
68
70
 
69
- def allow_embed
70
- # allow response to be embedded in iFrame
71
- response.headers.except! 'X-Frame-Options'
72
- end
73
-
74
71
  def initialize_payment(order, payment_method)
75
72
  raise NotImplementedError, "Must be implemented in PaymentPageCheckoutController or TransactionCheckoutController"
76
73
  end
@@ -6,7 +6,7 @@ de:
6
6
  init:
7
7
  checkout_not_initialized: Zahlung konnte nicht gestartet werden.
8
8
  success:
9
- payment_source_not_created: Six Saferpay Zahlungsquelle konnte nicht erstellt werden.
9
+ saferpay_payment_not_found: Six Saferpay Zahlung kann nicht gefunden werden.
10
10
  fail:
11
11
  payment_failed: Die Zahlung konnte nicht abgeschlossen werden.
12
12
  payment_page:
@@ -6,7 +6,7 @@ en:
6
6
  init:
7
7
  checkout_not_initialized: Payment could not be initialized.
8
8
  success:
9
- payment_source_not_created: Six Saferpay payment source could not be created.
9
+ saferpay_payment_not_found: Six Saferpay payment can not be found.
10
10
  fail:
11
11
  payment_failed: The payment could not be completed.
12
12
  payment_page:
@@ -6,7 +6,7 @@ fr:
6
6
  init:
7
7
  checkout_not_initialized: Le paiement n'a pas pu être initialisé.
8
8
  success:
9
- payment_source_not_created: La source de paiement Six Saferpay n'a pas pu être créée.
9
+ saferpay_payment_not_found: Paiement Six Saferpay est introuvable.
10
10
  fail:
11
11
  payment_failed: Le paiement n'a pas pu être complété.
12
12
  payment_page:
@@ -1,3 +1,3 @@
1
1
  module SolidusSixSaferpay
2
- VERSION = '0.1.5'
2
+ VERSION = '0.1.7'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: solidus_six_saferpay
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Simon Kiener
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-12-16 00:00:00.000000000 Z
11
+ date: 2020-01-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -39,7 +39,7 @@ dependencies:
39
39
  - !ruby/object:Gem::Version
40
40
  version: '2.7'
41
41
  - !ruby/object:Gem::Dependency
42
- name: solidus_support
42
+ name: solidus_dev_support
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
@@ -94,20 +94,6 @@ dependencies:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
96
  version: '1.4'
97
- - !ruby/object:Gem::Dependency
98
- name: rspec-rails
99
- requirement: !ruby/object:Gem::Requirement
100
- requirements:
101
- - - "~>"
102
- - !ruby/object:Gem::Version
103
- version: '3.8'
104
- type: :development
105
- prerelease: false
106
- version_requirements: !ruby/object:Gem::Requirement
107
- requirements:
108
- - - "~>"
109
- - !ruby/object:Gem::Version
110
- version: '3.8'
111
97
  - !ruby/object:Gem::Dependency
112
98
  name: factory_bot_rails
113
99
  requirement: !ruby/object:Gem::Requirement
@@ -178,34 +164,6 @@ dependencies:
178
164
  - - "~>"
179
165
  - !ruby/object:Gem::Version
180
166
  version: '0.17'
181
- - !ruby/object:Gem::Dependency
182
- name: database_cleaner
183
- requirement: !ruby/object:Gem::Requirement
184
- requirements:
185
- - - "~>"
186
- - !ruby/object:Gem::Version
187
- version: '1.7'
188
- type: :development
189
- prerelease: false
190
- version_requirements: !ruby/object:Gem::Requirement
191
- requirements:
192
- - - "~>"
193
- - !ruby/object:Gem::Version
194
- version: '1.7'
195
- - !ruby/object:Gem::Dependency
196
- name: ffaker
197
- requirement: !ruby/object:Gem::Requirement
198
- requirements:
199
- - - "~>"
200
- - !ruby/object:Gem::Version
201
- version: '2.11'
202
- type: :development
203
- prerelease: false
204
- version_requirements: !ruby/object:Gem::Requirement
205
- requirements:
206
- - - "~>"
207
- - !ruby/object:Gem::Version
208
- version: '2.11'
209
167
  description: Adds Saferpay Payment Page and Transaction payment methods to your Solidus
210
168
  application
211
169
  email: