I haven't done a MassPay integration, but I did go through the
DoDirectPayment one. If you look in the PayPal wsdl it referrs to the
MassPayRequestType, MassPayItem, and MassPayResponseType.
https://www.paypal.com/IntegrationCenter/ic_api-reference.html
For Ruby, you can download the xml and xsd files and use soap4r to
generate related ruby classes. From those classes you can figure out
what the message really needs to look like. It takes a bit of
research to figure out that a MassPayRequest contains a
MassPayRequestType, and the MassPayRequestType has to have one or more
MassPayRequestItemType's (but not more than 250).
Once you get that bit sorted out, you can just create the client,
create a tree of Ruby classes that are all related, and send it off to
PayPal. They should send you back a response for each request. One
interesting gotcha: A single request must include items that are of
the same currency.
Be sure to use a recent snapshot of soap4r and http-access2. Also, be
sure to _install_ them in your ruby install directory, not just drop
to them in the /vendor
<shamelessplug>
For an example of how to go through the process for DoExpressPayment,
you can check out my Friday at
http://pragmaticprogrammer.com/titles/jfpaypal/index.html
</shamelessplug>
The other route would be to figure out how to create the XML yourself
and just do it. This would reduce your dependancies on other
libraries. The ActiveMerchant integration for PayPal does this
approach with DoExpressPayment, and it makes for a more simple
solution.
http://home.leetsoft.com/am
To get the actual XML that is sent/received, you might try using the
Java or PHP libraries.
Let us know what you find,
Joe