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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7202fabe3b8884bc1ab183e397f2ff18c419acd6c654ae75460b25f4c90fe470
|
4
|
+
data.tar.gz: 1e49380bf2304bd3694b307ee6231a73c212f3af216bf24bf44a4dd31f369f8a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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('.
|
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
|
-
|
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
|
data/config/locales/de.yml
CHANGED
@@ -6,7 +6,7 @@ de:
|
|
6
6
|
init:
|
7
7
|
checkout_not_initialized: Zahlung konnte nicht gestartet werden.
|
8
8
|
success:
|
9
|
-
|
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:
|
data/config/locales/en.yml
CHANGED
@@ -6,7 +6,7 @@ en:
|
|
6
6
|
init:
|
7
7
|
checkout_not_initialized: Payment could not be initialized.
|
8
8
|
success:
|
9
|
-
|
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:
|
data/config/locales/fr.yml
CHANGED
@@ -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
|
-
|
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:
|
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.
|
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:
|
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:
|
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:
|