permalink

Mass Payment - Paypal

When trying to figure out how to send multiple payments to different Paypal users, I stumbled into the Mass Payment feature.

This feature allows to send multiple payments in one call but more importantly is that the only charge %2 of the payment cap at $1 USD. Also you can send the payments in multiple currencies.

After digging around the web there wasn’t any post about how to make use of this feature using Ruby… that is after diving deep into ActiveMerchant’s documentation that I found the following:

gateway.transfer 1000, 'bob@example.com',    :subject => "The money I owe you", :note => "Sorry it's so late"
  gateway.transfer [1000, 'fred@example.com'],    [2450, 'wilma@example.com', :note => 'You will receive another payment on 3/24'],    [2000, 'barney@example.com'],    :subject => "Your Earnings", :note => "Thanks for your business."

You gotta love ruby! and thanks ActiveMerchant



blog comments powered by Disqus