removed debugging code, and fixed currency conv for :max_amount
This commit is contained in:
parent
5e271e0fd7
commit
7de4c0e39a
|
@ -345,16 +345,6 @@ module ActiveMerchant #:nodoc:
|
||||||
def commit(action, request)
|
def commit(action, request)
|
||||||
response = parse(action, ssl_post(endpoint_url, build_request(request)))
|
response = parse(action, ssl_post(endpoint_url, build_request(request)))
|
||||||
|
|
||||||
File.open("/tmp/paypal", "a") do |f|
|
|
||||||
f.puts "\n\n\n ************** #{Time.now}\n"
|
|
||||||
f.puts endpoint_url.inspect
|
|
||||||
f.puts "\n\n"
|
|
||||||
f.puts request.to_yaml
|
|
||||||
f.puts "\n\n"
|
|
||||||
f.puts response.to_yaml
|
|
||||||
f.puts "\n\n"
|
|
||||||
end
|
|
||||||
|
|
||||||
build_response(successful?(response), message_from(response), response,
|
build_response(successful?(response), message_from(response), response,
|
||||||
:test => test?,
|
:test => test?,
|
||||||
:authorization => authorization_from(response),
|
:authorization => authorization_from(response),
|
||||||
|
|
|
@ -80,7 +80,7 @@ module ActiveMerchant #:nodoc:
|
||||||
xml.tag! 'n2:Version', API_VERSION
|
xml.tag! 'n2:Version', API_VERSION
|
||||||
xml.tag! 'n2:SetExpressCheckoutRequestDetails' do
|
xml.tag! 'n2:SetExpressCheckoutRequestDetails' do
|
||||||
if options[:max_amount]
|
if options[:max_amount]
|
||||||
xml.tag! 'n2:MaxAmount', amount(options[:max_amount]), 'currencyID' => options[:currency]
|
xml.tag! 'n2:MaxAmount', amount(options[:max_amount]), 'currencyID' => options[:currency] || currency(options[:max_amount])
|
||||||
end
|
end
|
||||||
xml.tag! 'n2:ReturnURL', options[:return_url]
|
xml.tag! 'n2:ReturnURL', options[:return_url]
|
||||||
xml.tag! 'n2:CancelURL', options[:cancel_return_url]
|
xml.tag! 'n2:CancelURL', options[:cancel_return_url]
|
||||||
|
|
Loading…
Reference in New Issue