abtain_billing 1.02 → 1.03
Sign up to get free protection for your applications and to get access to all the features.
- data/README +23 -2
- data/Rakefile +1 -1
- data/lib/abtain_billing/billing/credit_card_methods.rb +12 -0
- metadata +2 -2
data/README
CHANGED
@@ -1,3 +1,24 @@
|
|
1
|
-
|
1
|
+
Abtain Billing
|
2
|
+
Payment Framework focused on Authorize.net CIM for dealing with stored credit card transactions.
|
2
3
|
|
3
|
-
|
4
|
+
To install make sure you have gemcutter setup:
|
5
|
+
|
6
|
+
1. Install the latest Rubygems >= 1.3.3
|
7
|
+
$ gem update --system
|
8
|
+
Install the Gemcutter gem
|
9
|
+
$ gem install gemcutter
|
10
|
+
Use the built-in command to make gemcutter.org your primary gem source
|
11
|
+
$ gem tumble
|
12
|
+
|
13
|
+
To install the gem
|
14
|
+
$ gem install abtain_billing
|
15
|
+
get an authorize.net developer account, be sure to select CIM as the method you are testing
|
16
|
+
http://developer.authorize.net/testaccount/
|
17
|
+
|
18
|
+
Run the sample code in example/process.rb you will need to update this file with your login and
|
19
|
+
password for your authorize.net CIM developer account.
|
20
|
+
$ ruby examples/process.rb
|
21
|
+
|
22
|
+
|
23
|
+
|
24
|
+
This project is based on active merchant and patches found on the web.
|
data/Rakefile
CHANGED
@@ -16,6 +16,8 @@ module AbtainBilling #:nodoc:
|
|
16
16
|
'forbrugsforeningen' => /^600722\d{10}$/,
|
17
17
|
'laser' => /^(6304|6706|6771|6709)\d{8}(\d{4}|\d{6,7})?$/
|
18
18
|
}
|
19
|
+
|
20
|
+
TEST_NUMBERS = %w[378282246310005 371449635398431 378734493671000 30569309025904 38520000023237 6011111111111117 6011000990]
|
19
21
|
|
20
22
|
def self.included(base)
|
21
23
|
base.extend(ClassMethods)
|
@@ -59,6 +61,16 @@ module AbtainBilling #:nodoc:
|
|
59
61
|
CARD_COMPANIES
|
60
62
|
end
|
61
63
|
|
64
|
+
# List of credit card numbers used for testing
|
65
|
+
def test_numbers
|
66
|
+
TEST_NUMBERS
|
67
|
+
end
|
68
|
+
|
69
|
+
# Returns true if the credit card matches one of our known test numbers
|
70
|
+
def is_test_number?(number)
|
71
|
+
test_numbers.include?(number)
|
72
|
+
end
|
73
|
+
|
62
74
|
# Returns a string containing the type of card from the list of known information below.
|
63
75
|
# Need to check the cards in a particular order, as there is some overlap of the allowable ranges
|
64
76
|
#--
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: abtain_billing
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: "1.
|
4
|
+
version: "1.03"
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dan Quellhorst
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-11-
|
12
|
+
date: 2009-11-06 00:00:00 -06:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|