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



> On 25 May 2017, at 17:10, Nestor Hernandez <ilu...@gmail.com> wrote:
> 
> 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.
> 
> 2017-05-25 2:17 GMT-05:00 Heather and Jon Turgeon 
> <tashiba40_evergr...@hotmail.com <mailto:tashiba40_evergr...@hotmail.com>>:
> 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
> Stripes-users@lists.sourceforge.net 
> <mailto:Stripes-users@lists.sourceforge.net>
> 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
> Stripes-users@lists.sourceforge.net
> 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
Stripes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/stripes-users

Reply via email to