tinkoff 0.1.3 → 0.2.0

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
- SHA1:
3
- metadata.gz: 77650c0cb042d5a044faed67398a013db35914df
4
- data.tar.gz: 7a2edeab19241f9df2d924b935556a1cd8234079
2
+ SHA256:
3
+ metadata.gz: 50bc66809e4128c77a72bf33185bdeb9f90c5edeca762d91a8566b266ae8122c
4
+ data.tar.gz: 893e4b19b3b75bb1ba6fef012f82b3ca36ffe90c8f6e6ac00ce76c1c75686f0d
5
5
  SHA512:
6
- metadata.gz: 3b36ce494a46f58e53b66d29ef2f4093d950282daffe403ecd0f98aeb0fab576501379dd548034c126bc391f0b9d19184c97fb20e71257c4192a9abd755aa6d7
7
- data.tar.gz: 17e4e4e32257a1b7a8bdc1aeb764b994a95700aa654d6d89727bbe423351baf4a71cbc4200f7fb1d5fff44bce2cc37c90ab32b06e772e5792f4d97cdb5064594
6
+ metadata.gz: 593b6e3def9f1b881cd77e850a627031b29379f75d7e36340a50a25dda855854ff6cf967246438ed29732c20e6bd398e2ac187d683c38f1a502cc6878ad36683
7
+ data.tar.gz: f7a062af88d0cf1e952af7e63e4b7e8041f03a7e7fbeedae2223b8cf26170806fc42a772b464ba3aea11d0eb57c2ccc9b2450a914a6ff330bee0bf0258d4a8be
data/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # Tinkoff
2
2
 
3
- [![Build Status](http://img.shields.io/travis/dankimio/tinkoff.svg?style=flat)](https://travis-ci.org/dankimio/tinkoff)
4
- [![Gem Version](http://img.shields.io/gem/v/tinkoff.svg?style=flat&color=brightgreen)](https://rubygems.org/gems/tinkoff)
3
+ [![Build Status](https://img.shields.io/travis/dankimio/tinkoff.svg?style=flat)](https://travis-ci.org/dankimio/tinkoff)
4
+ [![Gem Version](https://img.shields.io/gem/v/tinkoff.svg?style=flat&color=brightgreen)](https://rubygems.org/gems/tinkoff)
5
5
  [![GitHub license](https://img.shields.io/badge/license-MIT-blue.svg?style=flat)](https://raw.githubusercontent.com/dankimio/tinkoff/master/LICENSE.txt)
6
6
 
7
7
 
@@ -40,7 +40,7 @@ Use the client to work with payments.
40
40
  ```ruby
41
41
  # Parameters: amount (in kopecks), order_id, data, options (hash, optional)
42
42
  # data — a hash of arbitrary data (up to 20 pairs), "Email" key is required
43
- # More info: https://oplata.tinkoff.ru/documentation/?section=Init
43
+ # More info: https://www.tinkoff.ru/kassa/develop/api/payments/init-description/
44
44
  Tinkoff::Client.init(100, 1, { Email: 'foo@bar.com' })
45
45
 
46
46
  # Parameters: payment_id, options (hash, optional)
@@ -56,7 +56,7 @@ Tinkoff::Client.cancel(1)
56
56
  Tinkoff::Client.state(1)
57
57
  ```
58
58
 
59
- You can view all available options in the [official documentation](https://oplata.tinkoff.ru/documentation/?section=aboutMet).
59
+ You can view all available options in the [official documentation](https://www.tinkoff.ru/kassa/develop/api/payments/).
60
60
 
61
61
  A notification will be sent to if you provided the URL. You should use it to update the status of your payment / order.
62
62
 
@@ -1,6 +1,6 @@
1
1
  module Tinkoff
2
2
  class Request
3
- BASE_URL = 'https://securepay.tinkoff.ru/rest/'
3
+ BASE_URL = 'https://securepay.tinkoff.ru/rest/'.freeze
4
4
 
5
5
  def initialize(path, params = {})
6
6
  @url = BASE_URL + path
@@ -41,7 +41,8 @@ module Tinkoff
41
41
 
42
42
  # Ключ=значение дополнительных параметров через “|”, например Email=a@test.ru|Phone=+71234567890
43
43
  def prepare_data
44
- return unless @params[:DATA].present?
44
+ return unless @params[:DATA].to_s.empty?
45
+
45
46
  @params[:DATA] = @params[:DATA].to_query.tr('&', '|')
46
47
  end
47
48
  end
@@ -1,3 +1,3 @@
1
1
  module Tinkoff
2
- VERSION = '0.1.3'
2
+ VERSION = '0.2.0'.freeze
3
3
  end
data/tinkoff.gemspec CHANGED
@@ -1,5 +1,4 @@
1
- # coding: utf-8
2
- lib = File.expand_path('../lib', __FILE__)
1
+ lib = File.expand_path('lib', __dir__)
3
2
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
3
  require 'tinkoff/version'
5
4
 
@@ -19,10 +18,9 @@ Gem::Specification.new do |spec|
19
18
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
20
19
  spec.require_paths = ['lib']
21
20
 
22
- spec.add_development_dependency 'bundler', '~> 1.13'
23
- spec.add_development_dependency 'rake', '~> 11.0'
21
+ spec.add_development_dependency 'bundler', '~> 2.1'
24
22
  spec.add_development_dependency 'minitest', '~> 5.0'
23
+ spec.add_development_dependency 'rake', '~> 12.3'
25
24
 
26
25
  spec.add_runtime_dependency 'httparty', '~> 0.14'
27
- spec.add_runtime_dependency 'activesupport', '~> 5.0'
28
26
  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.3
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dan Kim
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-11-03 00:00:00.000000000 Z
11
+ date: 2022-07-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -16,42 +16,42 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.13'
19
+ version: '2.1'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '1.13'
26
+ version: '2.1'
27
27
  - !ruby/object:Gem::Dependency
28
- name: rake
28
+ name: minitest
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '11.0'
33
+ version: '5.0'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '11.0'
40
+ version: '5.0'
41
41
  - !ruby/object:Gem::Dependency
42
- name: minitest
42
+ name: rake
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '5.0'
47
+ version: '12.3'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '5.0'
54
+ version: '12.3'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: httparty
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -66,20 +66,6 @@ dependencies:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0.14'
69
- - !ruby/object:Gem::Dependency
70
- name: activesupport
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - "~>"
74
- - !ruby/object:Gem::Version
75
- version: '5.0'
76
- type: :runtime
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - "~>"
81
- - !ruby/object:Gem::Version
82
- version: '5.0'
83
69
  description: Ruby wrapper for Tinkoff Acquiring API.
84
70
  email:
85
71
  - itsdanya@gmail.com
@@ -107,7 +93,7 @@ homepage: https://github.com/dankimio/tinkoff
107
93
  licenses:
108
94
  - MIT
109
95
  metadata: {}
110
- post_install_message:
96
+ post_install_message:
111
97
  rdoc_options: []
112
98
  require_paths:
113
99
  - lib
@@ -122,9 +108,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
122
108
  - !ruby/object:Gem::Version
123
109
  version: '0'
124
110
  requirements: []
125
- rubyforge_project:
126
- rubygems_version: 2.5.1
127
- signing_key:
111
+ rubygems_version: 3.3.7
112
+ signing_key:
128
113
  specification_version: 4
129
114
  summary: Tinkoff API wrapper.
130
115
  test_files: []