Integrating PayPal Adaptive Payments into a Vaadin app?

For a while now I have been trying to work out how to use PayPal Embedded Payment within a Vaadin application.

The embedded approach is supposed to allow payments to be made without (apparently) leaving the app, to improve the flow of things. I really don’t want to have to kick users out to another tab or window.

Here is (what seems to me to be) a reasonable explanation and example:

On the face of things it seems like a perfect fit: an interactive payment technique for an interactive application platform.

My problems are all to do with the ‘bits and pieces’ required to make it work.

I am not at all sure where they fit within the context of a Vaadin application.

There are cancel and success URLs required, external JavaScript libraries to be referenced, and a piece of JavaScript to initiate the whole flow.

There are other bits of Javascript required to ensure the lightbox or minibrowser window is closed at the end of it all, and they are to be put in different pages…very tricky in a single page app!

There is a Java SDK and programmatic API, but the thorn in the process is the PayPal GUI - It’s all very page oriented.

My first question is:
Is this the sort of component that could/should be turned into a GWT component ?

I have tried using a CustomLayout that refers to a html page. Initially this worksand the button is displayed, but once the payment button is clicked it opens a new Firefox tab before continuing. That’s not much use; and definitely not embedded!

I have also tried an Embedded object of type Embedded.TYPE_BROWSER. Same problem. I can open it in a Vaadin app, but once I click on the button it opens a new Tab and opens the PayPal window there.

My background is not with web work; it’s server side operations and database work. I know this is making it harder for me than it really should be, but that’s what I’m faced with.
With this in mind, feel free to point out where I’ve missed the obvious. I probably didn’t know it.

My second question is:
Does anyone else want/need a smooth PayPal integration with their Vaadin app? Perhaps this would be a great Add-on? I’m happy to work on it if someone can only get me to the point of a working prototype.

Failing that, has anyone had any success using a simpler PayPal integration? or even another payment system integration?

Thanks for any help you can give me, or even any ideas on how this problem might be solved.


Have you tried out the paypal integration
uses? The component is not released publicly, but trying out the shopping process might give some ideas…


I never knew it existed!

Thanks so much; I’ll have a look at that one for sure.

Any pointers at the moment are just fantastic.

It’s because you haven’t set all the necessary attributes in the constructor of the Link, or using the mutators right after:

Link paypal = new Link("", new ExternalResource(
		paypal.setIcon(new ExternalResource(



Though it isn’t your fault, you’re not supposed to be allowed to set one w/o the others. The class designer should’ve encapsulated all of them in an object and make a single mutator if he wanted them to be set consistently. But
they don’t care about us