abtain_billing 1.02 → 1.03

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.
data/README CHANGED
@@ -1,3 +1,24 @@
1
- This project is based on active merchant and patches found on the web that haven't been included in head.
1
+ Abtain Billing
2
+ Payment Framework focused on Authorize.net CIM for dealing with stored credit card transactions.
2
3
 
3
- Pulled in copy of Active Merchant based on git commit a3d18bd755595ba78b897237a116bafc464bed55
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
@@ -7,7 +7,7 @@ require 'rake/contrib/rubyforgepublisher'
7
7
  require File.join(File.dirname(__FILE__), 'lib', 'support', 'gateway_support')
8
8
 
9
9
 
10
- PKG_VERSION = "1.02"
10
+ PKG_VERSION = "1.03"
11
11
  PKG_NAME = "abtain_billing"
12
12
  PKG_FILE_NAME = "#{PKG_NAME}-#{PKG_VERSION}"
13
13
 
@@ -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.02"
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-05 00:00:00 -06:00
12
+ date: 2009-11-06 00:00:00 -06:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency