# Mock objects for stubbing out Paypal - anyone have any?

**URL:** <https://www.ruby-forum.com/t/mock-objects-for-stubbing-out-paypal-anyone-have-any/84474>\
**Category:** Rails\
**Created:** [February 5, 2007, 2:55am UTC](https://www.ruby-forum.com/t/mock-objects-for-stubbing-out-paypal-anyone-have-any/84474 "2007-02-05T02:55:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![greg](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/71c47a/32.png) [@greg](https://www.ruby-forum.com/u/greg)\
**Post date:** [February 5, 2007, 2:55am UTC](https://www.ruby-forum.com/t/mock-objects-for-stubbing-out-paypal-anyone-have-any/84474/1 "2007-02-05T02:55:40Z")

</div>

Hi,

Just wondering if anyone has already developed a mocking approach to  
stub  
out the Paypal interface so that one can test on an internal PC which  
doesn’t provide a means for PayPal to callback to your webserver? (i.e.  
once the app is deployed to the hosting provider it would then work as  
PayPal could then hit the application with the specified URL).

Anyone already solved this? What would be a good framework/means to  
stub it  
out?

Tks  
Greg

---

<div class="post-metadata">

**Author:** ![greg](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/71c47a/32.png) [@greg](https://www.ruby-forum.com/u/greg)\
**Post date:** [February 5, 2007, 10:07pm UTC](https://www.ruby-forum.com/t/mock-objects-for-stubbing-out-paypal-anyone-have-any/84474/2 "2007-02-05T22:07:16Z")

</div>

Though it does not explicitly answer your question you should checkout  
Active Merchant.

[http://home.leetsoft.com/am/](http://home.leetsoft.com/am/)

It has paypal support, but perhaps not exactly how you describe.

Should be a good point of reference anyway.

---

<div class="post-metadata">

**Author:** ![greg](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/71c47a/32.png) [@greg](https://www.ruby-forum.com/u/greg)\
**Post date:** [February 14, 2007, 2:14am UTC](https://www.ruby-forum.com/t/mock-objects-for-stubbing-out-paypal-anyone-have-any/84474/3 "2007-02-14T02:14:19Z")

</div>

This might be worth a look -  
[http://blog.tammersaleh.com/articles/2007/02/13/mocking-a-network-resource-with-camping](http://blog.tammersaleh.com/articles/2007/02/13/mocking-a-network-resource-with-camping)

–  
James.

> **[James Mead](https://jamesmead.org/)**
>
> Ruby Developer, author of Mocha, and ex-Antarctic Hero.
