lib/active_merchant/billing/gateways/payway.rb in activemerchant-1.26.0 vs lib/active_merchant/billing/gateways/payway.rb in activemerchant-1.27.0

- old
+ new

@@ -1,9 +1,9 @@ module ActiveMerchant module Billing class PaywayGateway < Gateway - URL = 'https://ccapi.client.qvalent.com/payway/ccapi' + self.live_url = self.test_url = 'https://ccapi.client.qvalent.com/payway/ccapi' self.supported_countries = [ 'AU' ] self.supported_cardtypes = [ :visa, :master, :diners_club, :american_express, :bankcard ] self.display_name = 'Pay Way' self.homepage_url = 'http://www.payway.com.au' @@ -134,10 +134,11 @@ def store(credit_card, options={}) requires!(options, :billing_id) post = {} add_payment_method(post, credit_card) + add_payment_method(post, options[:billing_id]) commit(:store, post) end def status(options={}) requires!(options, :order_id) @@ -180,10 +181,10 @@ def commit(action, post) add_auth(post) post.merge!('order.type' => TRANSACTIONS[action]) request = post.map { |k, v| "#{k}=#{CGI.escape(v.to_s)}" }.join("&") - response = ssl_post(URL, request) + response = ssl_post(self.live_url, request) params = {} CGI.parse(response).each_pair do |key, value| actual_key = key.split(".").last params[actual_key.underscore.to_sym] = value[0]