Permalink
Browse files

various bits and bobs

  • Loading branch information...
1 parent 4f4f78f commit 26b70696039f364a2909b16b410c422ebae0d17d @adamcooke committed Jun 19, 2009
Showing with 7 additions and 2 deletions.
  1. +2 −0 init.rb
  2. +0 −1 lib/realex.rb
  3. +4 −0 lib/realex/base.rb
  4. +1 −1 lib/realex/payer.rb
View
@@ -0,0 +1,2 @@
+require 'realex'
+
View
@@ -6,7 +6,6 @@
require 'builder'
require 'xmlsimple'
-require File.dirname(__FILE__) + '/realex/config'
require File.dirname(__FILE__) + "/realex/base"
require File.dirname(__FILE__) + "/realex/payer"
require File.dirname(__FILE__) + "/realex/card"
View
@@ -3,6 +3,10 @@ class Base
attr_accessor :merchantid, :orderid, :amount, :currency, :payerref
+ def merchantid
+ @merchantid || REALEX_MERCHANT_ID
+ end
+
def orderid
@orderid || "order#{timestamp}"
end
View
@@ -21,7 +21,7 @@ def xml(method = 'new')
xml.orderid self.orderid
xml.payer(:type => 'Business', :ref => self.payerref) do
xml.firstname self.firstname
- xml.lastname self.lastname
+ xml.surname self.lastname
xml.company self.company
end
end

0 comments on commit 26b7069

Please sign in to comment.