rails-gp-webpay 0.2.7 → 0.2.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/gp_webpay/mock/spec_helper.rb +9 -8
- data/lib/gp_webpay/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a0f327b8f7b609ff6a7a62d97bf0d0a182cfd6513145d2aa8d224600d4daf7e6
|
4
|
+
data.tar.gz: 045ed7d32e3f2289cbf27f93c8ad7e9fee677a6cd4e2be9c2f47324f271ef5fe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 203e91a7fe8952ccc3f58924048fc5e57f028c86b19a9217a22b13000911470b55813e77ec5bce4a8dfea3be9b19bd0deb4d325f946e351e03c42a15a77232c5
|
7
|
+
data.tar.gz: 9ccc0518abb878d34a533af017c60b85efe5c0b6b36f2c63bc1ee882d436f11e946d93039bfda4f73b938ecf0968425030f0793e32d09b49930ea3d25154a908
|
@@ -24,18 +24,19 @@ module GpWebpay
|
|
24
24
|
def stub_card_token(token, status: 'VERIFIED', success: true, valid: true)
|
25
25
|
allow(GpWebpay::Ws::Services::GetTokenStatus)
|
26
26
|
.to receive(:call).with(hash_including(token_data: token, message_id: anything))
|
27
|
-
.and_return(instance_double(GpWebpay::Ws::WsResponse,
|
28
|
-
|
27
|
+
.and_return(instance_double(GpWebpay::Ws::WsResponse,
|
28
|
+
valid?: valid, success?: success, status: status,
|
29
|
+
pr_code: (success ? '0' : '123'), sr_code: (success ? '0' : '4'),
|
29
30
|
original_response: { pr_code: 0, sr_code: 0 }))
|
30
31
|
end
|
31
32
|
|
32
33
|
def stub_master_payment_status(payment_number, status: 'OK', success: true, valid: true)
|
33
34
|
allow(GpWebpay::Ws::Services::GetMasterPaymentStatus)
|
34
35
|
.to receive(:call).with(hash_including(payment_number: payment_number, message_id: anything))
|
35
|
-
.and_return(instance_double(GpWebpay::Ws::WsResponse,
|
36
|
-
|
36
|
+
.and_return(instance_double(GpWebpay::Ws::WsResponse,
|
37
|
+
valid?: valid, success?: success, status: status,
|
38
|
+
pr_code: (success ? '0' : '123'), sr_code: (success ? '0' : '4'),
|
37
39
|
original_response: { pr_code: 0, sr_code: 0 }))
|
38
|
-
|
39
40
|
end
|
40
41
|
|
41
42
|
def stub_payment_status(payment_number, merchant_number: nil, status: 'VERIFIED', sub_status: 'SETTLED', success: true, valid: true)
|
@@ -66,13 +67,13 @@ module GpWebpay
|
|
66
67
|
params: { token_data: response_token_data || attributes[:token_data] }))
|
67
68
|
end
|
68
69
|
|
69
|
-
def stub_token_revoke(token, valid: true, success: true, status: 'REVOKED', result_text: 'OK')
|
70
|
+
def stub_token_revoke(token, merchant_number: nil, valid: true, success: true, status: 'REVOKED', result_text: 'OK')
|
70
71
|
allow(GpWebpay::Ws::Services::ProcessTokenRevoke)
|
71
72
|
.to receive(:call).with(
|
72
|
-
hash_including({ message_id: anything }.merge(token_data: token))
|
73
|
+
hash_including({ message_id: anything }.merge(token_data: token)), merchant_number: merchant_number
|
73
74
|
).and_return(instance_double(GpWebpay::Ws::WsResponse,
|
74
75
|
valid?: valid, success?: success, status: status, result_text: result_text,
|
75
|
-
pr_code: success ? '0' : '123', sr_code: success ? '0' : '4',
|
76
|
+
pr_code: (success ? '0' : '123'), sr_code: (success ? '0' : '4'),
|
76
77
|
original_response: { pr_code: 0, sr_code: 0 }))
|
77
78
|
end
|
78
79
|
|
data/lib/gp_webpay/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails-gp-webpay
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lubomir Vnenk
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-08-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|