payler_api 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/README.md +41 -0
- data/lib/payler_api/request.rb +39 -0
- data/lib/payler_api/response.rb +41 -0
- data/lib/payler_api.rb +31 -0
- data/payler_api.gemspec +22 -0
- data/test/cassettes/test_0001_should_blocks_the_specified_amount_card.yml +39 -0
- data/test/cassettes/test_0001_should_charge_blocked_order.yml +38 -0
- data/test/cassettes/test_0001_should_return_data_by_order_id.yml +39 -0
- data/test/cassettes/test_0001_should_send_true_request.yml +39 -0
- data/test/cassettes/test_0002_should_return_duplicate_order_id_error.yml +36 -0
- data/test/cassettes/test_0002_should_return_error_by_wrong_order_id.yml +40 -0
- data/test/helper.rb +15 -0
- data/test/spec_payler_api.rb +78 -0
- metadata +126 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: eafdccb9c2be29e781e93d0e2a3e728a4e025796
|
4
|
+
data.tar.gz: 6089bd306ef2017352e8d4fea8099b81ee034a1b
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 1aa53dd3a697814951b0a57c0e5b4305f1527b64e5d2d4f640b86ce092ec9c670e64493df6432074a1bb1cdd8d0f22f452f468a4e256714f77b0bb866a48d5c7
|
7
|
+
data.tar.gz: 8ece9e3570efc7227b8c1608cf37fc7434a0867fe9724795a35dbb2085c396675822ebbde79f1a7cb7dc57f2d0d07f30227e958384da58b40870f14b4c1aa0a5
|
data/README.md
ADDED
@@ -0,0 +1,41 @@
|
|
1
|
+
# PaylerAPI
|
2
|
+
---
|
3
|
+
Simple ruby wrapper for [Payler Merchant API](http://payler.com/docs/acquiring_docs/)
|
4
|
+
|
5
|
+
## Install
|
6
|
+
|
7
|
+
echo 'gem "payler_api"' >> Gemfile
|
8
|
+
# or
|
9
|
+
gem install payler_api
|
10
|
+
|
11
|
+
## PaylerAPI setup
|
12
|
+
|
13
|
+
$ cat config/initializers/payler_api.rb:
|
14
|
+
|
15
|
+
PaylerAPI.configure do |config|
|
16
|
+
config.access_key = 'ACCESS_KEY'
|
17
|
+
end
|
18
|
+
|
19
|
+
## PaylerAPI example usage:
|
20
|
+
|
21
|
+
response = PaylerAPI.pay amount: 10000,
|
22
|
+
order_id: 'order_uniq_id',
|
23
|
+
card_number: '5555555555555599',
|
24
|
+
expired_year: '19',
|
25
|
+
expired_month: '12',
|
26
|
+
secure_code: '123'
|
27
|
+
|
28
|
+
response # => return PaylerAPI::Response instanse
|
29
|
+
response.ok? # => return true if request is successed and payment charged
|
30
|
+
response.success? # => alias to :ok?
|
31
|
+
|
32
|
+
response.error? # => return true if have errors
|
33
|
+
response.error_code # => Payler error code
|
34
|
+
response.error_message # => Payler error message
|
35
|
+
|
36
|
+
response.data # => all response data
|
37
|
+
|
38
|
+
## Another examples
|
39
|
+
|
40
|
+
PaylerAPI.get_status order_id: 'some_uniq_order' # => return PaylerAPI::Response with order data
|
41
|
+
...
|
@@ -0,0 +1,39 @@
|
|
1
|
+
require 'httparty'
|
2
|
+
|
3
|
+
# class for request processing
|
4
|
+
#
|
5
|
+
module PaylerAPI
|
6
|
+
class Request
|
7
|
+
include HTTParty
|
8
|
+
attr_accessor :method, :params, :response
|
9
|
+
|
10
|
+
def initialize method, params
|
11
|
+
self.class.base_uri "https://#{config.host}.payler.com/mapi"
|
12
|
+
@method, @params = [method, params.merge(key: config.access_key)]
|
13
|
+
@params.merge!(password: config.password) if protected_method?
|
14
|
+
end
|
15
|
+
|
16
|
+
def process
|
17
|
+
self.response = Response.new \
|
18
|
+
self.class.post camel_case_url_path, query: params, headers: headers
|
19
|
+
end
|
20
|
+
|
21
|
+
def protected_method?
|
22
|
+
[:refund, :charge, :retrieve].include? method
|
23
|
+
end
|
24
|
+
|
25
|
+
private
|
26
|
+
|
27
|
+
def config; PaylerAPI.configuration; end
|
28
|
+
|
29
|
+
def headers
|
30
|
+
{'Content-Type' => 'application/x-www-form-urlencoded'}
|
31
|
+
end
|
32
|
+
|
33
|
+
def camel_case_url_path
|
34
|
+
'/'+method.to_s.split('_').collect(&:capitalize).join
|
35
|
+
end
|
36
|
+
|
37
|
+
end
|
38
|
+
|
39
|
+
end
|
@@ -0,0 +1,41 @@
|
|
1
|
+
# class for response
|
2
|
+
#
|
3
|
+
module PaylerAPI
|
4
|
+
class Response
|
5
|
+
attr_reader :data
|
6
|
+
|
7
|
+
def initialize httparty_response
|
8
|
+
@data = httparty_response.parsed_response
|
9
|
+
#rescue
|
10
|
+
#@data = { 'error' => { 'code' => 0, 'message' => 'unknown' } }
|
11
|
+
end
|
12
|
+
|
13
|
+
def ok?
|
14
|
+
data['order_id'] && !error?
|
15
|
+
end
|
16
|
+
alias_method :success?, :ok?
|
17
|
+
|
18
|
+
def three_ds?
|
19
|
+
data['auth_type'] == 1
|
20
|
+
end
|
21
|
+
|
22
|
+
def error?
|
23
|
+
data.has_key? 'error'
|
24
|
+
end
|
25
|
+
|
26
|
+
def error_code
|
27
|
+
data['error']['code'] if error?
|
28
|
+
end
|
29
|
+
|
30
|
+
def duplicate_order_id?
|
31
|
+
error? && error_code == 3
|
32
|
+
end
|
33
|
+
|
34
|
+
def error_message
|
35
|
+
data['error']['message'] if error?
|
36
|
+
end
|
37
|
+
alias_method :message, :error_message
|
38
|
+
|
39
|
+
end
|
40
|
+
|
41
|
+
end
|
data/lib/payler_api.rb
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
require 'payler_api/response'
|
2
|
+
require 'payler_api/request'
|
3
|
+
|
4
|
+
module PaylerAPI
|
5
|
+
AvailableMethods = [:pay, :block, :charge, :refund, :retrieve, :get_status]
|
6
|
+
|
7
|
+
def self.method_missing(method, *arguments, &block)
|
8
|
+
return super unless AvailableMethods.include? method
|
9
|
+
|
10
|
+
PaylerAPI::Request.new(method, *arguments).process
|
11
|
+
end
|
12
|
+
|
13
|
+
# self.configure method
|
14
|
+
# for setup :access_key
|
15
|
+
class << self
|
16
|
+
attr_accessor :configuration
|
17
|
+
|
18
|
+
def configure
|
19
|
+
@configuration ||= Configuration.new
|
20
|
+
yield(@configuration)
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
class Configuration
|
25
|
+
attr_accessor :access_key, :host, :password
|
26
|
+
|
27
|
+
def initialize
|
28
|
+
@access_key, @host, @password = ['']*3
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
data/payler_api.gemspec
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Gem::Specification.new do |s|
|
2
|
+
s.name = 'payler_api'
|
3
|
+
s.version = '0.0.4'
|
4
|
+
s.date = '2016-01-26'
|
5
|
+
s.description = 'Simple ruby wrapper for payler merchant api'
|
6
|
+
s.summary = 'Payler Merchant API Wrapper'
|
7
|
+
s.homepage = 'https://github.com/sletix/payler_api'
|
8
|
+
s.license = 'MIT'
|
9
|
+
s.authors = ['Oleg Artamonov']
|
10
|
+
s.email = 'oleg@artamonov.ru'
|
11
|
+
|
12
|
+
s.files = Dir['{lib/**/*,test/**/*}'] + %w(payler_api.gemspec README.md)
|
13
|
+
s.test_files = Dir['test/*_spec.rb']
|
14
|
+
|
15
|
+
s.require_paths = ['lib']
|
16
|
+
|
17
|
+
s.add_runtime_dependency 'httparty', '~> 0.13'
|
18
|
+
s.add_development_dependency 'minitest', '~> 5.8'
|
19
|
+
s.add_development_dependency 'vcr', '~> 3.0'
|
20
|
+
s.add_development_dependency 'webmock', '~> 1.22'
|
21
|
+
s.add_development_dependency 'rake', '~> 10.4'
|
22
|
+
end
|
@@ -0,0 +1,39 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://host.payler.com/mapi/Block?amount=30000&card_number=5555555555555599&expired_month=12&expired_year=19&key=test-key&order_id=test_block_order_05&secure_code=123
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Content-Type:
|
11
|
+
- application/x-www-form-urlencoded
|
12
|
+
response:
|
13
|
+
status:
|
14
|
+
code: 200
|
15
|
+
message: OK
|
16
|
+
headers:
|
17
|
+
Server:
|
18
|
+
- nginx
|
19
|
+
Date:
|
20
|
+
- Mon, 25 Jan 2016 21:23:23 GMT
|
21
|
+
Content-Type:
|
22
|
+
- text/json; charset=utf-8
|
23
|
+
Content-Length:
|
24
|
+
- '80'
|
25
|
+
Connection:
|
26
|
+
- keep-alive
|
27
|
+
Content-Security-Policy:
|
28
|
+
- frame-ancestors 'none'
|
29
|
+
X-Frame-Options:
|
30
|
+
- deny
|
31
|
+
Strict-Transport-Security:
|
32
|
+
- max-age=31536000;
|
33
|
+
body:
|
34
|
+
encoding: UTF-8
|
35
|
+
string: "{\r\n \"auth_type\": 0,\r\n \"amount\": 30000,\r\n \"order_id\":
|
36
|
+
\"test_block_order_05\"\r\n}"
|
37
|
+
http_version:
|
38
|
+
recorded_at: Mon, 25 Jan 2016 21:23:23 GMT
|
39
|
+
recorded_with: VCR 3.0.1
|
@@ -0,0 +1,38 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://host.payler.com/mapi/Charge?amount=30000&card_number=5555555555555599&expired_month=12&expired_year=19&key=test-key&order_id=test_block_order_05&password=123&secure_code=123
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Content-Type:
|
11
|
+
- application/x-www-form-urlencoded
|
12
|
+
response:
|
13
|
+
status:
|
14
|
+
code: 200
|
15
|
+
message: OK
|
16
|
+
headers:
|
17
|
+
Server:
|
18
|
+
- nginx
|
19
|
+
Date:
|
20
|
+
- Mon, 25 Jan 2016 21:23:24 GMT
|
21
|
+
Content-Type:
|
22
|
+
- text/json; charset=utf-8
|
23
|
+
Content-Length:
|
24
|
+
- '61'
|
25
|
+
Connection:
|
26
|
+
- keep-alive
|
27
|
+
Content-Security-Policy:
|
28
|
+
- frame-ancestors 'none'
|
29
|
+
X-Frame-Options:
|
30
|
+
- deny
|
31
|
+
Strict-Transport-Security:
|
32
|
+
- max-age=31536000;
|
33
|
+
body:
|
34
|
+
encoding: UTF-8
|
35
|
+
string: "{\r\n \"amount\": 30000,\r\n \"order_id\": \"test_block_order_05\"\r\n}"
|
36
|
+
http_version:
|
37
|
+
recorded_at: Mon, 25 Jan 2016 21:23:24 GMT
|
38
|
+
recorded_with: VCR 3.0.1
|
@@ -0,0 +1,39 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://host.payler.com/mapi/GetStatus?key=test-key&order_id=test_pay_order_01
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Content-Type:
|
11
|
+
- application/x-www-form-urlencoded
|
12
|
+
response:
|
13
|
+
status:
|
14
|
+
code: 200
|
15
|
+
message: OK
|
16
|
+
headers:
|
17
|
+
Server:
|
18
|
+
- nginx
|
19
|
+
Date:
|
20
|
+
- Mon, 25 Jan 2016 14:10:43 GMT
|
21
|
+
Content-Type:
|
22
|
+
- text/json; charset=utf-8
|
23
|
+
Content-Length:
|
24
|
+
- '110'
|
25
|
+
Connection:
|
26
|
+
- keep-alive
|
27
|
+
Content-Security-Policy:
|
28
|
+
- frame-ancestors 'none'
|
29
|
+
X-Frame-Options:
|
30
|
+
- deny
|
31
|
+
Strict-Transport-Security:
|
32
|
+
- max-age=31536000;
|
33
|
+
body:
|
34
|
+
encoding: UTF-8
|
35
|
+
string: "{\r\n \"status\": \"Charged\",\r\n \"amount\": 30000,\r\n \"payment_type\":
|
36
|
+
\"Card\",\r\n \"order_id\": \"test_pay_order_01\"\r\n}"
|
37
|
+
http_version:
|
38
|
+
recorded_at: Mon, 25 Jan 2016 14:10:43 GMT
|
39
|
+
recorded_with: VCR 3.0.1
|
@@ -0,0 +1,39 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://host.payler.com/mapi/Pay?amount=30000&card_number=5555555555555599&expired_month=12&expired_year=19&key=test-key&order_id=test_pay_order_01&secure_code=123
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Content-Type:
|
11
|
+
- application/x-www-form-urlencoded
|
12
|
+
response:
|
13
|
+
status:
|
14
|
+
code: 200
|
15
|
+
message: OK
|
16
|
+
headers:
|
17
|
+
Server:
|
18
|
+
- nginx
|
19
|
+
Date:
|
20
|
+
- Mon, 25 Jan 2016 14:09:19 GMT
|
21
|
+
Content-Type:
|
22
|
+
- text/json; charset=utf-8
|
23
|
+
Content-Length:
|
24
|
+
- '78'
|
25
|
+
Connection:
|
26
|
+
- keep-alive
|
27
|
+
Content-Security-Policy:
|
28
|
+
- frame-ancestors 'none'
|
29
|
+
X-Frame-Options:
|
30
|
+
- deny
|
31
|
+
Strict-Transport-Security:
|
32
|
+
- max-age=31536000;
|
33
|
+
body:
|
34
|
+
encoding: UTF-8
|
35
|
+
string: "{\r\n \"auth_type\": 0,\r\n \"amount\": 30000,\r\n \"order_id\":
|
36
|
+
\"test_pay_order_01\"\r\n}"
|
37
|
+
http_version:
|
38
|
+
recorded_at: Mon, 25 Jan 2016 14:09:19 GMT
|
39
|
+
recorded_with: VCR 3.0.1
|
@@ -0,0 +1,36 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://host.payler.com/mapi/Pay?amount=30000&card_number=5555555555555599&expired_month=12&expired_year=19&key=test-key&order_id=test_pay_order_01&secure_code=123
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Content-Type:
|
11
|
+
- application/x-www-form-urlencoded
|
12
|
+
response:
|
13
|
+
status:
|
14
|
+
code: 400
|
15
|
+
message: Bad Request
|
16
|
+
headers:
|
17
|
+
Server:
|
18
|
+
- nginx
|
19
|
+
Date:
|
20
|
+
- Mon, 25 Jan 2016 14:19:21 GMT
|
21
|
+
Content-Type:
|
22
|
+
- text/json; charset=utf-8
|
23
|
+
Content-Length:
|
24
|
+
- '164'
|
25
|
+
Connection:
|
26
|
+
- keep-alive
|
27
|
+
body:
|
28
|
+
encoding: ASCII-8BIT
|
29
|
+
string: !binary |-
|
30
|
+
ew0KICAiZXJyb3IiOiB7DQogICAgImNvZGUiOiAzLA0KICAgICJtZXNzYWdl
|
31
|
+
IjogItCg0LDQvdC10LUg0YHQvtC30LTQsNC9INC30LDQutCw0Lcg0YEg0YPQ
|
32
|
+
utCw0LfQsNC90L3Ri9C8INC40LTQtdC90YLQuNGE0LjQutCw0YLQvtGA0L7Q
|
33
|
+
vDogdGVzdF9wYXlfb3JkZXJfMDEiDQogIH0NCn0=
|
34
|
+
http_version:
|
35
|
+
recorded_at: Mon, 25 Jan 2016 14:19:21 GMT
|
36
|
+
recorded_with: VCR 3.0.1
|
@@ -0,0 +1,40 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://host.payler.com/mapi/GetStatus?key=test-key&order_id=incorrect_order
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Content-Type:
|
11
|
+
- application/x-www-form-urlencoded
|
12
|
+
response:
|
13
|
+
status:
|
14
|
+
code: 500
|
15
|
+
message: Internal Server Error
|
16
|
+
headers:
|
17
|
+
Server:
|
18
|
+
- nginx
|
19
|
+
Date:
|
20
|
+
- Mon, 25 Jan 2016 14:16:24 GMT
|
21
|
+
Content-Type:
|
22
|
+
- text/json; charset=utf-8
|
23
|
+
Content-Length:
|
24
|
+
- '156'
|
25
|
+
Connection:
|
26
|
+
- keep-alive
|
27
|
+
Cache-Control:
|
28
|
+
- no-store, no-cache
|
29
|
+
Pragma:
|
30
|
+
- no-cache
|
31
|
+
body:
|
32
|
+
encoding: ASCII-8BIT
|
33
|
+
string: !binary |-
|
34
|
+
ew0KICAiZXJyb3IiOiB7DQogICAgImNvZGUiOiA5LA0KICAgICJtZXNzYWdl
|
35
|
+
IjogItCd0LUg0L3QsNC50LTQtdC9INC30LDQutCw0Lcg0YEg0YPQutCw0LfQ
|
36
|
+
sNC90L3Ri9C8INC40LTQtdC90YLQuNGE0LjQutCw0YLQvtGA0L7QvDogaW5j
|
37
|
+
b3JyZWN0X29yZGVyIg0KICB9DQp9
|
38
|
+
http_version:
|
39
|
+
recorded_at: Mon, 25 Jan 2016 14:16:24 GMT
|
40
|
+
recorded_with: VCR 3.0.1
|
data/test/helper.rb
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
require 'minitest/autorun'
|
2
|
+
require 'securerandom'
|
3
|
+
require 'vcr'
|
4
|
+
require 'payler_api'
|
5
|
+
|
6
|
+
PaylerAPI.configure do |c|
|
7
|
+
c.access_key = 'test-key'
|
8
|
+
c.password = '123'
|
9
|
+
c.host = 'host'
|
10
|
+
end
|
11
|
+
|
12
|
+
VCR.configure do |c|
|
13
|
+
c.cassette_library_dir = "#{__dir__}/cassettes"
|
14
|
+
c.hook_into :webmock
|
15
|
+
end
|
@@ -0,0 +1,78 @@
|
|
1
|
+
require "#{__dir__}/helper.rb"
|
2
|
+
|
3
|
+
describe 'PaylerAPI' do
|
4
|
+
subject { PaylerAPI }
|
5
|
+
before { VCR.insert_cassette name }
|
6
|
+
after { VCR.eject_cassette }
|
7
|
+
let(:card_params) { { card_number: '5555555555555599',
|
8
|
+
expired_year: '19',
|
9
|
+
expired_month: '12',
|
10
|
+
secure_code: '123' } }
|
11
|
+
|
12
|
+
describe '#pay' do
|
13
|
+
let :params do
|
14
|
+
card_params.merge order_id: 'test_pay_order_01',
|
15
|
+
amount: '30000'
|
16
|
+
end
|
17
|
+
|
18
|
+
it 'should send true request' do
|
19
|
+
subject.pay(params).ok?.must_equal true
|
20
|
+
end
|
21
|
+
|
22
|
+
it 'should return duplicate order_id error' do
|
23
|
+
subject.pay(params).duplicate_order_id?.must_equal true
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
describe 'block-charge' do
|
28
|
+
let :params do
|
29
|
+
{ order_id: 'test_block_order_05',
|
30
|
+
amount: '30000' }.merge(card_params)
|
31
|
+
end
|
32
|
+
|
33
|
+
describe '#block' do
|
34
|
+
it 'should blocks the specified amount card' do
|
35
|
+
subject.block(params).ok?.must_equal true
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
describe '#charge' do
|
40
|
+
it 'should charge blocked order' do
|
41
|
+
subject.charge(params).ok?.must_equal true
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
#describe '#refund' do
|
46
|
+
#it 'should refund order' do
|
47
|
+
#subject.charge(params).ok?.must_equal true
|
48
|
+
#end
|
49
|
+
#end
|
50
|
+
end
|
51
|
+
|
52
|
+
|
53
|
+
describe '#get_status' do
|
54
|
+
it 'should return data by order_id' do
|
55
|
+
resp = subject.get_status order_id: 'test_pay_order_01'
|
56
|
+
resp.ok?.must_equal true
|
57
|
+
resp.data["amount"].must_equal 30000
|
58
|
+
end
|
59
|
+
|
60
|
+
it 'should return error by wrong order_id' do
|
61
|
+
resp = subject.get_status order_id: 'incorrect_order'
|
62
|
+
resp.error?.must_equal true
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
66
|
+
# TODO:
|
67
|
+
#describe('#refund', '#retrieve)
|
68
|
+
|
69
|
+
describe '#configure' do
|
70
|
+
before { PaylerAPI.configure {|config| config.access_key = 'foo-bar' } }
|
71
|
+
after { PaylerAPI.configuration.access_key = 'test-key' } #revert key
|
72
|
+
|
73
|
+
it 'should setup new access_key' do
|
74
|
+
PaylerAPI.configuration.access_key.must_equal 'foo-bar'
|
75
|
+
end
|
76
|
+
end
|
77
|
+
|
78
|
+
end
|
metadata
ADDED
@@ -0,0 +1,126 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: payler_api
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.4
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Oleg Artamonov
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2016-01-26 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: httparty
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0.13'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0.13'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: minitest
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '5.8'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '5.8'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: vcr
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '3.0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '3.0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: webmock
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '1.22'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '1.22'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rake
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '10.4'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '10.4'
|
83
|
+
description: Simple ruby wrapper for payler merchant api
|
84
|
+
email: oleg@artamonov.ru
|
85
|
+
executables: []
|
86
|
+
extensions: []
|
87
|
+
extra_rdoc_files: []
|
88
|
+
files:
|
89
|
+
- README.md
|
90
|
+
- lib/payler_api.rb
|
91
|
+
- lib/payler_api/request.rb
|
92
|
+
- lib/payler_api/response.rb
|
93
|
+
- payler_api.gemspec
|
94
|
+
- test/cassettes/test_0001_should_blocks_the_specified_amount_card.yml
|
95
|
+
- test/cassettes/test_0001_should_charge_blocked_order.yml
|
96
|
+
- test/cassettes/test_0001_should_return_data_by_order_id.yml
|
97
|
+
- test/cassettes/test_0001_should_send_true_request.yml
|
98
|
+
- test/cassettes/test_0002_should_return_duplicate_order_id_error.yml
|
99
|
+
- test/cassettes/test_0002_should_return_error_by_wrong_order_id.yml
|
100
|
+
- test/helper.rb
|
101
|
+
- test/spec_payler_api.rb
|
102
|
+
homepage: https://github.com/sletix/payler_api
|
103
|
+
licenses:
|
104
|
+
- MIT
|
105
|
+
metadata: {}
|
106
|
+
post_install_message:
|
107
|
+
rdoc_options: []
|
108
|
+
require_paths:
|
109
|
+
- lib
|
110
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
111
|
+
requirements:
|
112
|
+
- - ">="
|
113
|
+
- !ruby/object:Gem::Version
|
114
|
+
version: '0'
|
115
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
116
|
+
requirements:
|
117
|
+
- - ">="
|
118
|
+
- !ruby/object:Gem::Version
|
119
|
+
version: '0'
|
120
|
+
requirements: []
|
121
|
+
rubyforge_project:
|
122
|
+
rubygems_version: 2.2.2
|
123
|
+
signing_key:
|
124
|
+
specification_version: 4
|
125
|
+
summary: Payler Merchant API Wrapper
|
126
|
+
test_files: []
|