lib/active_merchant/billing/gateways/payway.rb in activemerchant-1.86.0 vs lib/active_merchant/billing/gateways/payway.rb in activemerchant-1.87.0
- old
+ new
@@ -148,11 +148,11 @@
def add_payment_method(post, payment_method)
if payment_method.respond_to?(:number)
post['card.cardHolderName'] = "#{payment_method.first_name} #{payment_method.last_name}"
post['card.PAN'] = payment_method.number
post['card.CVN'] = payment_method.verification_value
- post['card.expiryYear'] = payment_method.year.to_s[-2,2]
+ post['card.expiryYear'] = payment_method.year.to_s[-2, 2]
post['card.expiryMonth'] = sprintf('%02d', payment_method.month)
else
post['customer.customerReferenceNumber'] = payment_method
end
end
@@ -175,10 +175,10 @@
end
# Creates the request and returns the summarized result
def commit(action, post)
add_auth(post)
- post.merge!('order.type' => TRANSACTIONS[action])
+ post['order.type'] = TRANSACTIONS[action]
request = post.map { |k, v| "#{k}=#{CGI.escape(v.to_s)}" }.join('&')
response = ssl_post(self.live_url, request)
params = {}