Stripes and Paypal IPN

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Stripes and Paypal IPN

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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users
Reply | Threaded
Open this post in threaded view
|

Re: Stripes and Paypal IPN

Nestor Hernandez
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 <[hidden email]>:

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
[hidden email]
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users
Reply | Threaded
Open this post in threaded view
|

Re: Stripes and Paypal IPN

Janne Jalkanen
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 <[hidden email]> 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 <[hidden email]>:

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
[hidden email]
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
[hidden email]
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
[hidden email]
https://lists.sourceforge.net/lists/listinfo/stripes-users