I am using ActiveMerchant to give my rails app access to Paypal\'s Express Checkout. I would like to include the Order Details on the Review Page as described here: https://cms.
@Soleone I try your solution,but don't work for me.
xml.tag! 'n2:OrderDescription', options[:description]
xml.tag! 'n2:Name', options[:name]
xml.tag! 'n2:Description', options[:desc]
xml.tag! 'n2:Amount', options[:amount]
xml.tag! 'n2:Quantity', options[:quantity]
I think the xml structure is not right,the order items is multiple,so should like this
xml.tag! 'n2:OrderItems' do
xml.tag! 'n2:OrderItem' do
xml.tag! 'n2:Name', options[:name]
xml.tag! 'n2:Description', options[:desc]
xml.tag! 'n2:Amount', options[:amount]
xml.tag! 'n2:Quantity', options[:quantity]
end
end
But really I don't know the correct structure,looking for now.
====Update
I found the SOAP api doc, https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_api_soap_r_SetExpressCheckout#id09BHC0QF07Q
xml.tag! 'n2:PaymentDetails' do
xml.tag! 'n2:PaymentDetailsItem' do
xml.tag! 'n2:Name', options[:name]
xml.tag! 'n2:Description', options[:desc]
xml.tag! 'n2:Amount', options[:amount]
xml.tag! 'n2:Quantity', options[:quantity]
end
end
But also doesn't work,who can help?
=====UPDATE====
I tried the method of adding PaymentDetails parameter,but seems still not work,I found the schema of SetExpressCheckoutReq xml, http://www.visualschema.com/vs/paypal/SetExpressCheckoutReq/ , there is no definition of PaymentDetails,who did this stuff before,hope for your help.
======FINAL========
I have fixed this issue,new version of ActiveMerchant support the order details review,and mwagg pushed the patch about this,you guys can use this version https://github.com/mwagg/active_merchant