Shopify/active_merchant — pull request #256 by bombino (2012-01-25 10:02:19+00:00)
Title: Move BillingAgreementDetails to above PaymentDetails in PayPal Express gateway SetExpressCheckout request

We spent a lot of time trying to figure out why the option wasn't working for us when trying to do PayPal Merchant Initiated Billing. Turns out, PayPal needs the to come before the in the XML request sent to PayPal.

All this patch does is rearrange the request to put above

As far as I could tell, there is no documentation to reference from PayPal that stipulates this required order, but this does seem to resolve my problems.

There is no test for the block currently, so I didn't add one.