tiger-payment 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.document +5 -0
- data/Gemfile +16 -0
- data/Gemfile.lock +22 -0
- data/LICENSE.txt +20 -0
- data/README.rdoc +19 -0
- data/Rakefile +53 -0
- data/VERSION +1 -0
- data/lib/tiger-payment.rb +8 -0
- data/lib/tiger-payment/configuration.rb +25 -0
- data/lib/tiger-payment/gateway.rb +152 -0
- data/lib/tiger-payment/response.rb +117 -0
- data/test/helper.rb +18 -0
- data/test/test_tiger-payment.rb +7 -0
- data/tiger-payment-0.0.0.gem +0 -0
- data/tiger-payment.gemspec +66 -0
- metadata +149 -0
data/.document
ADDED
data/Gemfile
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
source "http://rubygems.org"
|
2
|
+
# Add dependencies required to use your gem here.
|
3
|
+
# Example:
|
4
|
+
# gem "activesupport", ">= 2.3.5"
|
5
|
+
|
6
|
+
# Add dependencies to develop your gem here.
|
7
|
+
# Include everything needed to run rake, tests, features, etc.
|
8
|
+
|
9
|
+
gem 'rest-client', '1.0.4'
|
10
|
+
|
11
|
+
group :development do
|
12
|
+
gem "shoulda", ">= 0"
|
13
|
+
gem "bundler", "~> 1.0.0"
|
14
|
+
gem "jeweler", "~> 1.6.2"
|
15
|
+
gem "rcov", ">= 0"
|
16
|
+
end
|
data/Gemfile.lock
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
GEM
|
2
|
+
remote: http://rubygems.org/
|
3
|
+
specs:
|
4
|
+
git (1.2.5)
|
5
|
+
jeweler (1.6.2)
|
6
|
+
bundler (~> 1.0)
|
7
|
+
git (>= 1.2.5)
|
8
|
+
rake
|
9
|
+
rake (0.9.2)
|
10
|
+
rcov (0.9.9)
|
11
|
+
rest-client (1.0.4)
|
12
|
+
shoulda (2.11.3)
|
13
|
+
|
14
|
+
PLATFORMS
|
15
|
+
ruby
|
16
|
+
|
17
|
+
DEPENDENCIES
|
18
|
+
bundler (~> 1.0.0)
|
19
|
+
jeweler (~> 1.6.2)
|
20
|
+
rcov
|
21
|
+
rest-client (= 1.0.4)
|
22
|
+
shoulda
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) 2011 Garrett Lancaster
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.rdoc
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
= tiger-payment
|
2
|
+
|
3
|
+
Description goes here.
|
4
|
+
|
5
|
+
== Contributing to tiger-payment
|
6
|
+
|
7
|
+
* Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
|
8
|
+
* Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
|
9
|
+
* Fork the project
|
10
|
+
* Start a feature/bugfix branch
|
11
|
+
* Commit and push until you are happy with your contribution
|
12
|
+
* Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
|
13
|
+
* Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
|
14
|
+
|
15
|
+
== Copyright
|
16
|
+
|
17
|
+
Copyright (c) 2011 Garrett Lancaster. See LICENSE.txt for
|
18
|
+
further details.
|
19
|
+
|
data/Rakefile
ADDED
@@ -0,0 +1,53 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
require 'rubygems'
|
4
|
+
require 'bundler'
|
5
|
+
begin
|
6
|
+
Bundler.setup(:default, :development)
|
7
|
+
rescue Bundler::BundlerError => e
|
8
|
+
$stderr.puts e.message
|
9
|
+
$stderr.puts "Run `bundle install` to install missing gems"
|
10
|
+
exit e.status_code
|
11
|
+
end
|
12
|
+
require 'rake'
|
13
|
+
|
14
|
+
require 'jeweler'
|
15
|
+
Jeweler::Tasks.new do |gem|
|
16
|
+
# gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
|
17
|
+
gem.name = "tiger-payment"
|
18
|
+
gem.homepage = "http://github.com/garrettlancaster/tiger-payment"
|
19
|
+
gem.license = "MIT"
|
20
|
+
gem.summary = %Q{Simple integration with Tiger Payment Solutions direct-post API}
|
21
|
+
# gem.description = %Q{TODO: longer description of your gem}
|
22
|
+
gem.email = "glancast@garrettlancaster.com"
|
23
|
+
gem.authors = ["Garrett Lancaster"]
|
24
|
+
# dependencies defined in Gemfile
|
25
|
+
end
|
26
|
+
Jeweler::RubygemsDotOrgTasks.new
|
27
|
+
|
28
|
+
require 'rake/testtask'
|
29
|
+
Rake::TestTask.new(:test) do |test|
|
30
|
+
test.libs << 'lib' << 'test'
|
31
|
+
test.pattern = 'test/**/test_*.rb'
|
32
|
+
test.verbose = true
|
33
|
+
end
|
34
|
+
|
35
|
+
require 'rcov/rcovtask'
|
36
|
+
Rcov::RcovTask.new do |test|
|
37
|
+
test.libs << 'test'
|
38
|
+
test.pattern = 'test/**/test_*.rb'
|
39
|
+
test.verbose = true
|
40
|
+
test.rcov_opts << '--exclude "gems/*"'
|
41
|
+
end
|
42
|
+
|
43
|
+
task :default => :test
|
44
|
+
|
45
|
+
require 'rake/rdoctask'
|
46
|
+
Rake::RDocTask.new do |rdoc|
|
47
|
+
version = File.exist?('VERSION') ? File.read('VERSION') : ""
|
48
|
+
|
49
|
+
rdoc.rdoc_dir = 'rdoc'
|
50
|
+
rdoc.title = "tiger-payment #{version}"
|
51
|
+
rdoc.rdoc_files.include('README*')
|
52
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
53
|
+
end
|
data/VERSION
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
0.0.1
|
@@ -0,0 +1,25 @@
|
|
1
|
+
module TigerPayment
|
2
|
+
# The Configuration class is responsible for determining your username/password
|
3
|
+
# based on your given RAILS_ENV and RAILS_ROOT. It looks for a yaml configuration
|
4
|
+
# file at:
|
5
|
+
# #{RAILS_ROOT}/config/tiger-payment/#{RAILS_ENV}.yml
|
6
|
+
#
|
7
|
+
# A sample test configuration would be:
|
8
|
+
# username: demo
|
9
|
+
# password: password
|
10
|
+
class Configuration
|
11
|
+
def initialize
|
12
|
+
config_path = File.join(RAILS_ROOT, "config", "tiger-payment", "#{RAILS_ENV}.yml")
|
13
|
+
@config = YAML.load(File.read(config_path))
|
14
|
+
end
|
15
|
+
|
16
|
+
def username
|
17
|
+
@config["username"]
|
18
|
+
end
|
19
|
+
|
20
|
+
def password
|
21
|
+
@config["password"]
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
@@ -0,0 +1,152 @@
|
|
1
|
+
module TigerPayment
|
2
|
+
# =Overview
|
3
|
+
# The Gateway class alows you to interact with Tiger Payment Processing.
|
4
|
+
#
|
5
|
+
# First, we instantiate a gateway. If you're using TigerPayment in a
|
6
|
+
# rails application, there's no need to provide username/password
|
7
|
+
# credentials on instantiation. TigerPayment will look for a configuration
|
8
|
+
# file at:
|
9
|
+
# config/tiger-payment/#{RAILS_ENV}.yml
|
10
|
+
#
|
11
|
+
# =Creating a Gateway
|
12
|
+
#
|
13
|
+
# First we instantiate a gateway in a rails application:
|
14
|
+
# # create a gateway from a rails app
|
15
|
+
# gateway = TigerPayment::Gateway.new
|
16
|
+
#
|
17
|
+
# # create a gateway in any ruby application
|
18
|
+
# gateway = TigerPayment::Gateway.new(:username => "demo", :password => "password")
|
19
|
+
#
|
20
|
+
# =Gateway Actions
|
21
|
+
#
|
22
|
+
# Once a Gateway is created, we can take many actions. Let's look at each
|
23
|
+
# of these.
|
24
|
+
#
|
25
|
+
# ==Sale
|
26
|
+
#
|
27
|
+
# Charge a card immediately. You must provide a ccnumber, ccexp and amount
|
28
|
+
# as a minimum.
|
29
|
+
#
|
30
|
+
# response = gateway.sale(
|
31
|
+
# :ccnumber => "4111111111111111",
|
32
|
+
# :ccexp => "1010",
|
33
|
+
# :amount => "1.00"
|
34
|
+
# )
|
35
|
+
#
|
36
|
+
# puts "Success!" if response.approved?
|
37
|
+
#
|
38
|
+
# ==Authorize
|
39
|
+
#
|
40
|
+
# Authorize the card to be captured in the future. Again, provide a ccnumber,
|
41
|
+
# ccexp and amount at a minumum. Store the resulting transaction_id to capture
|
42
|
+
# at a later time.
|
43
|
+
#
|
44
|
+
# response = gateway.authorize(
|
45
|
+
# :ccnumber => "4111111111111111",
|
46
|
+
# :ccexp => "1010",
|
47
|
+
# :amount => "1.00"
|
48
|
+
# )
|
49
|
+
#
|
50
|
+
# # store transaction_id for capture later
|
51
|
+
# transaction_id = response.transaction_id
|
52
|
+
#
|
53
|
+
# ==Capture
|
54
|
+
#
|
55
|
+
# Capture a previously authorized transaction. All you need is the transactionid.
|
56
|
+
#
|
57
|
+
# response = gateway.capture(:transactionid => my_transaction_id)
|
58
|
+
# puts "Success!" if response.approved?
|
59
|
+
#
|
60
|
+
# ==Credit
|
61
|
+
#
|
62
|
+
# Credit the card with some amount. Provide the ccnumber, ccexp and amount.
|
63
|
+
#
|
64
|
+
# response = gateway.credit(
|
65
|
+
# :ccnumber => "4111111111111111",
|
66
|
+
# :ccexp => "1010",
|
67
|
+
# :amount => "1.00"
|
68
|
+
# )
|
69
|
+
#
|
70
|
+
# puts "you just gave them a buck" if response.approved?
|
71
|
+
#
|
72
|
+
# ==Void
|
73
|
+
#
|
74
|
+
# Void an uncaptured transaction. Just provide the transactionid.
|
75
|
+
#
|
76
|
+
# response = gateway.void(:transactionid => my_transaction_id)
|
77
|
+
# puts "voided ftw" if response.approved?
|
78
|
+
#
|
79
|
+
# ==Refund
|
80
|
+
#
|
81
|
+
# Refund a transaction that has already been sold or captured. Just give it
|
82
|
+
# that transactionid.
|
83
|
+
#
|
84
|
+
# response = gateway.refund(:transactionid => my_transaction_id)
|
85
|
+
# puts "refund-city" if response.approved?
|
86
|
+
#
|
87
|
+
# ==Update
|
88
|
+
#
|
89
|
+
# Update an uncaptured transaction. Just provide the transactionid.
|
90
|
+
#
|
91
|
+
# response = gateway.update(:transactionid => my_transaction_id)
|
92
|
+
# puts "updated" if response.approved?
|
93
|
+
#
|
94
|
+
# =Responses
|
95
|
+
#
|
96
|
+
# For more info on how to deal with responses from the Gateway, check out
|
97
|
+
# the Response class.
|
98
|
+
class Gateway
|
99
|
+
TIGER_GATEWAY_URL = "https://secure.tigergateway.net/api/transact.php"
|
100
|
+
|
101
|
+
def initialize(params = {})
|
102
|
+
if defined?(RAILS_ENV) && defined?(RAILS_ROOT)
|
103
|
+
config = TigerPayment::Configuration.new
|
104
|
+
@username = config.username
|
105
|
+
@password = config.password
|
106
|
+
else
|
107
|
+
@username = params[:username]
|
108
|
+
@password = params[:password]
|
109
|
+
end
|
110
|
+
end
|
111
|
+
|
112
|
+
["sale", "credit", "capture", "void", "refund", "update"].each do |operation|
|
113
|
+
define_method(operation) do |params|
|
114
|
+
params.merge! :type => operation
|
115
|
+
make_request(params)
|
116
|
+
end
|
117
|
+
end
|
118
|
+
|
119
|
+
def authorize(params)
|
120
|
+
params.merge! :type => "auth"
|
121
|
+
make_request(params)
|
122
|
+
end
|
123
|
+
|
124
|
+
def add_recurring(params)
|
125
|
+
params.merge! :type => 'add_recurring'
|
126
|
+
make_request(params)
|
127
|
+
end
|
128
|
+
|
129
|
+
def add_recurring_and_charge(params)
|
130
|
+
params.merge! :type => 'sale'
|
131
|
+
make_request(params)
|
132
|
+
end
|
133
|
+
|
134
|
+
def delete_recurring(transaction_id)
|
135
|
+
params = {delete_recurring: transaction_id}
|
136
|
+
make_request(params)
|
137
|
+
end
|
138
|
+
|
139
|
+
private
|
140
|
+
|
141
|
+
def make_request(params)
|
142
|
+
params.merge! :username => @username, :password => @password
|
143
|
+
response_string = tiger_gateway.post(params)
|
144
|
+
TigerPayment::Response.build_from_string(response_string)
|
145
|
+
end
|
146
|
+
|
147
|
+
def tiger_gateway
|
148
|
+
@tiger_gateway ||= RestClient::Resource.new(TIGER_GATEWAY_URL)
|
149
|
+
end
|
150
|
+
end
|
151
|
+
end
|
152
|
+
|
@@ -0,0 +1,117 @@
|
|
1
|
+
module TigerPayment
|
2
|
+
# =Overview
|
3
|
+
#
|
4
|
+
# The Response object describes what happened to your Gateway request. Let's
|
5
|
+
# set up a response object.
|
6
|
+
#
|
7
|
+
# gateway = TigerPayment::Gateway.new(:username => "foo", :password => "password")
|
8
|
+
# response = gateway.sale(
|
9
|
+
# :ccnumber => '4111111111111111',
|
10
|
+
# :ccexp => '1010',
|
11
|
+
# :amount => '1.00'
|
12
|
+
# )
|
13
|
+
#
|
14
|
+
# ==Status
|
15
|
+
#
|
16
|
+
# When you get your response back from the Gateway, you can quickly check
|
17
|
+
# the status using three methods; #approved?, #declined? and #has_errors?
|
18
|
+
# The status is completely dependent on the response code from the gateway.
|
19
|
+
#
|
20
|
+
# if response.approved?
|
21
|
+
# puts "awesome"
|
22
|
+
# elsif response.declined?
|
23
|
+
# puts "someone doesn't have the cash, or the wrong card info"
|
24
|
+
# elsif response.has_errors?
|
25
|
+
# puts "there was probably a problem with the gateway or something"
|
26
|
+
# end
|
27
|
+
#
|
28
|
+
# ==Messages
|
29
|
+
#
|
30
|
+
# There are three types of messages you can get from the response; the
|
31
|
+
# message, the response code, and the response_code_message.
|
32
|
+
#
|
33
|
+
# response.message
|
34
|
+
# response.response_code
|
35
|
+
# response.response_code_message
|
36
|
+
|
37
|
+
class Response
|
38
|
+
RESPONSE = {
|
39
|
+
:approved => "1",
|
40
|
+
:declined => "2",
|
41
|
+
:errors => "3"
|
42
|
+
}
|
43
|
+
DEFAULT_MESSAGE = "No Message Provided"
|
44
|
+
RESPONSE_CODE_MESSAGES = {
|
45
|
+
"100" => "Transaction was Approved",
|
46
|
+
"200" => "Transaction was Declined by Processor",
|
47
|
+
"200" => "Do Not Honor",
|
48
|
+
"201" => "Insufficient Funds",
|
49
|
+
"202" => "Over Limit",
|
50
|
+
"203" => "Transaction not allowed",
|
51
|
+
"220" => "Incorrect Payment Data",
|
52
|
+
"221" => "No Such card Issuer",
|
53
|
+
"222" => "No Card Number on file with Issuer",
|
54
|
+
"223" => "Expired Card",
|
55
|
+
"224" => "Invalid Expiration Date",
|
56
|
+
"225" => "Invalid Security Code",
|
57
|
+
"240" => "Call Issuer for Further Information",
|
58
|
+
"250" => "Pick Up Card",
|
59
|
+
"251" => "Lost Card",
|
60
|
+
"252" => "Stolen Card",
|
61
|
+
"253" => "Fraudulant Card",
|
62
|
+
"260" => "Declined with further Instructions Available (see response text)",
|
63
|
+
"261" => "Declined - Stop All Recurring Payments",
|
64
|
+
"262" => "Declined - Stop this Recurring Program",
|
65
|
+
"263" => "Declined - Update Cardholder Data Available",
|
66
|
+
"264" => "Declined - Retry in a few days",
|
67
|
+
"300" => "Transaction was Rejected by Gateway",
|
68
|
+
"400" => "Transaction Error Returned by Processor",
|
69
|
+
"410" => "Invalid Merchant Configuration",
|
70
|
+
"411" => "Merchant Account is Inactive",
|
71
|
+
"420" => "Communication Error",
|
72
|
+
"421" => "Communication Error with Issuer",
|
73
|
+
"430" => "Duplicate Transaction at Processor",
|
74
|
+
"440" => "Processor Format Error",
|
75
|
+
"441" => "Invalid Transaction Information",
|
76
|
+
"460" => "Processor Feature not Available",
|
77
|
+
"461" => "Unsupported Card Type"
|
78
|
+
}
|
79
|
+
|
80
|
+
class << self
|
81
|
+
def build_from_string(response_string)
|
82
|
+
params = response_string.split("&").inject({}) do |hash, string_pair|
|
83
|
+
key, val = string_pair.split("=")
|
84
|
+
hash.merge(key.to_sym => val)
|
85
|
+
end
|
86
|
+
|
87
|
+
self.new(params)
|
88
|
+
end
|
89
|
+
end
|
90
|
+
|
91
|
+
attr_reader :transaction_id, :message, :response_code
|
92
|
+
|
93
|
+
def initialize(params)
|
94
|
+
@response = params[:response]
|
95
|
+
@transaction_id = params[:transactionid]
|
96
|
+
@response_code = params[:response_code]
|
97
|
+
@message = params[:responsetext]
|
98
|
+
end
|
99
|
+
|
100
|
+
def approved?
|
101
|
+
@response == RESPONSE[:approved]
|
102
|
+
end
|
103
|
+
|
104
|
+
def declined?
|
105
|
+
@response == RESPONSE[:declined]
|
106
|
+
end
|
107
|
+
|
108
|
+
def has_errors?
|
109
|
+
@response == RESPONSE[:errors]
|
110
|
+
end
|
111
|
+
|
112
|
+
def response_code_message
|
113
|
+
RESPONSE_CODE_MESSAGES[@response_code] || DEFAULT_MESSAGE
|
114
|
+
end
|
115
|
+
end
|
116
|
+
end
|
117
|
+
|
data/test/helper.rb
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'bundler'
|
3
|
+
begin
|
4
|
+
Bundler.setup(:default, :development)
|
5
|
+
rescue Bundler::BundlerError => e
|
6
|
+
$stderr.puts e.message
|
7
|
+
$stderr.puts "Run `bundle install` to install missing gems"
|
8
|
+
exit e.status_code
|
9
|
+
end
|
10
|
+
require 'test/unit'
|
11
|
+
require 'shoulda'
|
12
|
+
|
13
|
+
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
14
|
+
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
15
|
+
require 'tiger-payment'
|
16
|
+
|
17
|
+
class Test::Unit::TestCase
|
18
|
+
end
|
Binary file
|
@@ -0,0 +1,66 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = %q{tiger-payment}
|
8
|
+
s.version = "0.0.1"
|
9
|
+
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
+
s.authors = ["Garrett Lancaster"]
|
12
|
+
s.date = %q{2011-07-04}
|
13
|
+
s.email = %q{glancast@garrettlancaster.com}
|
14
|
+
s.extra_rdoc_files = [
|
15
|
+
"LICENSE.txt",
|
16
|
+
"README.rdoc"
|
17
|
+
]
|
18
|
+
s.files = [
|
19
|
+
".document",
|
20
|
+
"Gemfile",
|
21
|
+
"Gemfile.lock",
|
22
|
+
"LICENSE.txt",
|
23
|
+
"README.rdoc",
|
24
|
+
"Rakefile",
|
25
|
+
"VERSION",
|
26
|
+
"lib/tiger-payment.rb",
|
27
|
+
"lib/tiger-payment/configuration.rb",
|
28
|
+
"lib/tiger-payment/gateway.rb",
|
29
|
+
"lib/tiger-payment/response.rb",
|
30
|
+
"test/helper.rb",
|
31
|
+
"test/test_tiger-payment.rb",
|
32
|
+
"tiger-payment-0.0.0.gem",
|
33
|
+
"tiger-payment.gemspec"
|
34
|
+
]
|
35
|
+
s.homepage = %q{http://github.com/garrettlancaster/tiger-payment}
|
36
|
+
s.licenses = ["MIT"]
|
37
|
+
s.require_paths = ["lib"]
|
38
|
+
s.rubygems_version = %q{1.3.7}
|
39
|
+
s.summary = %q{Simple integration with Tiger Payment Solutions direct-post API}
|
40
|
+
|
41
|
+
if s.respond_to? :specification_version then
|
42
|
+
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
43
|
+
s.specification_version = 3
|
44
|
+
|
45
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
46
|
+
s.add_runtime_dependency(%q<rest-client>, ["= 1.0.4"])
|
47
|
+
s.add_development_dependency(%q<shoulda>, [">= 0"])
|
48
|
+
s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
|
49
|
+
s.add_development_dependency(%q<jeweler>, ["~> 1.6.2"])
|
50
|
+
s.add_development_dependency(%q<rcov>, [">= 0"])
|
51
|
+
else
|
52
|
+
s.add_dependency(%q<rest-client>, ["= 1.0.4"])
|
53
|
+
s.add_dependency(%q<shoulda>, [">= 0"])
|
54
|
+
s.add_dependency(%q<bundler>, ["~> 1.0.0"])
|
55
|
+
s.add_dependency(%q<jeweler>, ["~> 1.6.2"])
|
56
|
+
s.add_dependency(%q<rcov>, [">= 0"])
|
57
|
+
end
|
58
|
+
else
|
59
|
+
s.add_dependency(%q<rest-client>, ["= 1.0.4"])
|
60
|
+
s.add_dependency(%q<shoulda>, [">= 0"])
|
61
|
+
s.add_dependency(%q<bundler>, ["~> 1.0.0"])
|
62
|
+
s.add_dependency(%q<jeweler>, ["~> 1.6.2"])
|
63
|
+
s.add_dependency(%q<rcov>, [">= 0"])
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
metadata
ADDED
@@ -0,0 +1,149 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: tiger-payment
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
prerelease: false
|
5
|
+
segments:
|
6
|
+
- 0
|
7
|
+
- 0
|
8
|
+
- 1
|
9
|
+
version: 0.0.1
|
10
|
+
platform: ruby
|
11
|
+
authors:
|
12
|
+
- Garrett Lancaster
|
13
|
+
autorequire:
|
14
|
+
bindir: bin
|
15
|
+
cert_chain: []
|
16
|
+
|
17
|
+
date: 2011-07-04 00:00:00 -05:00
|
18
|
+
default_executable:
|
19
|
+
dependencies:
|
20
|
+
- !ruby/object:Gem::Dependency
|
21
|
+
name: rest-client
|
22
|
+
prerelease: false
|
23
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
24
|
+
none: false
|
25
|
+
requirements:
|
26
|
+
- - "="
|
27
|
+
- !ruby/object:Gem::Version
|
28
|
+
segments:
|
29
|
+
- 1
|
30
|
+
- 0
|
31
|
+
- 4
|
32
|
+
version: 1.0.4
|
33
|
+
type: :runtime
|
34
|
+
version_requirements: *id001
|
35
|
+
- !ruby/object:Gem::Dependency
|
36
|
+
name: shoulda
|
37
|
+
prerelease: false
|
38
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
39
|
+
none: false
|
40
|
+
requirements:
|
41
|
+
- - ">="
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
segments:
|
44
|
+
- 0
|
45
|
+
version: "0"
|
46
|
+
type: :development
|
47
|
+
version_requirements: *id002
|
48
|
+
- !ruby/object:Gem::Dependency
|
49
|
+
name: bundler
|
50
|
+
prerelease: false
|
51
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
52
|
+
none: false
|
53
|
+
requirements:
|
54
|
+
- - ~>
|
55
|
+
- !ruby/object:Gem::Version
|
56
|
+
segments:
|
57
|
+
- 1
|
58
|
+
- 0
|
59
|
+
- 0
|
60
|
+
version: 1.0.0
|
61
|
+
type: :development
|
62
|
+
version_requirements: *id003
|
63
|
+
- !ruby/object:Gem::Dependency
|
64
|
+
name: jeweler
|
65
|
+
prerelease: false
|
66
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
67
|
+
none: false
|
68
|
+
requirements:
|
69
|
+
- - ~>
|
70
|
+
- !ruby/object:Gem::Version
|
71
|
+
segments:
|
72
|
+
- 1
|
73
|
+
- 6
|
74
|
+
- 2
|
75
|
+
version: 1.6.2
|
76
|
+
type: :development
|
77
|
+
version_requirements: *id004
|
78
|
+
- !ruby/object:Gem::Dependency
|
79
|
+
name: rcov
|
80
|
+
prerelease: false
|
81
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
82
|
+
none: false
|
83
|
+
requirements:
|
84
|
+
- - ">="
|
85
|
+
- !ruby/object:Gem::Version
|
86
|
+
segments:
|
87
|
+
- 0
|
88
|
+
version: "0"
|
89
|
+
type: :development
|
90
|
+
version_requirements: *id005
|
91
|
+
description:
|
92
|
+
email: glancast@garrettlancaster.com
|
93
|
+
executables: []
|
94
|
+
|
95
|
+
extensions: []
|
96
|
+
|
97
|
+
extra_rdoc_files:
|
98
|
+
- LICENSE.txt
|
99
|
+
- README.rdoc
|
100
|
+
files:
|
101
|
+
- .document
|
102
|
+
- Gemfile
|
103
|
+
- Gemfile.lock
|
104
|
+
- LICENSE.txt
|
105
|
+
- README.rdoc
|
106
|
+
- Rakefile
|
107
|
+
- VERSION
|
108
|
+
- lib/tiger-payment.rb
|
109
|
+
- lib/tiger-payment/configuration.rb
|
110
|
+
- lib/tiger-payment/gateway.rb
|
111
|
+
- lib/tiger-payment/response.rb
|
112
|
+
- test/helper.rb
|
113
|
+
- test/test_tiger-payment.rb
|
114
|
+
- tiger-payment-0.0.0.gem
|
115
|
+
- tiger-payment.gemspec
|
116
|
+
has_rdoc: true
|
117
|
+
homepage: http://github.com/garrettlancaster/tiger-payment
|
118
|
+
licenses:
|
119
|
+
- MIT
|
120
|
+
post_install_message:
|
121
|
+
rdoc_options: []
|
122
|
+
|
123
|
+
require_paths:
|
124
|
+
- lib
|
125
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
126
|
+
none: false
|
127
|
+
requirements:
|
128
|
+
- - ">="
|
129
|
+
- !ruby/object:Gem::Version
|
130
|
+
segments:
|
131
|
+
- 0
|
132
|
+
version: "0"
|
133
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
134
|
+
none: false
|
135
|
+
requirements:
|
136
|
+
- - ">="
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
segments:
|
139
|
+
- 0
|
140
|
+
version: "0"
|
141
|
+
requirements: []
|
142
|
+
|
143
|
+
rubyforge_project:
|
144
|
+
rubygems_version: 1.3.7
|
145
|
+
signing_key:
|
146
|
+
specification_version: 3
|
147
|
+
summary: Simple integration with Tiger Payment Solutions direct-post API
|
148
|
+
test_files: []
|
149
|
+
|