Discussion:
[Stripes-users] Stripes and Paypal IPN
Heather and Jon Turgeon
2017-05-25 07:17:43 UTC
Permalink
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
Nestor Hernandez
2017-05-25 14:10:15 UTC
Permalink
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 <
Post by Heather and Jon Turgeon
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
_______________________________________________
Stripes-users mailing list
https://lists.sourceforge.net/lists/listinfo/stripes-users
Janne Jalkanen
2017-05-28 13:15:01 UTC
Permalink
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
Loading...