yandex_kassa 0.3.3 → 0.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +7 -0
- data/lib/yandex_kassa/version.rb +1 -1
- data/lib/yandex_kassa.rb +21 -22
- 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: d546f6411d9bac201c48534423d9c70236d3d35d
|
|
4
|
+
data.tar.gz: eaa57fcb151dfcf45c6797508ad3968060f22c71
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8888b9270fdf1ffe7c8443661c6af492fbc708f5fe7da288af38c5502b0d29836758ed10794f5bea9ca2a82973ec5bf83f602b9cd1979255274a002460664d71
|
|
7
|
+
data.tar.gz: aa17e48cc809f00e82bdcc9b359f5543cefaf0cedf35566692dbf94befc00162b729224cc65519b27b1d94096bd75bdf66c324353be53fdd7ce84c8e30c0a93a
|
data/README.md
CHANGED
|
@@ -143,6 +143,13 @@ response = store_card.request
|
|
|
143
143
|
# => "{\"storeCard\":{\"reason\":\"success\",\"skr_destinationCardCountryCode\":\"616\",\"skr_destinationCardSynonim\":\"mob64asbX5okWsURXB8QoYwYSwwZ.SC.201603\",\"skr_destinationCardType\":\"Visa\",\"skr_destinationCardPanmask\":\"444444******4448\"}}"
|
|
144
144
|
```
|
|
145
145
|
|
|
146
|
+
##Integration
|
|
147
|
+
Following gists may be useful:
|
|
148
|
+
|
|
149
|
+
[Yandex Kassa Card payment test](https://gist.github.com/creepycheese/f3b0f70d21dc7eac6d9a)
|
|
150
|
+
|
|
151
|
+
[Yandex Kassa different accounts test](https://gist.github.com/creepycheese/f94c9e2a47b16f7303ba)
|
|
152
|
+
|
|
146
153
|
## License
|
|
147
154
|
|
|
148
155
|
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
data/lib/yandex_kassa/version.rb
CHANGED
data/lib/yandex_kassa.rb
CHANGED
|
@@ -9,31 +9,30 @@ require "openssl"
|
|
|
9
9
|
require "rest-client"
|
|
10
10
|
|
|
11
11
|
module YandexKassa
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
12
|
+
extend self
|
|
13
|
+
def create
|
|
14
|
+
Api.new(url: configuration.url,
|
|
15
|
+
cert_file: configuration.cert_file,
|
|
16
|
+
key_file: configuration.key_file,
|
|
17
|
+
response_parser: pkcs7_response_parser,
|
|
18
|
+
request_signer: request_signer)
|
|
19
|
+
end
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
def configure(&block)
|
|
22
|
+
block.call(configuration)
|
|
23
|
+
end
|
|
24
24
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
25
|
+
def configuration
|
|
26
|
+
@configuration ||= Configuration.new
|
|
27
|
+
end
|
|
28
28
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
29
|
+
def pkcs7_response_parser
|
|
30
|
+
@pkcs7_response_parser ||= SignedResponseParser.new(
|
|
31
|
+
deposit_cert_file: configuration.deposit_cert_file,
|
|
32
|
+
cert_file: configuration.cert_file)
|
|
33
|
+
end
|
|
34
34
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
end
|
|
35
|
+
def request_signer
|
|
36
|
+
@request_signer ||= RequestSigner.new(cert_file: configuration.cert_file, key_file: configuration.key_file)
|
|
38
37
|
end
|
|
39
38
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: yandex_kassa
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.3.
|
|
4
|
+
version: 0.3.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Evgeniy Burdaev
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2016-03-
|
|
11
|
+
date: 2016-03-29 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|