Browse files

added readme and potential licence (pending acceptance by original au…

…thor
  • Loading branch information...
1 parent a6bf6d5 commit bb961b11dd5081420a37c1b8057fecf7984a8404 Dirk Kelly committed Oct 14, 2011
Showing with 68 additions and 27 deletions.
  1. +19 −0 LICENCE
  2. +49 −1 README.md
  3. +0 −26 activemerchant-anz.gemspec
View
19 LICENCE
@@ -0,0 +1,19 @@
+Copyright (C) 2009 by Anuj Luthra
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
View
50 README.md
@@ -1,8 +1,48 @@
# Anz eGate
+Provides an ActiveMerchant gateway to interface with ANZ's eGate.
+
## Usage
+This is now available as a gem, as long as you have it in your Gemfile you can use bundler.
+
+Gemfile
+
+ source :rubygems
+
+ gem 'activemerchant-anz-gateway'
+
+Basic Usage
+
+ require 'bundler'
+ Bundler.require
+
+ # Your merchant must have operators, to test prefix your merchant name with TEST
+ gateway = ActiveMerchant::Billing::AnzGateway.new(
+ :merchant_id => 'TESTANZMURCONREG',
+ :access_code => '31C43EF3'
+ )
+
+ # ANZ only require the card number, month and year
+ card = ActiveMerchant::Billing::CreditCard.new(
+ :number => '5123456789012346',
+ :month => 5,
+ :year => 2013
+ )
+ params = {
+ :order_id => 'X123F',
+ :invoice => '10001'
+ }
+
+ # $10 puchase
+ result = gateway.purchase(1000, card, params)
+
+Other Features
+
+There are features for refuding/crediting and querying past records, however these are missing tests and I can't vouch for them.
+
+You can manage your anz merchant account over at https://migs.mastercard.com.au/ma
## Testing
@@ -11,4 +51,12 @@ Anz seem to have removed their public testing profile, I've instead set the fixt
export ANZ_MERCHANT=TESTyoumerchantname
export ANZ_CODE=youroperatorcode
-To set up your testing environment you will need to log in as the _Administrator_ using your merchantid prefixed by test. The password will be the same as your production account.
+To set up your testing environment you will need to log in as the _Administrator_ using your merchantid prefixed by test. The password will be the same as your production account.
+
+## Acknowledgements
+
+I had pretty much nothing to do with this library, I just made it into a gem and check on the tests. This is a fork of [Anuj Luthra's](https://github.com/anujluthra) [fantastic work](https://github.com/anujluthra/activemerchant-anz-gateway).
+
+# LICENCE
+
+Licenced under MIT Copyright 2009 by Anuj Luthra, for details see LICENCE
View
26 activemerchant-anz.gemspec
@@ -1,26 +0,0 @@
-require File.expand_path("../lib/active_merchant-anz/version", __FILE__)
-
-Gem::Specification.new do |s|
- s.platform = Gem::Platform::RUBY
- s.name = "activemerchant-anz-gateway"
- s.version = ActiveMerchant::Anz::VERSION
- s.authors = ["Anuj Luthra", "Dirk Kelly"]
- s.email = ["anuj.luthra@gmail.com", "dk@dirkkelly.com"]
- s.homepage = ""
- s.summary = %q{Gateway for ANZ and ActiveMerchant}
- s.description = %q{Provides an interface to ANZ for the Activemerchant library, fork of github@anujluthra's work}
-
- s.rubyforge_project = "activemerchant-anz-gateway"
-
- s.files = `git ls-files`.split("\n")
- s.test_files = `git ls-files -- {spec,features}/*`.split("\n")
- s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
- s.require_paths = ["lib"]
-
- # specify any dependencies here; for example:
- s.add_development_dependency "test-unit"
- s.add_development_dependency "mocha"
-
- s.add_runtime_dependency "activemerchant"
- s.add_runtime_dependency "activesupport"
-end

0 comments on commit bb961b1

Please sign in to comment.