lib/active_merchant/billing/gateways/bogus.rb in activemerchant-1.1.0 vs lib/active_merchant/billing/gateways/bogus.rb in activemerchant-1.2.0
- old
+ new
@@ -1,10 +1,15 @@
module ActiveMerchant #:nodoc:
module Billing #:nodoc:
# Bogus Gateway
class BogusGateway < Gateway
+ self.supported_countries = ['US']
+ self.supported_cardtypes = [:bogus]
+ self.homepage_url = 'http://example.com'
+ self.display_name = 'Bogus'
+
def authorize(money, creditcard, options = {})
case creditcard.number
when '1'
Response.new(true, "Bogus Gateway: Forced success", {:authorized_amount => money.to_s}, :test => true, :authorization => '53433' )
when '2'
@@ -66,15 +71,10 @@
Response.new(false, "Bogus Gateway: Forced failure", {:error => 'Bogus Gateway: Forced failure' },:test => true)
else
raise Error, 'Bogus Gateway: Use trans_id 1 for success, 2 for exception and anything else for error'
end
end
-
- # We support visa and master card
- def self.supported_cardtypes
- [:bogus]
- end
-
+
private
def deal_with_cc(creditcard)
case creditcard.number
when '1'
\ No newline at end of file