saferpay_ruby 0.1.0
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 +7 -0
- data/.gitignore +11 -0
- data/.rspec +3 -0
- data/.travis.yml +7 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile +4 -0
- data/Gemfile.lock +35 -0
- data/LICENSE.txt +21 -0
- data/README.md +129 -0
- data/Rakefile +6 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/lib/saferpay_ruby.rb +76 -0
- data/lib/saferpay_ruby/configuration.rb +39 -0
- data/lib/saferpay_ruby/version.rb +3 -0
- data/saferpay_ruby.gemspec +37 -0
- metadata +110 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 57e63198c38d91722de6ac1dc0ee87fc2adb8dd4
|
4
|
+
data.tar.gz: f68068578a2a3144cf20f95b5e22e92405affa9f
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: ef3610c4065fe5e2ff6b70dce22402030858521c88a07a0f15a872c6ad85e623d1aec8daacf5f421e8dc9a14df195c1255f4822193ae9852b1de69999a7ce152
|
7
|
+
data.tar.gz: c4a9f611cd8ad82e16ebadff50942e7828eb3679526b599cc4a7b7f394782a8117cdaf9821f978f3c6d6d96272e5b1992f01d0baf5184649dcc10d4186f10529
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.travis.yml
ADDED
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,74 @@
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
2
|
+
|
3
|
+
## Our Pledge
|
4
|
+
|
5
|
+
In the interest of fostering an open and welcoming environment, we as
|
6
|
+
contributors and maintainers pledge to making participation in our project and
|
7
|
+
our community a harassment-free experience for everyone, regardless of age, body
|
8
|
+
size, disability, ethnicity, gender identity and expression, level of experience,
|
9
|
+
nationality, personal appearance, race, religion, or sexual identity and
|
10
|
+
orientation.
|
11
|
+
|
12
|
+
## Our Standards
|
13
|
+
|
14
|
+
Examples of behavior that contributes to creating a positive environment
|
15
|
+
include:
|
16
|
+
|
17
|
+
* Using welcoming and inclusive language
|
18
|
+
* Being respectful of differing viewpoints and experiences
|
19
|
+
* Gracefully accepting constructive criticism
|
20
|
+
* Focusing on what is best for the community
|
21
|
+
* Showing empathy towards other community members
|
22
|
+
|
23
|
+
Examples of unacceptable behavior by participants include:
|
24
|
+
|
25
|
+
* The use of sexualized language or imagery and unwelcome sexual attention or
|
26
|
+
advances
|
27
|
+
* Trolling, insulting/derogatory comments, and personal or political attacks
|
28
|
+
* Public or private harassment
|
29
|
+
* Publishing others' private information, such as a physical or electronic
|
30
|
+
address, without explicit permission
|
31
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
32
|
+
professional setting
|
33
|
+
|
34
|
+
## Our Responsibilities
|
35
|
+
|
36
|
+
Project maintainers are responsible for clarifying the standards of acceptable
|
37
|
+
behavior and are expected to take appropriate and fair corrective action in
|
38
|
+
response to any instances of unacceptable behavior.
|
39
|
+
|
40
|
+
Project maintainers have the right and responsibility to remove, edit, or
|
41
|
+
reject comments, commits, code, wiki edits, issues, and other contributions
|
42
|
+
that are not aligned to this Code of Conduct, or to ban temporarily or
|
43
|
+
permanently any contributor for other behaviors that they deem inappropriate,
|
44
|
+
threatening, offensive, or harmful.
|
45
|
+
|
46
|
+
## Scope
|
47
|
+
|
48
|
+
This Code of Conduct applies both within project spaces and in public spaces
|
49
|
+
when an individual is representing the project or its community. Examples of
|
50
|
+
representing a project or community include using an official project e-mail
|
51
|
+
address, posting via an official social media account, or acting as an appointed
|
52
|
+
representative at an online or offline event. Representation of a project may be
|
53
|
+
further defined and clarified by project maintainers.
|
54
|
+
|
55
|
+
## Enforcement
|
56
|
+
|
57
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
58
|
+
reported by contacting the project team at nischay.dhiman@weboniselab.com. All
|
59
|
+
complaints will be reviewed and investigated and will result in a response that
|
60
|
+
is deemed necessary and appropriate to the circumstances. The project team is
|
61
|
+
obligated to maintain confidentiality with regard to the reporter of an incident.
|
62
|
+
Further details of specific enforcement policies may be posted separately.
|
63
|
+
|
64
|
+
Project maintainers who do not follow or enforce the Code of Conduct in good
|
65
|
+
faith may face temporary or permanent repercussions as determined by other
|
66
|
+
members of the project's leadership.
|
67
|
+
|
68
|
+
## Attribution
|
69
|
+
|
70
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
71
|
+
available at [http://contributor-covenant.org/version/1/4][version]
|
72
|
+
|
73
|
+
[homepage]: http://contributor-covenant.org
|
74
|
+
[version]: http://contributor-covenant.org/version/1/4/
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,35 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
saferpay_ruby (0.1.0)
|
5
|
+
|
6
|
+
GEM
|
7
|
+
remote: https://rubygems.org/
|
8
|
+
specs:
|
9
|
+
diff-lcs (1.3)
|
10
|
+
rake (13.0.1)
|
11
|
+
rspec (3.9.0)
|
12
|
+
rspec-core (~> 3.9.0)
|
13
|
+
rspec-expectations (~> 3.9.0)
|
14
|
+
rspec-mocks (~> 3.9.0)
|
15
|
+
rspec-core (3.9.1)
|
16
|
+
rspec-support (~> 3.9.1)
|
17
|
+
rspec-expectations (3.9.0)
|
18
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
19
|
+
rspec-support (~> 3.9.0)
|
20
|
+
rspec-mocks (3.9.1)
|
21
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
22
|
+
rspec-support (~> 3.9.0)
|
23
|
+
rspec-support (3.9.2)
|
24
|
+
|
25
|
+
PLATFORMS
|
26
|
+
ruby
|
27
|
+
|
28
|
+
DEPENDENCIES
|
29
|
+
bundler (~> 2.0)
|
30
|
+
rake (~> 13.0)
|
31
|
+
rspec (~> 3.0)
|
32
|
+
saferpay_ruby!
|
33
|
+
|
34
|
+
BUNDLED WITH
|
35
|
+
2.0.2
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2020 nischay
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,129 @@
|
|
1
|
+
# SaferpayRuby
|
2
|
+
|
3
|
+
Saferpay JSON application programming interface with a ruby API wrapper built with Net::HTTP
|
4
|
+
|
5
|
+
Saferpay API is designed to have predictable, resource-oriented URLs and to use HTTP response codes to indicate API errors. Saferpay use built-in HTTP features, like HTTP authentication and HTTP verbs, which can be understood by off-the-shelf HTTP clients. JSON will be returned in all responses from the API, including errors.
|
6
|
+
|
7
|
+
You can contact Saferpay to get ahold of your documentation PDF. Ask for the Payment Page integration documentation.
|
8
|
+
|
9
|
+
|
10
|
+
For more information about Saferpay API, please visit
|
11
|
+
[https://saferpay.github.io/jsonapi](https://saferpay.github.io/jsonapi)
|
12
|
+
|
13
|
+
|
14
|
+
## Installation
|
15
|
+
|
16
|
+
Add this line to your application's Gemfile:
|
17
|
+
|
18
|
+
```ruby
|
19
|
+
gem 'saferpay_ruby'
|
20
|
+
```
|
21
|
+
|
22
|
+
And then execute:
|
23
|
+
|
24
|
+
$ bundle
|
25
|
+
|
26
|
+
Or install it yourself as:
|
27
|
+
|
28
|
+
$ gem install saferpay_ruby
|
29
|
+
|
30
|
+
## Usage
|
31
|
+
|
32
|
+
Following are brief instructions to create and setup a saferpay account for testing.
|
33
|
+
|
34
|
+
|
35
|
+
Firstly You'll need to create a test account on [https://test.saferpay.com](https://test.saferpay.com)
|
36
|
+
|
37
|
+
|
38
|
+
For Production use [https://myportal.six-payment-services.com/](https://myportal.six-payment-services.com/merchantportal/?login&isiweblang=en)
|
39
|
+
|
40
|
+
|
41
|
+
After Logging in, Go to Settings Section,
|
42
|
+
|
43
|
+
|
44
|
+
You'll need to create a Payment Mean / Terminal, Remember to fetch terminalId and customerId.
|
45
|
+
|
46
|
+
|
47
|
+
Add JSON API basic authentication, returning username and password, which will base 64 encoded and then used as authentication header in API
|
48
|
+
|
49
|
+
|
50
|
+
Configure the credentials in saferpay_ruby.rb in initializers as follows:
|
51
|
+
|
52
|
+
```
|
53
|
+
SaferpayRuby.configure do |config|
|
54
|
+
config.endpoint = URI('https://test.saferpay.com/api/Payment/v1/PaymentPage/Initialize')
|
55
|
+
#config.endpoint = URI('https://www.saferpay.com/api/Payment/v1/PaymentPage/Initialize') # For production
|
56
|
+
config.assert_endpoint = URI('https://test.saferpay.com/api/Payment/v1/PaymentPage/Assert')
|
57
|
+
config.terminal_id = "17989968"
|
58
|
+
config.customer_id = "240918"
|
59
|
+
config.authentication = 'Basic QVBJlzI0OTYxOF84OTI0Mzc2MDpXZWJvbmlzZUxhYkRvdEMpbQ=='
|
60
|
+
end
|
61
|
+
```
|
62
|
+
|
63
|
+
Transaction Flow
|
64
|
+
```
|
65
|
+
Step 1: Payment Page Initialize
|
66
|
+
> Initializes the Payment and generates the RedirectUrl for the Payment Page.
|
67
|
+
Step 2: Redirect to the RedirectUrl
|
68
|
+
Step 3: Return to ReturnUrl depending on the outcome of the transaction. The ReturnUrls are defined in step 1!
|
69
|
+
Step 4: Payment Page Assert
|
70
|
+
>Gathers all the information about the payment, like LiabilityShift through 3D Secure and more, using the Token, gathered in step 1!
|
71
|
+
Step 5: Depending on the outcome of step 4 you may
|
72
|
+
> Capture/Finalize the Transaction
|
73
|
+
> Cancel/Abort the Transaction
|
74
|
+
Step 6: Transaction is finished!
|
75
|
+
```
|
76
|
+
Note: We have only covered Step 1 to Step 4
|
77
|
+
|
78
|
+
|
79
|
+
```
|
80
|
+
def initialize_payment
|
81
|
+
options = {
|
82
|
+
payment_methods: [params[:payment_method]],
|
83
|
+
amount: 150 * 100,
|
84
|
+
currency: 'EUR',
|
85
|
+
order_id: '123123',
|
86
|
+
description: 'Payment description',
|
87
|
+
request_id: "33e8af17-35c1-4165-a343-c1c86a320f3b"
|
88
|
+
}
|
89
|
+
service = SaferpayRuby::PaymentGatewayApi.new(
|
90
|
+
success_url: "http://localhost:3010/success?order_id=1231&user_id=22",
|
91
|
+
failure_url: "http://localhost:3010/failure?order_id=1231&user_id=22"
|
92
|
+
)
|
93
|
+
response = service.initialize_payment_api(options)
|
94
|
+
|
95
|
+
initialize_assert_api(response, request_id) #initialize assert API in redirect URL method
|
96
|
+
|
97
|
+
# save the details of transaction response
|
98
|
+
end
|
99
|
+
|
100
|
+
def initialize_assert_api(response, request_id)
|
101
|
+
# Record the transaction response whether it is success or failure
|
102
|
+
options = {
|
103
|
+
request_id: request_id,
|
104
|
+
token: response['Token']
|
105
|
+
}
|
106
|
+
service = SaferpayRuby::PaymentGatewayApi.new
|
107
|
+
response = service.initialize_payment_assert_api(options)
|
108
|
+
response_json = JSON.parse(response.read_body)
|
109
|
+
end
|
110
|
+
```
|
111
|
+
|
112
|
+
|
113
|
+
## Development
|
114
|
+
|
115
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
116
|
+
|
117
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
118
|
+
|
119
|
+
## Contributing
|
120
|
+
|
121
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/[nischay-dhiman]/saferpay_ruby. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
122
|
+
|
123
|
+
## License
|
124
|
+
|
125
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
126
|
+
|
127
|
+
## Code of Conduct
|
128
|
+
|
129
|
+
Everyone interacting in the SaferpayRuby project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[nischay-dhiman]/saferpay_ruby/blob/master/CODE_OF_CONDUCT.md).
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "saferpay_ruby"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start(__FILE__)
|
data/bin/setup
ADDED
@@ -0,0 +1,76 @@
|
|
1
|
+
require "saferpay_ruby/version"
|
2
|
+
require "saferpay_ruby/configuration"
|
3
|
+
|
4
|
+
module SaferpayRuby
|
5
|
+
extend Configuration
|
6
|
+
class Error < StandardError; end
|
7
|
+
|
8
|
+
class PaymentGatewayApi
|
9
|
+
attr_accessor *Configuration::VALID_CONFIG_KEYS
|
10
|
+
|
11
|
+
def initialize(options = {})
|
12
|
+
options.delete(:endpoint)
|
13
|
+
options.delete_if { |k, v| v.nil? }
|
14
|
+
@options = SaferpayRuby.options.merge(options)
|
15
|
+
|
16
|
+
@options.each_pair do |key, val|
|
17
|
+
send "#{key}=", val
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
def initialize_payment_api(options = {})
|
22
|
+
http = Net::HTTP.new(endpoint.host, endpoint.port)
|
23
|
+
http.use_ssl = true
|
24
|
+
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
|
25
|
+
|
26
|
+
request = Net::HTTP::Post.new(endpoint)
|
27
|
+
request["content-type"] = 'application/json; charset=utf-8'
|
28
|
+
request["accept"] = 'application/json'
|
29
|
+
request["authorization"] = authentication
|
30
|
+
|
31
|
+
request.body = {
|
32
|
+
"RequestHeader": {
|
33
|
+
"SpecVersion": "1.7",
|
34
|
+
"CustomerId": customer_id,
|
35
|
+
"RequestId": options[:request_id],
|
36
|
+
"RetryIndicator": 0
|
37
|
+
},
|
38
|
+
"TerminalId": terminal_id,
|
39
|
+
"Payment": {
|
40
|
+
"Amount": {
|
41
|
+
"Value": options[:amount],
|
42
|
+
"CurrencyCode": options[:currency]
|
43
|
+
},
|
44
|
+
"OrderId": options[:order_id],
|
45
|
+
"Description": options[:description]
|
46
|
+
},
|
47
|
+
"PaymentMethods": options[:payment_methods],
|
48
|
+
"ReturnUrls": {
|
49
|
+
"Success": success_url,
|
50
|
+
"Fail": failure_url
|
51
|
+
}
|
52
|
+
}.to_json
|
53
|
+
http.request(request)
|
54
|
+
end
|
55
|
+
|
56
|
+
def initialize_payment_assert_api(options = {})
|
57
|
+
http = Net::HTTP.new(assert_endpoint.host, assert_endpoint.port)
|
58
|
+
http.use_ssl = true
|
59
|
+
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
|
60
|
+
request = Net::HTTP::Post.new(assert_endpoint)
|
61
|
+
request["content-type"] = 'application/json; charset=utf-8'
|
62
|
+
request["accept"] = 'application/json'
|
63
|
+
request["authorization"] = authentication
|
64
|
+
request.body = {
|
65
|
+
"RequestHeader": {
|
66
|
+
"SpecVersion": "1.15",
|
67
|
+
"CustomerId": customer_id,
|
68
|
+
"RequestId": options[:request_id],
|
69
|
+
"RetryIndicator": 0
|
70
|
+
},
|
71
|
+
"Token": options[:token]
|
72
|
+
}.to_json
|
73
|
+
http.request(request)
|
74
|
+
end
|
75
|
+
end
|
76
|
+
end
|
@@ -0,0 +1,39 @@
|
|
1
|
+
module SaferpayRuby
|
2
|
+
module Configuration
|
3
|
+
DEFAULTS = {
|
4
|
+
endpoint: URI('https://test.saferpay.com/api/Payment/v1/PaymentPage/Initialize'),
|
5
|
+
user_agent: 'Saferpay Ruby Library',
|
6
|
+
terminal_id: "1111111",
|
7
|
+
customer_id: "2222222",
|
8
|
+
authentication: 'Basic PVBJXzI0OTYxOF84OTI0Mzc2MDpXZWJvbmlzZUxhYkRvdEMwbQ==', # Base 64 encoded string of 'username:password'
|
9
|
+
success_url: "http://localhost:3010/",
|
10
|
+
failure_url: "http://localhost:3010/",
|
11
|
+
back_link: nil,
|
12
|
+
notify_url: nil,
|
13
|
+
}.freeze
|
14
|
+
|
15
|
+
VALID_CONFIG_KEYS = DEFAULTS.keys.freeze
|
16
|
+
|
17
|
+
# Build accessor methods for every config options so we can do this, for example: Saferpay.account_id = 'xxxxx'
|
18
|
+
attr_accessor *VALID_CONFIG_KEYS
|
19
|
+
|
20
|
+
def options
|
21
|
+
@options = Hash[ * DEFAULTS.map { |key, val| [key, send(key)] }.flatten ].freeze
|
22
|
+
end
|
23
|
+
|
24
|
+
# Make sure we have the default values set when we get 'extended'
|
25
|
+
def self.extended(base)
|
26
|
+
base.reset
|
27
|
+
end
|
28
|
+
|
29
|
+
def reset
|
30
|
+
options.each_pair do |key, val|
|
31
|
+
send "#{key}=", DEFAULTS[key]
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
def configure
|
36
|
+
yield self
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
lib = File.expand_path("lib", __dir__)
|
2
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
3
|
+
require "saferpay_ruby/version"
|
4
|
+
|
5
|
+
Gem::Specification.new do |spec|
|
6
|
+
spec.name = "saferpay_ruby"
|
7
|
+
spec.version = SaferpayRuby::VERSION
|
8
|
+
spec.authors = ["nischay"]
|
9
|
+
spec.email = ["nischay.dhiman@gmail.com"]
|
10
|
+
|
11
|
+
spec.summary = "Saferpay JSON application programming interface with a ruby API wrapper built with Net::HTTP "
|
12
|
+
spec.description = "
|
13
|
+
Saferpay JSON application programming interface with a ruby API wrapper built with Net::HTTP
|
14
|
+
|
15
|
+
Saferpay API is designed to have predictable, resource-oriented URLs and to use HTTP response codes to indicate API errors. Saferpay use built-in HTTP features, like HTTP authentication and HTTP verbs, which can be understood by off-the-shelf HTTP clients. JSON will be returned in all responses from the API, including errors."
|
16
|
+
spec.homepage = "https://github.com/nischay-dhiman/saferpay_ruby"
|
17
|
+
spec.license = "MIT"
|
18
|
+
|
19
|
+
spec.metadata["allowed_push_host"] = "https://rubygems.org"
|
20
|
+
|
21
|
+
spec.metadata["homepage_uri"] = spec.homepage
|
22
|
+
spec.metadata["source_code_uri"] = "https://github.com/nischay-dhiman/saferpay_ruby"
|
23
|
+
spec.metadata["changelog_uri"] = "https://github.com/nischay-dhiman/saferpay_ruby"
|
24
|
+
|
25
|
+
# Specify which files should be added to the gem when it is released.
|
26
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
27
|
+
spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
|
28
|
+
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
29
|
+
end
|
30
|
+
spec.bindir = "exe"
|
31
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
32
|
+
spec.require_paths = ["lib"]
|
33
|
+
|
34
|
+
spec.add_development_dependency "bundler", "~> 2.0"
|
35
|
+
spec.add_development_dependency "rake", "~> 13.0"
|
36
|
+
spec.add_development_dependency "rspec", "~> 3.0"
|
37
|
+
end
|
metadata
ADDED
@@ -0,0 +1,110 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: saferpay_ruby
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- nischay
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2020-03-01 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '2.0'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '2.0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '13.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '13.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rspec
|
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
|
+
description: |2-
|
56
|
+
|
57
|
+
Saferpay JSON application programming interface with a ruby API wrapper built with Net::HTTP
|
58
|
+
|
59
|
+
Saferpay API is designed to have predictable, resource-oriented URLs and to use HTTP response codes to indicate API errors. Saferpay use built-in HTTP features, like HTTP authentication and HTTP verbs, which can be understood by off-the-shelf HTTP clients. JSON will be returned in all responses from the API, including errors.
|
60
|
+
email:
|
61
|
+
- nischay.dhiman@gmail.com
|
62
|
+
executables: []
|
63
|
+
extensions: []
|
64
|
+
extra_rdoc_files: []
|
65
|
+
files:
|
66
|
+
- ".gitignore"
|
67
|
+
- ".rspec"
|
68
|
+
- ".travis.yml"
|
69
|
+
- CODE_OF_CONDUCT.md
|
70
|
+
- Gemfile
|
71
|
+
- Gemfile.lock
|
72
|
+
- LICENSE.txt
|
73
|
+
- README.md
|
74
|
+
- Rakefile
|
75
|
+
- bin/console
|
76
|
+
- bin/setup
|
77
|
+
- lib/saferpay_ruby.rb
|
78
|
+
- lib/saferpay_ruby/configuration.rb
|
79
|
+
- lib/saferpay_ruby/version.rb
|
80
|
+
- saferpay_ruby.gemspec
|
81
|
+
homepage: https://github.com/nischay-dhiman/saferpay_ruby
|
82
|
+
licenses:
|
83
|
+
- MIT
|
84
|
+
metadata:
|
85
|
+
allowed_push_host: https://rubygems.org
|
86
|
+
homepage_uri: https://github.com/nischay-dhiman/saferpay_ruby
|
87
|
+
source_code_uri: https://github.com/nischay-dhiman/saferpay_ruby
|
88
|
+
changelog_uri: https://github.com/nischay-dhiman/saferpay_ruby
|
89
|
+
post_install_message:
|
90
|
+
rdoc_options: []
|
91
|
+
require_paths:
|
92
|
+
- lib
|
93
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
94
|
+
requirements:
|
95
|
+
- - ">="
|
96
|
+
- !ruby/object:Gem::Version
|
97
|
+
version: '0'
|
98
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
99
|
+
requirements:
|
100
|
+
- - ">="
|
101
|
+
- !ruby/object:Gem::Version
|
102
|
+
version: '0'
|
103
|
+
requirements: []
|
104
|
+
rubyforge_project:
|
105
|
+
rubygems_version: 2.5.2.3
|
106
|
+
signing_key:
|
107
|
+
specification_version: 4
|
108
|
+
summary: Saferpay JSON application programming interface with a ruby API wrapper built
|
109
|
+
with Net::HTTP
|
110
|
+
test_files: []
|