Page 1 of 1

How to capture paypal postback event.

Posted: Thu Oct 16, 2008 11:22 pm
by sashashev
Hi there, I need to call a web service when Paypal posts back a confirmed payment to my ablecommerce site.
i.e when ProcessPayPal.ashx is called.

Can anyone tell me which file I need to look in?

Re: How to capture paypal postback event.

Posted: Fri Oct 17, 2008 3:07 am
by afm
ProcessPayPal.ashx is not a real file. Calls to ProcessPayPal.ashx are handled by a class in the CommerceBuilder assembly (see web.config for the name of the class).

If I were faced with your situation, the first thing I would try is to create by own handler that derives from the CommerceBuilder handler and then override the ProcessRequest method to call the web service and then call base.ProcessRequest.

Re: How to capture paypal postback event.

Posted: Fri Oct 17, 2008 10:57 am
by Logan Rhodehamel
Yes, inherit from CommerceBuilder.Payments.Providers.PayPal.IpnProcessor and override ProcessRequest. In the ProcessRequest method, do your custom calls, then call base.ProcessRequest. Then modify your web.config so that requests to ProcessPayPal.ashx are passed to your custom handler instead of ours.