simple_payment 0.1.1
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 +5 -0
- data/Gemfile +6 -0
- data/Gemfile.lock +70 -0
- data/LICENSE.txt +21 -0
- data/README.md +39 -0
- data/Rakefile +6 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/lib/simple_payment/braintree/gateway.rb +56 -0
- data/lib/simple_payment/braintree/request.rb +13 -0
- data/lib/simple_payment/braintree/response.rb +17 -0
- data/lib/simple_payment/models/payment.rb +111 -0
- data/lib/simple_payment/models/transaction.rb +8 -0
- data/lib/simple_payment/test/gateway.rb +34 -0
- data/lib/simple_payment/test/request.rb +9 -0
- data/lib/simple_payment/test/response.rb +17 -0
- data/lib/simple_payment/transmission_error.rb +15 -0
- data/lib/simple_payment/version.rb +3 -0
- data/lib/simple_payment.rb +29 -0
- data/simple_payment.gemspec +42 -0
- metadata +193 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 568aecde3af8a78ff56b34c0cd36c86068f796ea
|
4
|
+
data.tar.gz: 48d17402840eb17adea4217a84e2cdd16b12bce1
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 43add00d4ba7b5698f4fc541db86f46a29d88ce5b7f0acfd554d02222facc05a874a9ddd38f06a3796d7d5f068f948fc1f1030c243d26fb525e9bf7b964fbea6
|
7
|
+
data.tar.gz: 8b8c1ba6dda9961654a9b45dc818a5e57983402297bec53614fac7546d214b5206e241efa54477a946b2ee0ee6b37fcc936689f911131e30922cdb54f450bd68
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.travis.yml
ADDED
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,70 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
simple_payment (0.1.1)
|
5
|
+
aasm (~> 5)
|
6
|
+
activerecord (~> 5)
|
7
|
+
braintree (~> 2)
|
8
|
+
|
9
|
+
GEM
|
10
|
+
remote: https://rubygems.org/
|
11
|
+
specs:
|
12
|
+
aasm (5.0.0)
|
13
|
+
concurrent-ruby (~> 1.0)
|
14
|
+
activemodel (5.2.0)
|
15
|
+
activesupport (= 5.2.0)
|
16
|
+
activerecord (5.2.0)
|
17
|
+
activemodel (= 5.2.0)
|
18
|
+
activesupport (= 5.2.0)
|
19
|
+
arel (>= 9.0)
|
20
|
+
activesupport (5.2.0)
|
21
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
22
|
+
i18n (>= 0.7, < 2)
|
23
|
+
minitest (~> 5.1)
|
24
|
+
tzinfo (~> 1.1)
|
25
|
+
arel (9.0.0)
|
26
|
+
braintree (2.64.0)
|
27
|
+
builder (>= 2.0.0)
|
28
|
+
builder (3.2.3)
|
29
|
+
concurrent-ruby (1.0.5)
|
30
|
+
diff-lcs (1.3)
|
31
|
+
factory_bot (4.10.0)
|
32
|
+
activesupport (>= 3.0.0)
|
33
|
+
i18n (1.0.1)
|
34
|
+
concurrent-ruby (~> 1.0)
|
35
|
+
minitest (5.11.3)
|
36
|
+
rake (10.5.0)
|
37
|
+
rspec (3.7.0)
|
38
|
+
rspec-core (~> 3.7.0)
|
39
|
+
rspec-expectations (~> 3.7.0)
|
40
|
+
rspec-mocks (~> 3.7.0)
|
41
|
+
rspec-collection_matchers (1.1.3)
|
42
|
+
rspec-expectations (>= 2.99.0.beta1)
|
43
|
+
rspec-core (3.7.1)
|
44
|
+
rspec-support (~> 3.7.0)
|
45
|
+
rspec-expectations (3.7.0)
|
46
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
47
|
+
rspec-support (~> 3.7.0)
|
48
|
+
rspec-mocks (3.7.0)
|
49
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
50
|
+
rspec-support (~> 3.7.0)
|
51
|
+
rspec-support (3.7.1)
|
52
|
+
sqlite3 (1.3.13)
|
53
|
+
thread_safe (0.3.6)
|
54
|
+
tzinfo (1.2.5)
|
55
|
+
thread_safe (~> 0.1)
|
56
|
+
|
57
|
+
PLATFORMS
|
58
|
+
ruby
|
59
|
+
|
60
|
+
DEPENDENCIES
|
61
|
+
bundler (~> 1.16)
|
62
|
+
factory_bot (~> 4)
|
63
|
+
rake (~> 10.0)
|
64
|
+
rspec (~> 3.0)
|
65
|
+
rspec-collection_matchers (~> 1)
|
66
|
+
simple_payment!
|
67
|
+
sqlite3 (~> 1)
|
68
|
+
|
69
|
+
BUNDLED WITH
|
70
|
+
1.16.1
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2018 Doug Knight
|
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,39 @@
|
|
1
|
+
# SimplePayment
|
2
|
+
|
3
|
+
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/simple_payment`. To experiment with that code, run `bin/console` for an interactive prompt.
|
4
|
+
|
5
|
+
TODO: Delete this and the text above, and describe your gem
|
6
|
+
|
7
|
+
## Installation
|
8
|
+
|
9
|
+
Add this line to your application's Gemfile:
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
gem 'simple_payment'
|
13
|
+
```
|
14
|
+
|
15
|
+
And then execute:
|
16
|
+
|
17
|
+
$ bundle
|
18
|
+
|
19
|
+
Or install it yourself as:
|
20
|
+
|
21
|
+
$ gem install simple_payment
|
22
|
+
|
23
|
+
## Usage
|
24
|
+
|
25
|
+
TODO: Write usage instructions here
|
26
|
+
|
27
|
+
## Development
|
28
|
+
|
29
|
+
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.
|
30
|
+
|
31
|
+
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).
|
32
|
+
|
33
|
+
## Contributing
|
34
|
+
|
35
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/simple_payment.
|
36
|
+
|
37
|
+
## License
|
38
|
+
|
39
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "simple_payment"
|
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,56 @@
|
|
1
|
+
require 'braintree'
|
2
|
+
|
3
|
+
module SimplePayment
|
4
|
+
module Braintree
|
5
|
+
class Gateway
|
6
|
+
def execute(payment, nonce)
|
7
|
+
result = gateway.transaction.sale(execute_args(payment, nonce))
|
8
|
+
[Request.new(:sale), Response.new(result)]
|
9
|
+
rescue StandardError => e
|
10
|
+
raise TransmissionError.new Request.new(:sale), e.message
|
11
|
+
end
|
12
|
+
|
13
|
+
def completed?(payment)
|
14
|
+
transaction = gateway.transaction.find(payment.external_id)
|
15
|
+
%w(settling settled).include?(transaction.status)
|
16
|
+
rescue StandardError => e
|
17
|
+
raise TransmissionError.new Request.new(:find), e.message
|
18
|
+
end
|
19
|
+
|
20
|
+
def cancel(payment)
|
21
|
+
result = gateway.transaction.void(payment.external_id)
|
22
|
+
[Request.new(:cancel), Response.new(result)]
|
23
|
+
rescue StandardError => e
|
24
|
+
raise TransmissionError.new Request.new(:cancel), e.message
|
25
|
+
end
|
26
|
+
|
27
|
+
def refund(payment)
|
28
|
+
result = gateway.transaction.refund(payment.external_id)
|
29
|
+
[Request.new(:refund), Response.new(result)]
|
30
|
+
rescue StandardError => e
|
31
|
+
raise TransmissionError.new Request.new(:refund), e.message
|
32
|
+
end
|
33
|
+
|
34
|
+
private
|
35
|
+
|
36
|
+
def gateway
|
37
|
+
::Braintree::Gateway.new
|
38
|
+
end
|
39
|
+
|
40
|
+
def execute_args(payment, nonce)
|
41
|
+
{
|
42
|
+
amount: payment.amount,
|
43
|
+
payment_method_nonce: nonce,
|
44
|
+
options: {
|
45
|
+
submit_for_settlement: true
|
46
|
+
}
|
47
|
+
}.tap do |a|
|
48
|
+
if payment.payable&.respond_to?(:custom_fields) &&
|
49
|
+
payment.payable&.custom_fields.present?
|
50
|
+
a[:custom_fields] = payment.payable.custom_fields
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
@@ -0,0 +1,111 @@
|
|
1
|
+
module SimplePayment
|
2
|
+
class Payment < ActiveRecord::Base
|
3
|
+
include AASM
|
4
|
+
|
5
|
+
self.table_name = 'simple_payments'
|
6
|
+
|
7
|
+
belongs_to :payable, polymorphic: true
|
8
|
+
has_many :transactions
|
9
|
+
|
10
|
+
validates_presence_of :amount, :payable_id, :payable_type, :status
|
11
|
+
|
12
|
+
scope :accepted, ->{ where status: %w(approved completed) }
|
13
|
+
|
14
|
+
aasm column: 'status' do
|
15
|
+
state :pending
|
16
|
+
state :approved
|
17
|
+
state :cancelled
|
18
|
+
state :completed
|
19
|
+
state :failed
|
20
|
+
state :refunded
|
21
|
+
|
22
|
+
event :_approve do
|
23
|
+
transitions from: :pending, to: :approved
|
24
|
+
end
|
25
|
+
|
26
|
+
event :_fail do
|
27
|
+
transitions from: :pending, to: :failed
|
28
|
+
end
|
29
|
+
|
30
|
+
event :_complete do
|
31
|
+
transitions from: :approved, to: :completed
|
32
|
+
end
|
33
|
+
|
34
|
+
event :_cancel do
|
35
|
+
transitions from: :approved, to: :cancelled
|
36
|
+
end
|
37
|
+
|
38
|
+
event :_refund do
|
39
|
+
transitions from: :completed, to: :refunded
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
# Calls the gateway to execute the payment, saving the
|
44
|
+
# communication details and status change to the model
|
45
|
+
def execute!(nonce)
|
46
|
+
return unless may__approve?
|
47
|
+
request, response = gateway.execute(self, nonce)
|
48
|
+
if response.success?
|
49
|
+
_approve
|
50
|
+
else
|
51
|
+
_fail
|
52
|
+
end
|
53
|
+
self.external_id ||= response.external_id
|
54
|
+
self.external_fee = gateway.calculate_fee(self)
|
55
|
+
save!
|
56
|
+
|
57
|
+
persist_transaction request, response
|
58
|
+
response.success?
|
59
|
+
rescue TransmissionError => e
|
60
|
+
handle_error e
|
61
|
+
false
|
62
|
+
end
|
63
|
+
|
64
|
+
# Calls the gateway to see if an approved payment has been completed
|
65
|
+
def complete!
|
66
|
+
return unless may__complete?
|
67
|
+
_complete! if gateway.completed?(self)
|
68
|
+
|
69
|
+
rescue TransmissionError => e
|
70
|
+
handle_error e
|
71
|
+
end
|
72
|
+
|
73
|
+
# Calls the gateway to cancel an approved payment or
|
74
|
+
# to refund a completed payment.
|
75
|
+
def cancel!
|
76
|
+
return unless approved?
|
77
|
+
request, response = gateway.cancel self
|
78
|
+
_cancel! if response.success?
|
79
|
+
persist_transaction request, response
|
80
|
+
rescue TransmissionError => e
|
81
|
+
handle_error e
|
82
|
+
end
|
83
|
+
|
84
|
+
def refund!
|
85
|
+
return unless completed?
|
86
|
+
request, response = gateway.refund self
|
87
|
+
_refund! if response.success?
|
88
|
+
persist_transaction request, response
|
89
|
+
rescue TransmissionError => e
|
90
|
+
handle_error e
|
91
|
+
end
|
92
|
+
|
93
|
+
private
|
94
|
+
|
95
|
+
def handle_error(error)
|
96
|
+
transactions.create! \
|
97
|
+
request: error.request.serialize,
|
98
|
+
error: error.serialize
|
99
|
+
end
|
100
|
+
|
101
|
+
def gateway
|
102
|
+
SimplePayment::gateway
|
103
|
+
end
|
104
|
+
|
105
|
+
def persist_transaction(request, response)
|
106
|
+
transactions.create! \
|
107
|
+
request: request.serialize,
|
108
|
+
response: response.serialize
|
109
|
+
end
|
110
|
+
end
|
111
|
+
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
module SimplePayment
|
2
|
+
module Test
|
3
|
+
class Gateway
|
4
|
+
def execute(payment, nonce)
|
5
|
+
[
|
6
|
+
Request.new,
|
7
|
+
Response.new
|
8
|
+
]
|
9
|
+
end
|
10
|
+
|
11
|
+
def completed?(payment)
|
12
|
+
true
|
13
|
+
end
|
14
|
+
|
15
|
+
def cancel(payment)
|
16
|
+
[
|
17
|
+
Request.new,
|
18
|
+
Response.new
|
19
|
+
]
|
20
|
+
end
|
21
|
+
|
22
|
+
def refund(payment)
|
23
|
+
[
|
24
|
+
Request.new,
|
25
|
+
Response.new
|
26
|
+
]
|
27
|
+
end
|
28
|
+
|
29
|
+
def calculate_fee(payment)
|
30
|
+
1.23
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
module SimplePayment
|
2
|
+
class TransmissionError < StandardError
|
3
|
+
|
4
|
+
attr_reader :request
|
5
|
+
|
6
|
+
def initialize(request, message = 'Unable to complete the transmission')
|
7
|
+
super message
|
8
|
+
@request = request
|
9
|
+
end
|
10
|
+
|
11
|
+
def serialize
|
12
|
+
message
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
require 'aasm'
|
2
|
+
require 'active_record'
|
3
|
+
require 'simple_payment/transmission_error'
|
4
|
+
require 'simple_payment/braintree/gateway'
|
5
|
+
require 'simple_payment/braintree/request'
|
6
|
+
require 'simple_payment/braintree/response'
|
7
|
+
require 'simple_payment/models/payment'
|
8
|
+
require 'simple_payment/models/transaction'
|
9
|
+
require 'simple_payment/version'
|
10
|
+
require 'simple_payment/test/gateway'
|
11
|
+
require 'simple_payment/test/request'
|
12
|
+
require 'simple_payment/test/response'
|
13
|
+
|
14
|
+
module SimplePayment
|
15
|
+
class << self
|
16
|
+
def gateway
|
17
|
+
@gateway.new
|
18
|
+
end
|
19
|
+
|
20
|
+
def configure(options)
|
21
|
+
@gateway = options[:gateway]
|
22
|
+
@gateway = SimplePayment::Test::Gateway if @gateway == :test
|
23
|
+
end
|
24
|
+
|
25
|
+
def clear_configuration
|
26
|
+
@gateway = nil
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
@@ -0,0 +1,42 @@
|
|
1
|
+
|
2
|
+
lib = File.expand_path("../lib", __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require "simple_payment/version"
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "simple_payment"
|
8
|
+
spec.version = SimplePayment::VERSION
|
9
|
+
spec.authors = ["Doug Knight"]
|
10
|
+
spec.email = ["dougbknight@gmail.com"]
|
11
|
+
|
12
|
+
spec.summary = %q{Payment library using an active record model with state machine.}
|
13
|
+
spec.description = %q{Payment library seeking to make payment interactions simple and reusable.}
|
14
|
+
spec.homepage = "https://github.com/dgknght/simple_payment"
|
15
|
+
spec.license = "MIT"
|
16
|
+
|
17
|
+
# Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
|
18
|
+
# to allow pushing to a single host or delete this section to allow pushing to any host.
|
19
|
+
if spec.respond_to?(:metadata)
|
20
|
+
spec.metadata["allowed_push_host"] = "https://rubygems.org"
|
21
|
+
else
|
22
|
+
raise "RubyGems 2.0 or newer is required to protect against " \
|
23
|
+
"public gem pushes."
|
24
|
+
end
|
25
|
+
|
26
|
+
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
27
|
+
f.match(%r{^(test|spec|features)/})
|
28
|
+
end
|
29
|
+
spec.bindir = "exe"
|
30
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
31
|
+
spec.require_paths = ["lib"]
|
32
|
+
spec.add_dependency 'activerecord', '~> 5'
|
33
|
+
spec.add_dependency 'aasm', '~> 5'
|
34
|
+
spec.add_dependency 'braintree', '~> 2'
|
35
|
+
|
36
|
+
spec.add_development_dependency "bundler", "~> 1.16"
|
37
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
38
|
+
spec.add_development_dependency "rspec", "~> 3.0"
|
39
|
+
spec.add_development_dependency 'rspec-collection_matchers', '~> 1'
|
40
|
+
spec.add_development_dependency 'sqlite3', '~> 1'
|
41
|
+
spec.add_development_dependency 'factory_bot', '~> 4'
|
42
|
+
end
|
metadata
ADDED
@@ -0,0 +1,193 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: simple_payment
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Doug Knight
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2018-08-19 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: activerecord
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '5'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '5'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: aasm
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '5'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '5'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: braintree
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '2'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '2'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: bundler
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '1.16'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '1.16'
|
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.0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '10.0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: rspec
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '3.0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '3.0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: rspec-collection_matchers
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - "~>"
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '1'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - "~>"
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '1'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: sqlite3
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - "~>"
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '1'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - "~>"
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '1'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: factory_bot
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - "~>"
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '4'
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - "~>"
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '4'
|
139
|
+
description: Payment library seeking to make payment interactions simple and reusable.
|
140
|
+
email:
|
141
|
+
- dougbknight@gmail.com
|
142
|
+
executables: []
|
143
|
+
extensions: []
|
144
|
+
extra_rdoc_files: []
|
145
|
+
files:
|
146
|
+
- ".gitignore"
|
147
|
+
- ".rspec"
|
148
|
+
- ".travis.yml"
|
149
|
+
- Gemfile
|
150
|
+
- Gemfile.lock
|
151
|
+
- LICENSE.txt
|
152
|
+
- README.md
|
153
|
+
- Rakefile
|
154
|
+
- bin/console
|
155
|
+
- bin/setup
|
156
|
+
- lib/simple_payment.rb
|
157
|
+
- lib/simple_payment/braintree/gateway.rb
|
158
|
+
- lib/simple_payment/braintree/request.rb
|
159
|
+
- lib/simple_payment/braintree/response.rb
|
160
|
+
- lib/simple_payment/models/payment.rb
|
161
|
+
- lib/simple_payment/models/transaction.rb
|
162
|
+
- lib/simple_payment/test/gateway.rb
|
163
|
+
- lib/simple_payment/test/request.rb
|
164
|
+
- lib/simple_payment/test/response.rb
|
165
|
+
- lib/simple_payment/transmission_error.rb
|
166
|
+
- lib/simple_payment/version.rb
|
167
|
+
- simple_payment.gemspec
|
168
|
+
homepage: https://github.com/dgknght/simple_payment
|
169
|
+
licenses:
|
170
|
+
- MIT
|
171
|
+
metadata:
|
172
|
+
allowed_push_host: https://rubygems.org
|
173
|
+
post_install_message:
|
174
|
+
rdoc_options: []
|
175
|
+
require_paths:
|
176
|
+
- lib
|
177
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
178
|
+
requirements:
|
179
|
+
- - ">="
|
180
|
+
- !ruby/object:Gem::Version
|
181
|
+
version: '0'
|
182
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
183
|
+
requirements:
|
184
|
+
- - ">="
|
185
|
+
- !ruby/object:Gem::Version
|
186
|
+
version: '0'
|
187
|
+
requirements: []
|
188
|
+
rubyforge_project:
|
189
|
+
rubygems_version: 2.6.14
|
190
|
+
signing_key:
|
191
|
+
specification_version: 4
|
192
|
+
summary: Payment library using an active record model with state machine.
|
193
|
+
test_files: []
|