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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9ec4ebb3ad6cd6a6205897175eaa607697ebf21f
4
- data.tar.gz: 2e06cb681b00628a74a41177ed8f865a1de29e0f
3
+ metadata.gz: 77650c0cb042d5a044faed67398a013db35914df
4
+ data.tar.gz: 7a2edeab19241f9df2d924b935556a1cd8234079
5
5
  SHA512:
6
- metadata.gz: d717451fb4002a0af715eca07391d9c849e9e05b2763704ff2eabd31573cbc50ada59c2623fa26812b1d614ee66cae3e40c8a615ee82fdc778c8d8c3640b3a48
7
- data.tar.gz: 86d4c767dacc6a0cc1d8d93dd83d22d8b3a4571e9b9167ad07f242bfcc3e3223b33aa2fa14fc887e3ef65245ae6fb36862678f544ebb287d371147dd2366e96d
6
+ metadata.gz: 3b36ce494a46f58e53b66d29ef2f4093d950282daffe403ecd0f98aeb0fab576501379dd548034c126bc391f0b9d19184c97fb20e71257c4192a9abd755aa6d7
7
+ data.tar.gz: 17e4e4e32257a1b7a8bdc1aeb764b994a95700aa654d6d89727bbe423351baf4a71cbc4200f7fb1d5fff44bce2cc37c90ab32b06e772e5792f4d97cdb5064594
@@ -1,27 +1,28 @@
1
1
  module Tinkoff
2
2
  class Notification
3
- attr_reader :success, :error_code, :message, :details, :amount,
4
- :merchant_email, :merchant_name, :order_id, :payment_id, :tran_date
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
- @success = params['Success']
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
- @payment_id = params['PaymentId']
16
- @tran_date = params['TranDate']
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 failure?
20
- !@success
20
+ def success?
21
+ @success
21
22
  end
22
23
 
23
- def success?
24
- !failure?
24
+ def failure?
25
+ !@success
25
26
  end
26
27
  end
27
28
  end
@@ -1,3 +1,3 @@
1
1
  module Tinkoff
2
- VERSION = '0.1.2'
2
+ VERSION = '0.1.3'
3
3
  end
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.2
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-01 00:00:00.000000000 Z
11
+ date: 2016-11-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler