removed debugging code, and fixed currency conv for :max_amount

This commit is contained in:
paulcc 2009-07-15 11:33:05 +01:00
parent 5e271e0fd7
commit 7de4c0e39a
2 changed files with 1 additions and 11 deletions

View File

@ -345,16 +345,6 @@ module ActiveMerchant #:nodoc:
def commit(action, 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,
:test => test?,
:authorization => authorization_from(response),

View File

@ -80,7 +80,7 @@ module ActiveMerchant #:nodoc:
xml.tag! 'n2:Version', API_VERSION
xml.tag! 'n2:SetExpressCheckoutRequestDetails' do
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
xml.tag! 'n2:ReturnURL', options[:return_url]
xml.tag! 'n2:CancelURL', options[:cancel_return_url]