lib/active_merchant/billing/gateways/card_stream.rb in activemerchant-1.4.0 vs lib/active_merchant/billing/gateways/card_stream.rb in activemerchant-1.4.1
- old
+ new
@@ -16,12 +16,11 @@
# * Visa Credit
# * Visa Debit
# * Visa Purchasing
#
class CardStreamGateway < Gateway
- TEST_URL = 'https://www.cardstream.com/merchantsecure/Cardstream/VPDirect.cfm'
- LIVE_URL = 'https://www.cardstream.com/merchantsecure/Cardstream/VPDirect.cfm'
+ URL = 'https://gateway.cardstream.com/process.ashx'
self.money_format = :cents
self.default_currency = 'GBP'
self.supported_countries = ['GB']
self.supported_cardtypes = [:visa, :master, :american_express, :diners_club, :discover, :jcb, :maestro, :solo, :switch]
@@ -161,10 +160,10 @@
def format_issue_number(credit_card)
card_brand(credit_card).to_s == 'solo' ? format(credit_card.issue_number, :two_digits) : credit_card.issue_number
end
def commit(action, parameters)
- response = parse( ssl_post(test? ? TEST_URL : LIVE_URL, post_data(action, parameters)) )
+ response = parse( ssl_post(URL, post_data(action, parameters)) )
Response.new(response[:response_code] == APPROVED, message_from(response), response,
:test => test?,
:authorization => response[:cross_reference],
:cvv_result => CVV_CODE[ response[:avscv2_response_code].to_s[0, 1] ],