lib/active_merchant/billing/gateways/paypal_express.rb in activemerchant-1.0.3 vs lib/active_merchant/billing/gateways/paypal_express.rb in activemerchant-1.1.0
- old
+ new
@@ -48,11 +48,11 @@
private
def build_get_details_request(token)
xml = Builder::XmlMarkup.new :indent => 2
xml.tag! 'GetExpressCheckoutDetailsReq', 'xmlns' => PAYPAL_NAMESPACE do
xml.tag! 'GetExpressCheckoutDetailsRequest', 'xmlns:n2' => EBAY_NAMESPACE do
- xml.tag! 'n2:Version', '2.0'
+ xml.tag! 'n2:Version', API_VERSION
xml.tag! 'Token', token
end
end
xml.target!
@@ -60,11 +60,11 @@
def build_sale_or_authorization_request(action, money, options)
xml = Builder::XmlMarkup.new :indent => 2
xml.tag! 'DoExpressCheckoutPaymentReq', 'xmlns' => PAYPAL_NAMESPACE do
xml.tag! 'DoExpressCheckoutPaymentRequest', 'xmlns:n2' => EBAY_NAMESPACE do
- xml.tag! 'n2:Version', '2.0'
+ xml.tag! 'n2:Version', API_VERSION
xml.tag! 'n2:DoExpressCheckoutPaymentRequestDetails' do
xml.tag! 'n2:PaymentAction', action
xml.tag! 'n2:Token', options[:token]
xml.tag! 'n2:PayerID', options[:payer_id]
xml.tag! 'n2:PaymentDetails' do
@@ -80,10 +80,10 @@
def build_setup_request(action, money, options)
xml = Builder::XmlMarkup.new :indent => 2
xml.tag! 'SetExpressCheckoutReq', 'xmlns' => PAYPAL_NAMESPACE do
xml.tag! 'SetExpressCheckoutRequest', 'xmlns:n2' => EBAY_NAMESPACE do
- xml.tag! 'n2:Version', '2.0'
+ xml.tag! 'n2:Version', API_VERSION
xml.tag! 'n2:SetExpressCheckoutRequestDetails' do
xml.tag! 'n2:PaymentAction', action
xml.tag! 'n2:OrderTotal', amount(money), 'currencyID' => currency(money)
xml.tag! 'n2:MaxAmount', amount(options[:max_amount]), 'currencyID' => currency(options[:max_amount]) if options[:max_amount]
add_address(xml, 'n2:Address', options[:billing_address] || options[:address])