solidus_six_saferpay 0.1.1 → 0.1.2
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/app/assets/javascripts/solidus_six_saferpay/saferpay_payment.js +1 -3
- data/app/assets/stylesheets/solidus_six_saferpay/loading_animation.scss +1 -1
- data/app/assets/stylesheets/solidus_six_saferpay/payments.scss +0 -2
- data/app/models/spree/six_saferpay_payment.rb +22 -9
- data/app/services/spree/solidus_six_saferpay/inquire_payment.rb +1 -1
- data/app/services/spree/solidus_six_saferpay/process_authorized_payment.rb +0 -1
- data/lib/solidus_six_saferpay/gateway_response.rb +2 -2
- data/lib/solidus_six_saferpay/version.rb +1 -1
- metadata +4 -8
- data/app/helpers/solidus_six_saferpay/application_helper.rb +0 -4
- data/app/jobs/solidus_six_saferpay/application_job.rb +0 -4
- data/app/mailers/solidus_six_saferpay/application_mailer.rb +0 -6
- data/lib/tasks/solidus_six_saferpay_tasks.rake +0 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ccb5b89d37a205f093576ec9a755e3fbc54d362fc45010fc5c7164b699810583
|
4
|
+
data.tar.gz: b115f124017c811c3fd2964dbd26d86a74c4cc74e9a934014d81a1a96ce6561e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 17b439ff9f469106de99a5f8dd4060fecd786525580b9f04f5d5f5ce9b26c32fc92138725457c836297f579d3208daa30f6768b5fe3acfb35fc7c5a1fdc860fc
|
7
|
+
data.tar.gz: 69d2115b15b049ab4d27e680c8d2169fcb2db70ebde4c0402424ff47924fcbb7adc97a941e82d9494c0981b550f446476133895f43102c8033fadc630be04aa3
|
@@ -30,40 +30,53 @@ module Spree
|
|
30
30
|
@address ||= order.bill_address
|
31
31
|
end
|
32
32
|
|
33
|
+
# This memoization only works if response_payment_means is not nil.
|
33
34
|
def payment_means
|
34
|
-
@payment_means ||=
|
35
|
+
@payment_means ||= begin
|
36
|
+
if payment_means_response = response_hash[:payment_means]
|
37
|
+
::SixSaferpay::ResponsePaymentMeans.new(payment_means_response)
|
38
|
+
end
|
39
|
+
end
|
35
40
|
end
|
36
41
|
|
37
42
|
def transaction
|
38
|
-
@transaction ||=
|
43
|
+
@transaction ||= begin
|
44
|
+
if transaction_response = response_hash[:transaction]
|
45
|
+
::SixSaferpay::Transaction.new(transaction_response)
|
46
|
+
end
|
47
|
+
end
|
39
48
|
end
|
40
49
|
|
41
50
|
def liability
|
42
|
-
@liability ||=
|
51
|
+
@liability ||= begin
|
52
|
+
if liability_response = response_hash[:liability]
|
53
|
+
::SixSaferpay::Liability.new(liability_response)
|
54
|
+
end
|
55
|
+
end
|
43
56
|
end
|
44
57
|
|
45
58
|
def card
|
46
|
-
payment_means
|
59
|
+
payment_means&.card
|
47
60
|
end
|
48
61
|
|
49
62
|
def name
|
50
|
-
card
|
63
|
+
card&.holder_name
|
51
64
|
end
|
52
65
|
|
53
66
|
def brand_name
|
54
|
-
payment_means
|
67
|
+
payment_means&.brand&.name
|
55
68
|
end
|
56
69
|
|
57
70
|
def month
|
58
|
-
card
|
71
|
+
card&.exp_month
|
59
72
|
end
|
60
73
|
|
61
74
|
def year
|
62
|
-
card
|
75
|
+
card&.exp_year
|
63
76
|
end
|
64
77
|
|
65
78
|
def icon_name
|
66
|
-
payment_means
|
79
|
+
payment_means&.brand&.payment_method&.downcase
|
67
80
|
end
|
68
81
|
end
|
69
82
|
end
|
@@ -28,7 +28,6 @@ module Spree
|
|
28
28
|
|
29
29
|
rescue ::SolidusSixSaferpay::InvalidSaferpayPayment => e
|
30
30
|
cancel_saferpay_payment
|
31
|
-
# TODO: Check if messages from liability shift check and PaymentValidator are appropriate for user!
|
32
31
|
@user_message = e.full_message
|
33
32
|
@success = false
|
34
33
|
|
@@ -20,7 +20,7 @@ module SolidusSixSaferpay
|
|
20
20
|
# To ensure that solidus sets the response_code after successful capture,
|
21
21
|
# we need to pass it as an "authorization", however if we do this then
|
22
22
|
# solidus also expects there to be an "avs_result"
|
23
|
-
#
|
23
|
+
#
|
24
24
|
# see https://github.com/solidusio/solidus/blob/master/core/app/models/spree/payment/processing.rb#L171
|
25
25
|
def avs_result
|
26
26
|
{}
|
@@ -29,7 +29,7 @@ module SolidusSixSaferpay
|
|
29
29
|
# To ensure that solidus sets the response_code after successful capture,
|
30
30
|
# we need to pass it as an "authorization", however if we do this then
|
31
31
|
# solidus also expects this response to respond to :cvv_result
|
32
|
-
#
|
32
|
+
#
|
33
33
|
# see https://github.com/solidusio/solidus/blob/master/core/app/models/spree/payment/processing.rb#L171
|
34
34
|
def cvv_result
|
35
35
|
nil
|
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.2
|
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-11-
|
11
|
+
date: 2019-11-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -72,14 +72,14 @@ dependencies:
|
|
72
72
|
requirements:
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: '2.
|
75
|
+
version: '2.2'
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: '2.
|
82
|
+
version: '2.2'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: sqlite3
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -245,9 +245,6 @@ files:
|
|
245
245
|
- app/controllers/spree/solidus_six_saferpay/checkout_controller.rb
|
246
246
|
- app/controllers/spree/solidus_six_saferpay/payment_page/checkout_controller.rb
|
247
247
|
- app/controllers/spree/solidus_six_saferpay/transaction/checkout_controller.rb
|
248
|
-
- app/helpers/solidus_six_saferpay/application_helper.rb
|
249
|
-
- app/jobs/solidus_six_saferpay/application_job.rb
|
250
|
-
- app/mailers/solidus_six_saferpay/application_mailer.rb
|
251
248
|
- app/models/solidus_six_saferpay/application_record.rb
|
252
249
|
- app/models/spree/payment_method/saferpay_payment_method.rb
|
253
250
|
- app/models/spree/payment_method/saferpay_payment_page.rb
|
@@ -291,7 +288,6 @@ files:
|
|
291
288
|
- lib/solidus_six_saferpay/payment_page_gateway.rb
|
292
289
|
- lib/solidus_six_saferpay/transaction_gateway.rb
|
293
290
|
- lib/solidus_six_saferpay/version.rb
|
294
|
-
- lib/tasks/solidus_six_saferpay_tasks.rake
|
295
291
|
homepage: http://fadendaten.ch
|
296
292
|
licenses:
|
297
293
|
- MIT
|