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 +5 -5
- data/README.md +4 -4
- data/lib/tinkoff/request.rb +3 -2
- data/lib/tinkoff/version.rb +1 -1
- data/tinkoff.gemspec +3 -5
- metadata +14 -29
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 50bc66809e4128c77a72bf33185bdeb9f90c5edeca762d91a8566b266ae8122c
|
4
|
+
data.tar.gz: 893e4b19b3b75bb1ba6fef012f82b3ca36ffe90c8f6e6ac00ce76c1c75686f0d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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](
|
4
|
-
[![Gem Version](
|
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://
|
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://
|
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
|
|
data/lib/tinkoff/request.rb
CHANGED
@@ -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].
|
44
|
+
return unless @params[:DATA].to_s.empty?
|
45
|
+
|
45
46
|
@params[:DATA] = @params[:DATA].to_query.tr('&', '|')
|
46
47
|
end
|
47
48
|
end
|
data/lib/tinkoff/version.rb
CHANGED
data/tinkoff.gemspec
CHANGED
@@ -1,5 +1,4 @@
|
|
1
|
-
|
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
|
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.
|
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:
|
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
|
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
|
26
|
+
version: '2.1'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: minitest
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
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: '
|
40
|
+
version: '5.0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
42
|
+
name: rake
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
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: '
|
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
|
-
|
126
|
-
|
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: []
|