six_saferpay 2.7.0 → 2.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/README.md +1 -1
- data/lib/six_saferpay/api.rb +1 -1
- data/lib/six_saferpay/api/six_transaction/requests/authorize_direct.rb +10 -2
- data/lib/six_saferpay/api/six_transaction/responses/authorize_direct_response.rb +10 -2
- data/lib/six_saferpay/api/six_transaction/responses/query_alternative_payment_response.rb +11 -2
- data/lib/six_saferpay/models/options.rb +15 -3
- data/lib/six_saferpay/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d399ac2630b4738d4d092353368bf9dad2b9431147fc8f7f54eb2143c3bbfa69
|
4
|
+
data.tar.gz: e3f819c8c05341ae3d54c9becf129be14e681fb066d2fd313c91afa40375dffb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b44df74bdef0827ecbd4fa75f2d3fb44ffc36b6838bc3174eaac9c2a3b0a9b05241b9ffef5c132e63939ee6ec0670c86e79867b06d138b1e4509d12410fffe81
|
7
|
+
data.tar.gz: 38574cc66fb5cbd267ec0ed193975eb48dd7b6cb62250bf6b6d32f4cb2eaf149f74e9d8d940a11979b4a394ed076671a914466a32d72765be36315d5af2c368b
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
data/lib/six_saferpay/api.rb
CHANGED
@@ -8,7 +8,9 @@ module SixSaferpay
|
|
8
8
|
:payment_means,
|
9
9
|
:authentication,
|
10
10
|
:register_alias,
|
11
|
-
:payer
|
11
|
+
:payer,
|
12
|
+
:order,
|
13
|
+
:risk_factors
|
12
14
|
)
|
13
15
|
|
14
16
|
|
@@ -18,7 +20,9 @@ module SixSaferpay
|
|
18
20
|
payment_means:,
|
19
21
|
authentication: nil,
|
20
22
|
register_alias: nil,
|
21
|
-
payer: nil
|
23
|
+
payer: nil,
|
24
|
+
order: nil,
|
25
|
+
risk_factors: nil
|
22
26
|
)
|
23
27
|
@request_header = request_header || SixSaferpay::RequestHeader.new()
|
24
28
|
@terminal_id = SixSaferpay.config.terminal_id || terminal_id
|
@@ -27,6 +31,8 @@ module SixSaferpay
|
|
27
31
|
@authentication = SixSaferpay::Authentication.new(authentication.to_h) if authentication
|
28
32
|
@register_alias = SixSaferpay::RegisterAlias.new(register_alias.to_h) if register_alias
|
29
33
|
@payer = SixSaferpay::Payer.new(payer.to_h) if payer
|
34
|
+
@order = SixSaferpay::Order.new(order.to_h) if order
|
35
|
+
@risk_factors = SixSaferpay::RiskFactors.new(risk_factors.to_h) if risk_factors
|
30
36
|
end
|
31
37
|
|
32
38
|
def to_hash
|
@@ -38,6 +44,8 @@ module SixSaferpay
|
|
38
44
|
hash.merge!(authentication: @authentication.to_h) if @authentication
|
39
45
|
hash.merge!(register_alias: @register_alias.to_h) if @register_alias
|
40
46
|
hash.merge!(payer: @payer.to_h) if @payer
|
47
|
+
hash.merge!(order: @order.to_h) if @order
|
48
|
+
hash.merge!(risk_factors: @risk_factors.to_h) if @risk_factors
|
41
49
|
hash
|
42
50
|
end
|
43
51
|
alias_method :to_h, :to_hash
|
@@ -7,7 +7,8 @@ module SixSaferpay
|
|
7
7
|
:payment_means,
|
8
8
|
:payer,
|
9
9
|
:registration_result,
|
10
|
-
:mastercard_issuer_installments
|
10
|
+
:mastercard_issuer_installments,
|
11
|
+
:fraud_prevention
|
11
12
|
)
|
12
13
|
|
13
14
|
|
@@ -16,7 +17,8 @@ module SixSaferpay
|
|
16
17
|
payment_means:,
|
17
18
|
payer: nil,
|
18
19
|
registration_result: nil,
|
19
|
-
mastercard_issuer_installments: nil
|
20
|
+
mastercard_issuer_installments: nil,
|
21
|
+
fraud_prevention: nil
|
20
22
|
)
|
21
23
|
@response_header = SixSaferpay::ResponseHeader.new(response_header.to_h) if response_header
|
22
24
|
@transaction = SixSaferpay::Transaction.new(transaction.to_h) if transaction
|
@@ -27,6 +29,9 @@ module SixSaferpay
|
|
27
29
|
@mastercard_issuer_installments = SixSaferpay::MastercardIssuerInstallments
|
28
30
|
.new(mastercard_issuer_installments.to_h)
|
29
31
|
end
|
32
|
+
if fraud_prevention
|
33
|
+
@fraud_prevention = SixSaferpay::FraudPrevention.new(fraud_prevention.to_h)
|
34
|
+
end
|
30
35
|
end
|
31
36
|
|
32
37
|
def to_hash
|
@@ -39,6 +44,9 @@ module SixSaferpay
|
|
39
44
|
if @mastercard_issuer_installments
|
40
45
|
hash.merge!(mastercard_issuer_installments: mastercard_issuer_installments.to_h)
|
41
46
|
end
|
47
|
+
if @fraud_prevention
|
48
|
+
hash.merge!(fraud_prevention: fraud_prevention.to_h)
|
49
|
+
end
|
42
50
|
hash
|
43
51
|
end
|
44
52
|
alias_method :to_h, :to_hash
|
@@ -6,14 +6,17 @@ module SixSaferpay
|
|
6
6
|
:transaction,
|
7
7
|
:payment_means,
|
8
8
|
:payer,
|
9
|
-
:liability
|
9
|
+
:liability,
|
10
|
+
:fraud_prevention
|
10
11
|
)
|
11
12
|
|
12
13
|
def initialize(response_header: ,
|
13
14
|
transaction: ,
|
14
15
|
payment_means: ,
|
15
16
|
payer: nil,
|
16
|
-
liability: nil
|
17
|
+
liability: nil,
|
18
|
+
fraud_prevention: nil
|
19
|
+
)
|
17
20
|
|
18
21
|
|
19
22
|
@response_header = SixSaferpay::ResponseHeader.new(response_header.to_h) if response_header
|
@@ -21,6 +24,9 @@ module SixSaferpay
|
|
21
24
|
@payment_means = SixSaferpay::ResponsePaymentMeans.new(payment_means.to_h)
|
22
25
|
@payer = SixSaferpay::Payer.new(payer.to_h) if payer
|
23
26
|
@liability = SixSaferpay::Liability.new(liability.to_h) if liability
|
27
|
+
if fraud_prevention
|
28
|
+
@fraud_prevention = SixSaferpay::FraudPrevention.new(fraud_prevention.to_h)
|
29
|
+
end
|
24
30
|
end
|
25
31
|
|
26
32
|
def to_hash
|
@@ -30,6 +36,9 @@ module SixSaferpay
|
|
30
36
|
hash.merge!(payment_means: @payment_means.to_h) if @payment_means
|
31
37
|
hash.merge!(payer: @payer.to_h) if @payer
|
32
38
|
hash.merge!(liability: @liability.to_h) if @liability
|
39
|
+
if @fraud_prevention
|
40
|
+
hash.merge!(fraud_prevention: fraud_prevention.to_h)
|
41
|
+
end
|
33
42
|
hash
|
34
43
|
end
|
35
44
|
alias_method :to_h, :to_hash
|
@@ -1,15 +1,27 @@
|
|
1
1
|
module SixSaferpay
|
2
2
|
class Options
|
3
3
|
|
4
|
-
attr_accessor
|
4
|
+
attr_accessor(
|
5
|
+
:pre_auth,
|
6
|
+
:allow_partial_authorization,
|
7
|
+
)
|
5
8
|
|
6
|
-
def initialize(
|
9
|
+
def initialize(
|
10
|
+
pre_auth: nil,
|
11
|
+
allow_partial_authorization: nil
|
12
|
+
)
|
7
13
|
@pre_auth = pre_auth
|
14
|
+
@allow_partial_authorization = allow_partial_authorization
|
8
15
|
end
|
9
16
|
|
10
17
|
def to_hash
|
11
18
|
hash = Hash.new
|
12
|
-
|
19
|
+
if !@pre_auth.nil?
|
20
|
+
hash.merge!(pre_auth: @pre_auth)
|
21
|
+
end
|
22
|
+
if !@allow_partial_authorization.nil?
|
23
|
+
hash.merge!(allow_partial_authorization: @allow_partial_authorization)
|
24
|
+
end
|
13
25
|
hash
|
14
26
|
end
|
15
27
|
alias_method :to_h, :to_hash
|
data/lib/six_saferpay/version.rb
CHANGED