tinkoff 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/tinkoff/notification.rb +16 -15
- data/lib/tinkoff/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 77650c0cb042d5a044faed67398a013db35914df
|
4
|
+
data.tar.gz: 7a2edeab19241f9df2d924b935556a1cd8234079
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3b36ce494a46f58e53b66d29ef2f4093d950282daffe403ecd0f98aeb0fab576501379dd548034c126bc391f0b9d19184c97fb20e71257c4192a9abd755aa6d7
|
7
|
+
data.tar.gz: 17e4e4e32257a1b7a8bdc1aeb764b994a95700aa654d6d89727bbe423351baf4a71cbc4200f7fb1d5fff44bce2cc37c90ab32b06e772e5792f4d97cdb5064594
|
data/lib/tinkoff/notification.rb
CHANGED
@@ -1,27 +1,28 @@
|
|
1
1
|
module Tinkoff
|
2
2
|
class Notification
|
3
|
-
attr_reader :
|
4
|
-
:
|
3
|
+
attr_reader :terminal_key, :order_id, :success, :status, :payment_id,
|
4
|
+
:error_code, :amount, :rebill_id, :card_id, :pan, :token
|
5
5
|
|
6
6
|
def initialize(params)
|
7
|
-
@
|
8
|
-
@error_code = params['ErrorCode']
|
9
|
-
@message = params['Message']
|
10
|
-
@details = params['Details']
|
11
|
-
@amount = params['Amount']
|
12
|
-
@merchant_email = params['MerchantEmail']
|
13
|
-
@merchant_name = params['MerchantName']
|
7
|
+
@terminal_key = params['TerminalKey']
|
14
8
|
@order_id = params['OrderId']
|
15
|
-
@
|
16
|
-
@
|
9
|
+
@success = params['Success'] == 'true'
|
10
|
+
@status = params['Status']
|
11
|
+
@payment_id = params['PaymentId'].to_i
|
12
|
+
@error_code = params['ErrorCode']
|
13
|
+
@amount = params['Amount'].to_i
|
14
|
+
@rebill_id = params['RebillId'].to_i
|
15
|
+
@card_id = params['CardId'].to_i
|
16
|
+
@pan = params['Pan']
|
17
|
+
@token = params['Token']
|
17
18
|
end
|
18
19
|
|
19
|
-
def
|
20
|
-
|
20
|
+
def success?
|
21
|
+
@success
|
21
22
|
end
|
22
23
|
|
23
|
-
def
|
24
|
-
|
24
|
+
def failure?
|
25
|
+
!@success
|
25
26
|
end
|
26
27
|
end
|
27
28
|
end
|
data/lib/tinkoff/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tinkoff
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dan Kim
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-11-
|
11
|
+
date: 2016-11-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|