lib/active_merchant/billing/gateways/webpay.rb in activemerchant-1.35.1 vs lib/active_merchant/billing/gateways/webpay.rb in activemerchant-1.36.0

- old
+ new

@@ -19,21 +19,25 @@ def capture(money, credit_card, options = {}) raise NotImplementedError.new end + def refund_fee(identification, options, meta) + raise NotImplementedError.new + end + def json_error(raw_response) msg = 'Invalid response received from the WebPay API. Please contact support@webpay.jp if you continue to receive this message.' msg += " (The raw response returned by the API was #{raw_response.inspect})" { "error" => { "message" => msg } } end - def headers(meta={}) + def headers(options = {}) @@ua ||= JSON.dump({ :bindings_version => ActiveMerchant::VERSION, :lang => 'ruby', :lang_version => "#{RUBY_VERSION} p#{RUBY_PATCHLEVEL} (#{RUBY_RELEASE_DATE})", :platform => RUBY_PLATFORM, @@ -43,10 +47,10 @@ { "Authorization" => "Basic " + Base64.encode64(@api_key.to_s + ":").strip, "User-Agent" => "Webpay/v1 ActiveMerchantBindings/#{ActiveMerchant::VERSION}", "X-Webpay-Client-User-Agent" => @@ua, - "X-Webpay-Client-User-Metadata" => meta.to_json + "X-Webpay-Client-User-Metadata" => options[:meta].to_json } end end end end