Looking at our own codebase (which isnât unfortunately public), it seems to be a fairly straightforward POST handler. All you need to do is to parse the IPNMessage out of the request, and you should be fine, and luckily Paypal provides a library to do just that.
Basically we have something like this:
@DefaultHandler
public Resolution receiveEvent()
{
if( !"post".equalsIgnoreCase( getContext().getRequest().getMethod() ) )
{
return new ErrorResolution( HttpServletResponse.SC_METHOD_NOT_ALLOWED );
}
Map<String,String> configMap = new HashMap<String,String>();
configMap.put( "mode", c_mode );
IPNMessage message = new IPNMessage( getContext().getRequest(), configMap );
if(!message.validate()) { âŠhandle error⊠}
return processMessage(message);
}
May you have energy and success!
/Janne
The integration with any payment gateway is not necessary related with a web framework. Furthermore, it is a responsability of the bussiness layer not of the presentation layer (Stripes).
Regards.
Hi all, since I seem to get some great advice from you all I thought I would ask if anyone has setup a Stripes action to handle Paypal IPN? I have started my action but thought I would ask to see if there is a better way. Thanks again.
Jon
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot <http://sdm.link/slashdot>
_______________________________________________
Stripes-users mailing list
https://lists.sourceforge.net/lists/listinfo/stripes-users <https://lists.sourceforge.net/lists/listinfo/stripes-users>
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot_______________________________________________
Stripes-users mailing list
https://lists.sourceforge.net/lists/listinfo/stripes-users