# PayPal WSDL API on Rails anyone?

**URL:** <https://www.ruby-forum.com/t/paypal-wsdl-api-on-rails-anyone/69847>\
**Category:** Rails\
**Created:** [February 17, 2006, 9:14pm UTC](https://www.ruby-forum.com/t/paypal-wsdl-api-on-rails-anyone/69847 "2006-02-17T21:14:57Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Francois\_B](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/53a042/32.png) [@Francois\_B](https://www.ruby-forum.com/u/Francois_B)\
**Post date:** [February 17, 2006, 9:14pm UTC](https://www.ruby-forum.com/t/paypal-wsdl-api-on-rails-anyone/69847/1 "2006-02-17T21:14:57Z")

</div>

Hi !

Has anyone connected to the Mass Pay API of PayPal using Rails ? I  
need to do this for a customer, and I wanted to know how easy/hard it  
was. I have no experience using SOAP, WSDL, etc.

I saw soap4r[1] on the RAA[2]. This is probably what I’ll need to  
use. One question I haven’t answered yet is whether soap4r will  
accept PayPal’s certificates ?

Thanks for any information on this topic.

## Have a nice day !

FranÃ§ois Beausoleil  
[http://blog.teksol.info/](http://blog.teksol.info/)

[1] [http://raa.ruby-lang.org/project/soap4r/](http://raa.ruby-lang.org/project/soap4r/)  
[2] Ruby Application Archive: [http://raa.ruby-lang.org/](http://raa.ruby-lang.org/)

---

<div class="post-metadata">

**Author:** ![Francois\_B](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/53a042/32.png) [@Francois\_B](https://www.ruby-forum.com/u/Francois_B)\
**Post date:** [December 12, 2006, 9:49pm UTC](https://www.ruby-forum.com/t/paypal-wsdl-api-on-rails-anyone/69847/2 "2006-12-12T21:49:02Z")

</div>

Francois B. wrote:

> Hi !
> 
> Has anyone connected to the Mass Pay API of PayPal using Rails ? I  
> need to do this for a customer, and I wanted to know how easy/hard it  
> was. I have no experience using SOAP, WSDL, etc.
> 
> I saw soap4r[1] on the RAA[2]. This is probably what I’ll need to  
> use. One question I haven’t answered yet is whether soap4r will  
> accept PayPal’s certificates ?
> 
> Thanks for any information on this topic.
> 
> ## Have a nice day !
> 
> FranÃ§ois Beausoleil  
> [http://blog.teksol.info/](http://blog.teksol.info/)
> 
> [1] [http://raa.ruby-lang.org/project/soap4r/](http://raa.ruby-lang.org/project/soap4r/)  
> [2] Ruby Application Archive: [http://raa.ruby-lang.org/](http://raa.ruby-lang.org/)  
> This is exactly what I’m trying to do. I’m trying to make it so my  
> Rails program will automatically send money to certain users, without me  
> having to manually enter anything.

---

<div class="post-metadata">

**Author:** ![Francois\_B](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/53a042/32.png) [@Francois\_B](https://www.ruby-forum.com/u/Francois_B)\
**Post date:** [December 14, 2006, 4:29pm UTC](https://www.ruby-forum.com/t/paypal-wsdl-api-on-rails-anyone/69847/3 "2006-12-14T16:29:59Z")

</div>

Have you guys had any success? I have my hands full right this  
minute, but I can put together an example next week, if that would  
help.  
Joe

On 12/12/06, Joe P. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> > accept PayPal’s certificates ?  
> > This is exactly what I’m trying to do. I’m trying to make it so my  
> > Rails program will automatically send money to certain users, without me  
> > having to manually enter anything.
> 
> –  
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).
> 
> >

–  
“For a new software system, the requirements will not be completely  
known until after the users have used it.” Humphrey’s Requirements  
Uncertainty Principle.

---

<div class="post-metadata">

**Author:** ![Francois\_B](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/53a042/32.png) [@Francois\_B](https://www.ruby-forum.com/u/Francois_B)\
**Post date:** [December 15, 2006, 2:26pm UTC](https://www.ruby-forum.com/t/paypal-wsdl-api-on-rails-anyone/69847/4 "2006-12-15T14:26:44Z")

</div>

Joe,

Well, I have an example, but it doesn’t work.

I’m putting my notes at  
[http://www.bodkinconsulting.com/wiki/index.php?title=MassPay#Mass\_Pay\_-\_The\_PayPal\_Bulk\_Payments\_Tool](http://www.bodkinconsulting.com/wiki/index.php?title=MassPay#Mass_Pay_-_The_PayPal_Bulk_Payments_Tool)

Can you look at this and tell me why this generates NO request xml?

Thanks,  
Joe

def send\_masspay  
massPayReq = MassPayReq.new  
massPayRequest = MassPayRequestType.new  
massPayReq = massPayRequest  
massPayRequest.version = “2.0”

```
  massPayItems = []
  massPayRequest.massPayItem = massPayItems
  massPayItems[0] = MassPayRequestItemType.new
  massPayItems[0].receiverEmail=params[:receiverEmail1]
  massPayItems[0].amount = AmountType.new(params[:amount1] )
  massPayItems[0].amount.xmlattr_currencyID = 'USD'
  massPayItems[0].note = params[:note1]

  massPayItems[1] = MassPayRequestItemType.new
  massPayItems[1].receiverEmail=params[:receiverEmail2]
  massPayItems[1].amount = AmountType.new(params[:amount2] )
  massPayItems[1].amount.xmlattr_currencyID = 'USD'
  massPayItems[1].note = params[:note2]

  paypalClient = PayPalHttpClient.new.client_setup
  @resp = paypalClient.massPay(massPayReq)

```

end

On 12/14/06, Joe P. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> –  
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).
> 
> >

–  
“For a new software system, the requirements will not be completely  
known until after the users have used it.” Humphrey’s Requirements  
Uncertainty Principle.

---

<div class="post-metadata">

**Author:** ![Francois\_B](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/f/53a042/32.png) [@Francois\_B](https://www.ruby-forum.com/u/Francois_B)\
**Post date:** [December 14, 2006, 4:55pm UTC](https://www.ruby-forum.com/t/paypal-wsdl-api-on-rails-anyone/69847/5 "2006-12-14T16:55:28Z")

</div>

Bothari wrote:

> Have you guys had any success? I have my hands full right this  
> minute, but I can put together an example next week, if that would  
> help.  
> Joe

I’ve had limited success. If you posted an example, that would help out  
a lot.
