lib/active_merchant/billing/gateways/paypal_express.rb in activemerchant-1.0.0 vs lib/active_merchant/billing/gateways/paypal_express.rb in activemerchant-1.0.1
- old
+ new
@@ -46,24 +46,24 @@
end
private
def build_get_details_request(token)
xml = Builder::XmlMarkup.new :indent => 2
- xml.tag! 'GetExpressCheckoutDetailsReq', 'xmlns' => 'urn:ebay:api:PayPalAPI' do
- xml.tag! 'GetExpressCheckoutDetailsRequest', 'xmlns:n2' => 'urn:ebay:apis:eBLBaseComponents' do
+ xml.tag! 'GetExpressCheckoutDetailsReq', 'xmlns' => PAYPAL_NAMESPACE do
+ xml.tag! 'GetExpressCheckoutDetailsRequest', 'xmlns:n2' => EBAY_NAMESPACE do
xml.tag! 'n2:Version', '2.0'
xml.tag! 'Token', token
end
end
xml.target!
end
def build_sale_or_authorization_request(action, money, options)
xml = Builder::XmlMarkup.new :indent => 2
- xml.tag! 'DoExpressCheckoutPaymentReq', 'xmlns' => 'urn:ebay:api:PayPalAPI' do
- xml.tag! 'DoExpressCheckoutPaymentRequest', 'xmlns:n2' => 'urn:ebay:apis:eBLBaseComponents' do
+ xml.tag! 'DoExpressCheckoutPaymentReq', 'xmlns' => PAYPAL_NAMESPACE do
+ xml.tag! 'DoExpressCheckoutPaymentRequest', 'xmlns:n2' => EBAY_NAMESPACE do
xml.tag! 'n2:Version', '2.0'
xml.tag! 'n2:DoExpressCheckoutPaymentRequestDetails' do
xml.tag! 'n2:PaymentAction', action
xml.tag! 'n2:Token', options[:token]
xml.tag! 'n2:PayerID', options[:payer_id]
@@ -78,11 +78,11 @@
xml.target!
end
def build_setup_request(action, money, options)
xml = Builder::XmlMarkup.new :indent => 2
- xml.tag! 'SetExpressCheckoutReq', 'xmlns' => 'urn:ebay:api:PayPalAPI' do
- xml.tag! 'SetExpressCheckoutRequest', 'xmlns:n2' => 'urn:ebay:apis:eBLBaseComponents' do
+ xml.tag! 'SetExpressCheckoutReq', 'xmlns' => PAYPAL_NAMESPACE do
+ xml.tag! 'SetExpressCheckoutRequest', 'xmlns:n2' => EBAY_NAMESPACE do
xml.tag! 'n2:Version', '2.0'
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]