lib/active_merchant/billing/gateways/webpay.rb in activemerchant-1.40.0 vs lib/active_merchant/billing/gateways/webpay.rb in activemerchant-1.41.0
- old
+ new
@@ -46,11 +46,11 @@
def add_amount(post, money, options)
post[:currency] = (options[:currency] || currency(money)).downcase
post[:amount] = localized_amount(money, post[:currency].upcase)
end
- def add_customer(post, options)
- post[:customer] = options[:customer] if options[:customer] && post[:card].blank?
+ def add_customer(post, creditcard, options)
+ post[:customer] = options[:customer] if options[:customer] && !creditcard.respond_to?(:number)
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})"