# Paypal IPN - unable to access breakpoint during POST?

**URL:** <https://www.ruby-forum.com/t/paypal-ipn-unable-to-access-breakpoint-during-post/51969>\
**Category:** Rails\
**Created:** [January 9, 2006, 7:35pm UTC](https://www.ruby-forum.com/t/paypal-ipn-unable-to-access-breakpoint-during-post/51969 "2006-01-09T19:35:26Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![tomtt](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/e47c2d/32.png) [@tomtt](https://www.ruby-forum.com/u/tomtt)\
**Post date:** [January 9, 2006, 7:35pm UTC](https://www.ruby-forum.com/t/paypal-ipn-unable-to-access-breakpoint-during-post/51969/1 "2006-01-09T19:35:26Z")

</div>

Hi all,

I’m trying to debug some code in my paypal instant payment notification  
action.

Why can I not access the breakpoint placed inside the action that paypal  
POSTs to? It just doesn’t find the server, but it works fine when placed  
inside other actions.

I’ve appended the code to the end of this post.

Thanks everyone!

Tom

–

```
def paypal_ipn
	notify = Paypal::Notification.new(request.raw_post)
	breakpoint
	split = notify.item_id.split('-')
	@order = Order.new
	@item = Item.find(split[0])
	@user = User.find(split[1])
	@order.user_id = @user.id
	@order.item_id = @item.id

	if notify.acknowledge
		begin
		if notify.complete? and @item.amount == notify.amount
			@order.status = 'success'

```

# send email

```
		else
			logger.error("Erm. Failed to verify Paypal's notification.")
		end
		rescue => e
			@order.status = 'failed'
			raise
		ensure
			@order.save
		end
	end
	render :nothing
end
```

---

<div class="post-metadata">

**Author:** ![tomtt](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/e47c2d/32.png) [@tomtt](https://www.ruby-forum.com/u/tomtt)\
**Post date:** [January 9, 2006, 11:22pm UTC](https://www.ruby-forum.com/t/paypal-ipn-unable-to-access-breakpoint-during-post/51969/2 "2006-01-09T23:22:45Z")

</div>

Tom T. \<tom@…\> writes:

> Why can I not access the breakpoint placed inside the action that paypal  
> POSTs to? It just doesn’t find the server, but it works fine when placed  
> inside other actions.

silly question i know…but are you sure IPN is calling you back? Do  
you have  
confirmation in the access log of your web server?

-damon

> **[Damon Clinkscales](https://damonc.onuniverse.com/)**
>
> Damon Clinkscales

---

<div class="post-metadata">

**Author:** ![tomtt](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/e47c2d/32.png) [@tomtt](https://www.ruby-forum.com/u/tomtt)\
**Post date:** [January 10, 2006, 12:29am UTC](https://www.ruby-forum.com/t/paypal-ipn-unable-to-access-breakpoint-during-post/51969/3 "2006-01-10T00:29:13Z")

</div>

Damon C. wrote:

> silly question i know…but are you sure IPN is calling you back? Do you have  
> confirmation in the access log of your web server?

Hi Damon,

Yes, I can see it in my development.log. I’m having trouble getting the  
acknowledgement to work, hence the need for the debug.

Thanks,

Tom

---

<div class="post-metadata">

**Author:** ![tomtt](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/e47c2d/32.png) [@tomtt](https://www.ruby-forum.com/u/tomtt)\
**Post date:** [January 10, 2006, 2:29am UTC](https://www.ruby-forum.com/t/paypal-ipn-unable-to-access-breakpoint-during-post/51969/4 "2006-01-10T02:29:30Z")

</div>

Tom T. wrote:

> Yes, I can see it in my development.log. I’m having trouble getting the  
> acknowledgement to work, hence the need for the debug.

Why not try putting a breakpoint above and below the IPN call to see if  
it stops. If it does then you know it is getting called and stopping  
at the breakpoint.

Then you can see what happens when you type ‘exit’ in irb.

-damon

> **[Damon Clinkscales](https://damonc.onuniverse.com/)**
>
> Damon Clinkscales

---

<div class="post-metadata">

**Author:** ![tomtt](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/e47c2d/32.png) [@tomtt](https://www.ruby-forum.com/u/tomtt)\
**Post date:** [January 10, 2006, 7:39pm UTC](https://www.ruby-forum.com/t/paypal-ipn-unable-to-access-breakpoint-during-post/51969/5 "2006-01-10T19:39:30Z")

</div>

Damon C. wrote:

> Why not try putting a breakpoint above and below the IPN call to see if  
> it stops. If it does then you know it is getting called and stopping  
> at the breakpoint.

It doesn’t work above the breakpoint unfortunately.

Thanks again,

Tom

---

<div class="post-metadata">

**Author:** ![tomtt](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/e47c2d/32.png) [@tomtt](https://www.ruby-forum.com/u/tomtt)\
**Post date:** [January 11, 2006, 1:47am UTC](https://www.ruby-forum.com/t/paypal-ipn-unable-to-access-breakpoint-during-post/51969/6 "2006-01-11T01:47:57Z")

</div>

Tom T. wrote:

> It doesn’t work above the breakpoint unfortunately.
> 
> Thanks again,
> 
> Tom

I’m an absolutely monkey. I had paypal\_idn instead paypal\_ipn in the  
form for sending to Paypal. Sorry for wasting your time!

Tom
