Paypal integration in java

I’ve generated some expresscheckout and paypalfunctions classes via wizard, tried to integrate it to my spring mvc app and make it to communicate with sandbox account. I get a success respond and then the generated function wants to redirect to paypal with this piece of code in expresscheckout class:

  //' Redirect to            

Neveretheless it redirects to something like http://localhost:8080/EC-48480369JN366854F

I’m confused if this is really how it should work or do I have to adjust the code? Is there any decent tutorial, how to integrate it to java projects? All what I’ve found was out of date or for PHP only.


You probably need to be doing this instead:

//' Redirect to
response.sendRedirect(response.encodeRedirectURL("" + nvp.get("TOKEN").toString()));

(Change to if you’re testing on the Sandbox.)

Leave a Reply

Your email address will not be published. Required fields are marked *