solidus_six_saferpay 0.1.8 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.ruby-version +1 -0
- data/README.md +3 -0
- data/app/assets/javascripts/solidus_six_saferpay/saferpay_payment.js +4 -1
- data/app/controllers/spree/solidus_six_saferpay/checkout_controller.rb +65 -41
- data/app/controllers/spree/solidus_six_saferpay/transaction/checkout_controller.rb +1 -1
- data/app/models/spree/payment_method/saferpay_payment_method.rb +1 -1
- data/app/models/spree/payment_method/saferpay_payment_page.rb +2 -2
- data/app/models/spree/payment_method/saferpay_transaction.rb +2 -2
- data/app/services/spree/solidus_six_saferpay/cancel_authorized_payment.rb +33 -0
- data/app/services/spree/solidus_six_saferpay/initialize_payment.rb +0 -1
- data/app/services/spree/solidus_six_saferpay/initialize_transaction.rb +0 -1
- data/app/services/spree/solidus_six_saferpay/inquire_payment.rb +27 -1
- data/app/services/spree/solidus_six_saferpay/order_not_found_handler.rb +28 -0
- data/app/services/spree/solidus_six_saferpay/payment_not_found_handler.rb +28 -0
- data/app/services/spree/solidus_six_saferpay/payment_processing_success_handler.rb +26 -0
- data/app/views/spree/checkout/payment/_saferpay_payment.html.erb +2 -2
- data/app/views/spree/solidus_six_saferpay/checkout/{iframe_breakout_redirect.html.erb → iframe_breakout_redirect.erb} +1 -1
- data/config/locales/de.yml +3 -0
- data/config/locales/en.yml +3 -0
- data/config/locales/fr.yml +3 -0
- data/config/routes.rb +6 -6
- data/lib/solidus_six_saferpay/configuration.rb +0 -2
- data/lib/solidus_six_saferpay/gateway.rb +11 -11
- data/lib/solidus_six_saferpay/payment_page_gateway.rb +8 -9
- data/lib/solidus_six_saferpay/transaction_gateway.rb +8 -9
- data/lib/solidus_six_saferpay/version.rb +1 -1
- data/solidus_six_saferpay.gemspec +2 -1
- data/spec/controllers/spree/solidus_six_saferpay/payment_page/checkout_controller_spec.rb +8 -197
- data/spec/controllers/spree/solidus_six_saferpay/transaction/checkout_controller_spec.rb +8 -220
- data/spec/services/spree/solidus_six_saferpay/assert_payment_page_spec.rb +2 -128
- data/spec/services/spree/solidus_six_saferpay/authorize_transaction_spec.rb +3 -127
- data/spec/services/spree/solidus_six_saferpay/cancel_authorized_payment_spec.rb +58 -0
- data/spec/services/spree/solidus_six_saferpay/initialize_payment_page_spec.rb +0 -2
- data/spec/services/spree/solidus_six_saferpay/initialize_transaction_spec.rb +0 -1
- data/spec/services/spree/solidus_six_saferpay/inquire_payment_page_payment_spec.rb +2 -98
- data/spec/services/spree/solidus_six_saferpay/inquire_transaction_payment_spec.rb +2 -98
- data/spec/services/spree/solidus_six_saferpay/order_not_found_handler_spec.rb +30 -0
- data/spec/services/spree/solidus_six_saferpay/payment_not_found_handler_spec.rb +30 -0
- data/spec/services/spree/solidus_six_saferpay/payment_processing_success_handler_spec.rb +34 -0
- data/spec/services/spree/solidus_six_saferpay/process_payment_page_payment_spec.rb +1 -206
- data/spec/services/spree/solidus_six_saferpay/process_transaction_payment_spec.rb +1 -200
- data/spec/solidus_six_saferpay/configuration_spec.rb +0 -3
- data/spec/solidus_six_saferpay/gateway_spec.rb +1 -14
- data/spec/solidus_six_saferpay/payment_page_gateway_spec.rb +16 -14
- data/spec/solidus_six_saferpay/transaction_gateway_spec.rb +17 -14
- data/spec/support/shared_examples/authorize_payment.rb +132 -0
- data/spec/support/shared_examples/checkout_controller.rb +294 -0
- data/spec/support/shared_examples/inquire_payment.rb +118 -0
- data/spec/support/shared_examples/process_authorized_payment.rb +202 -0
- metadata +41 -10
- data/app/services/spree/solidus_six_saferpay/inquire_transaction.rb +0 -7
- data/spec/controllers/spree/solidus_six_saferpay/checkout_controller_spec.rb +0 -41
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.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Simon Kiener
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-03-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: solidus_core
|
@@ -50,14 +50,14 @@ dependencies:
|
|
50
50
|
requirements:
|
51
51
|
- - "~>"
|
52
52
|
- !ruby/object:Gem::Version
|
53
|
-
version:
|
53
|
+
version: 2.8.1
|
54
54
|
type: :runtime
|
55
55
|
prerelease: false
|
56
56
|
version_requirements: !ruby/object:Gem::Requirement
|
57
57
|
requirements:
|
58
58
|
- - "~>"
|
59
59
|
- !ruby/object:Gem::Version
|
60
|
-
version:
|
60
|
+
version: 2.8.1
|
61
61
|
- !ruby/object:Gem::Dependency
|
62
62
|
name: rails-i18n
|
63
63
|
requirement: !ruby/object:Gem::Requirement
|
@@ -148,6 +148,20 @@ dependencies:
|
|
148
148
|
- - "~>"
|
149
149
|
- !ruby/object:Gem::Version
|
150
150
|
version: '0.3'
|
151
|
+
- !ruby/object:Gem::Dependency
|
152
|
+
name: bundler-audit
|
153
|
+
requirement: !ruby/object:Gem::Requirement
|
154
|
+
requirements:
|
155
|
+
- - ">="
|
156
|
+
- !ruby/object:Gem::Version
|
157
|
+
version: '0'
|
158
|
+
type: :development
|
159
|
+
prerelease: false
|
160
|
+
version_requirements: !ruby/object:Gem::Requirement
|
161
|
+
requirements:
|
162
|
+
- - ">="
|
163
|
+
- !ruby/object:Gem::Version
|
164
|
+
version: '0'
|
151
165
|
description: Adds Saferpay Payment Page and Transaction payment methods to your Solidus
|
152
166
|
application
|
153
167
|
email:
|
@@ -162,6 +176,7 @@ files:
|
|
162
176
|
- ".gitignore"
|
163
177
|
- ".rspec"
|
164
178
|
- ".rubocop.yml"
|
179
|
+
- ".ruby-version"
|
165
180
|
- ".travis.yml"
|
166
181
|
- Gemfile
|
167
182
|
- LICENSE
|
@@ -216,13 +231,16 @@ files:
|
|
216
231
|
- app/services/spree/solidus_six_saferpay/assert_payment_page.rb
|
217
232
|
- app/services/spree/solidus_six_saferpay/authorize_payment.rb
|
218
233
|
- app/services/spree/solidus_six_saferpay/authorize_transaction.rb
|
234
|
+
- app/services/spree/solidus_six_saferpay/cancel_authorized_payment.rb
|
219
235
|
- app/services/spree/solidus_six_saferpay/initialize_payment.rb
|
220
236
|
- app/services/spree/solidus_six_saferpay/initialize_payment_page.rb
|
221
237
|
- app/services/spree/solidus_six_saferpay/initialize_transaction.rb
|
222
238
|
- app/services/spree/solidus_six_saferpay/inquire_payment.rb
|
223
239
|
- app/services/spree/solidus_six_saferpay/inquire_payment_page_payment.rb
|
224
|
-
- app/services/spree/solidus_six_saferpay/inquire_transaction.rb
|
225
240
|
- app/services/spree/solidus_six_saferpay/inquire_transaction_payment.rb
|
241
|
+
- app/services/spree/solidus_six_saferpay/order_not_found_handler.rb
|
242
|
+
- app/services/spree/solidus_six_saferpay/payment_not_found_handler.rb
|
243
|
+
- app/services/spree/solidus_six_saferpay/payment_processing_success_handler.rb
|
226
244
|
- app/services/spree/solidus_six_saferpay/payment_validator.rb
|
227
245
|
- app/services/spree/solidus_six_saferpay/process_authorized_payment.rb
|
228
246
|
- app/services/spree/solidus_six_saferpay/process_payment_page_payment.rb
|
@@ -233,7 +251,7 @@ files:
|
|
233
251
|
- app/views/spree/api/payments/source_views/_saferpay_payment.json.jbuilder
|
234
252
|
- app/views/spree/checkout/payment/_saferpay_payment.html.erb
|
235
253
|
- app/views/spree/six_saferpay_payments/_six_saferpay_payment.html.erb
|
236
|
-
- app/views/spree/solidus_six_saferpay/checkout/iframe_breakout_redirect.
|
254
|
+
- app/views/spree/solidus_six_saferpay/checkout/iframe_breakout_redirect.erb
|
237
255
|
- bin/console
|
238
256
|
- bin/rails
|
239
257
|
- bin/rake
|
@@ -257,7 +275,6 @@ files:
|
|
257
275
|
- lib/solidus_six_saferpay/transaction_gateway.rb
|
258
276
|
- lib/solidus_six_saferpay/version.rb
|
259
277
|
- solidus_six_saferpay.gemspec
|
260
|
-
- spec/controllers/spree/solidus_six_saferpay/checkout_controller_spec.rb
|
261
278
|
- spec/controllers/spree/solidus_six_saferpay/payment_page/checkout_controller_spec.rb
|
262
279
|
- spec/controllers/spree/solidus_six_saferpay/transaction/checkout_controller_spec.rb
|
263
280
|
- spec/dummy/.ruby-version
|
@@ -325,12 +342,16 @@ files:
|
|
325
342
|
- spec/services/spree/solidus_six_saferpay/assert_payment_page_spec.rb
|
326
343
|
- spec/services/spree/solidus_six_saferpay/authorize_payment_spec.rb
|
327
344
|
- spec/services/spree/solidus_six_saferpay/authorize_transaction_spec.rb
|
345
|
+
- spec/services/spree/solidus_six_saferpay/cancel_authorized_payment_spec.rb
|
328
346
|
- spec/services/spree/solidus_six_saferpay/initialize_payment_page_spec.rb
|
329
347
|
- spec/services/spree/solidus_six_saferpay/initialize_payment_spec.rb
|
330
348
|
- spec/services/spree/solidus_six_saferpay/initialize_transaction_spec.rb
|
331
349
|
- spec/services/spree/solidus_six_saferpay/inquire_payment_page_payment_spec.rb
|
332
350
|
- spec/services/spree/solidus_six_saferpay/inquire_payment_spec.rb
|
333
351
|
- spec/services/spree/solidus_six_saferpay/inquire_transaction_payment_spec.rb
|
352
|
+
- spec/services/spree/solidus_six_saferpay/order_not_found_handler_spec.rb
|
353
|
+
- spec/services/spree/solidus_six_saferpay/payment_not_found_handler_spec.rb
|
354
|
+
- spec/services/spree/solidus_six_saferpay/payment_processing_success_handler_spec.rb
|
334
355
|
- spec/services/spree/solidus_six_saferpay/payment_validator_spec.rb
|
335
356
|
- spec/services/spree/solidus_six_saferpay/process_authorized_payment_spec.rb
|
336
357
|
- spec/services/spree/solidus_six_saferpay/process_payment_page_payment_spec.rb
|
@@ -343,6 +364,10 @@ files:
|
|
343
364
|
- spec/solidus_six_saferpay/transaction_gateway_spec.rb
|
344
365
|
- spec/spec_helper.rb
|
345
366
|
- spec/support/route_access.rb
|
367
|
+
- spec/support/shared_examples/authorize_payment.rb
|
368
|
+
- spec/support/shared_examples/checkout_controller.rb
|
369
|
+
- spec/support/shared_examples/inquire_payment.rb
|
370
|
+
- spec/support/shared_examples/process_authorized_payment.rb
|
346
371
|
- spec/support/uses_payment_page_gateway.rb
|
347
372
|
- spec/support/uses_transaction_gateway.rb
|
348
373
|
homepage: https://github.com/fadendaten/solidus_six_saferpay
|
@@ -366,13 +391,11 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
366
391
|
- !ruby/object:Gem::Version
|
367
392
|
version: '0'
|
368
393
|
requirements: []
|
369
|
-
|
370
|
-
rubygems_version: 2.7.6
|
394
|
+
rubygems_version: 3.1.4
|
371
395
|
signing_key:
|
372
396
|
specification_version: 4
|
373
397
|
summary: Saferpay Payment Page and Transaction payment methods for Solidus
|
374
398
|
test_files:
|
375
|
-
- spec/controllers/spree/solidus_six_saferpay/checkout_controller_spec.rb
|
376
399
|
- spec/controllers/spree/solidus_six_saferpay/payment_page/checkout_controller_spec.rb
|
377
400
|
- spec/controllers/spree/solidus_six_saferpay/transaction/checkout_controller_spec.rb
|
378
401
|
- spec/dummy/.ruby-version
|
@@ -440,12 +463,16 @@ test_files:
|
|
440
463
|
- spec/services/spree/solidus_six_saferpay/assert_payment_page_spec.rb
|
441
464
|
- spec/services/spree/solidus_six_saferpay/authorize_payment_spec.rb
|
442
465
|
- spec/services/spree/solidus_six_saferpay/authorize_transaction_spec.rb
|
466
|
+
- spec/services/spree/solidus_six_saferpay/cancel_authorized_payment_spec.rb
|
443
467
|
- spec/services/spree/solidus_six_saferpay/initialize_payment_page_spec.rb
|
444
468
|
- spec/services/spree/solidus_six_saferpay/initialize_payment_spec.rb
|
445
469
|
- spec/services/spree/solidus_six_saferpay/initialize_transaction_spec.rb
|
446
470
|
- spec/services/spree/solidus_six_saferpay/inquire_payment_page_payment_spec.rb
|
447
471
|
- spec/services/spree/solidus_six_saferpay/inquire_payment_spec.rb
|
448
472
|
- spec/services/spree/solidus_six_saferpay/inquire_transaction_payment_spec.rb
|
473
|
+
- spec/services/spree/solidus_six_saferpay/order_not_found_handler_spec.rb
|
474
|
+
- spec/services/spree/solidus_six_saferpay/payment_not_found_handler_spec.rb
|
475
|
+
- spec/services/spree/solidus_six_saferpay/payment_processing_success_handler_spec.rb
|
449
476
|
- spec/services/spree/solidus_six_saferpay/payment_validator_spec.rb
|
450
477
|
- spec/services/spree/solidus_six_saferpay/process_authorized_payment_spec.rb
|
451
478
|
- spec/services/spree/solidus_six_saferpay/process_payment_page_payment_spec.rb
|
@@ -458,5 +485,9 @@ test_files:
|
|
458
485
|
- spec/solidus_six_saferpay/transaction_gateway_spec.rb
|
459
486
|
- spec/spec_helper.rb
|
460
487
|
- spec/support/route_access.rb
|
488
|
+
- spec/support/shared_examples/authorize_payment.rb
|
489
|
+
- spec/support/shared_examples/checkout_controller.rb
|
490
|
+
- spec/support/shared_examples/inquire_payment.rb
|
491
|
+
- spec/support/shared_examples/process_authorized_payment.rb
|
461
492
|
- spec/support/uses_payment_page_gateway.rb
|
462
493
|
- spec/support/uses_transaction_gateway.rb
|
@@ -1,41 +0,0 @@
|
|
1
|
-
require 'rails_helper'
|
2
|
-
|
3
|
-
RSpec.describe Spree::SolidusSixSaferpay::CheckoutController, type: :controller do
|
4
|
-
routes { Spree::Core::Engine.routes }
|
5
|
-
|
6
|
-
let(:user) { create(:user) }
|
7
|
-
let(:order) { create(:order) }
|
8
|
-
let(:payment_method) { create(:saferpay_payment_method_transaction) }
|
9
|
-
let(:payment) { create(:six_saferpay_payment) }
|
10
|
-
|
11
|
-
let(:subject) { described_class.new }
|
12
|
-
|
13
|
-
before do
|
14
|
-
allow(controller).to receive_messages try_spree_current_user: user
|
15
|
-
allow(controller).to receive_messages current_order: order
|
16
|
-
end
|
17
|
-
|
18
|
-
describe '#initialize_payment' do
|
19
|
-
it 'is not implemented in this superclass' do
|
20
|
-
expect { subject.send(:initialize_payment, order, payment_method) }.to raise_error(NotImplementedError)
|
21
|
-
end
|
22
|
-
end
|
23
|
-
|
24
|
-
describe '#authorize_payment' do
|
25
|
-
it 'is not implemented in this superclass' do
|
26
|
-
expect { subject.send(:authorize_payment, payment) }.to raise_error(NotImplementedError)
|
27
|
-
end
|
28
|
-
end
|
29
|
-
|
30
|
-
describe '#process_authorization' do
|
31
|
-
it 'is not implemented in this superclass' do
|
32
|
-
expect { subject.send(:process_authorization, payment) }.to raise_error(NotImplementedError)
|
33
|
-
end
|
34
|
-
end
|
35
|
-
|
36
|
-
describe '#inquire_payment' do
|
37
|
-
it 'is not implemented in this superclass' do
|
38
|
-
expect { subject.send(:inquire_payment, payment) }.to raise_error(NotImplementedError)
|
39
|
-
end
|
40
|
-
end
|
41
|
-
end
|