The Adyen Mobile Payment Pages
How to Integrate
Integration from your mobile app or mobile site is easy. There are basically two options for creating Mobile
applications at this moment, both require some specific details, but in essence the implementation of the
Adyen MPP is the same. The first option is to build a native application for a specific mobile device / operating
system. This type of application often results in optimised graphics and user interaction. The second type of
application is a rich web application. This type of applications are HTML(5) based applications which provide
the user a similar experience as native applications, but are often easier to implement, maintain and port to
different mobile devices / operating systems.
For the first case, native apps, you will be using a so-called “WebView” Object to load the hosted Adyen MPP
in a browser. This is similar to an iFrame on the internet and can be integrated seamless. An example with
iPhone's WebViewUI Object is provided later.
For the second case you will be redirecting the shopper to the Adyen MPP, just like it is another page of the
rich web application.
The request to load the Adyen MPP internet page is equal to a regular integration using the Hosted Payment
Pages. This is described in the Adyen Integration Manual - please consult our support pages for download
information.
At this moment the MPP is using a multi-page payment flow as shown in the screens above. The URL used is:
https://{test:live].adyen.com/hpp/select.shtml
The following code snippet shows how a GET URL is loaded in a WebViewUI on an Apple device.
NSString *url = [NSString stringWithFormat:@"https://test.adyen.com/hpp/select.shtml?
merchantAccount=%@&etc", 'TestMerchant', etc];
NSURLRequest *req = [NSURLRequest requestWithURL:[NSURL URLWithString:url]];
[webView loadRequest:req];
An alternative to generate a GET url, is to use an intermediary page on your own infrastructure, that accepts a
payment request and can redirect to the appropriate Adyen page. On the iPhone, this can be done as follows:
NSString *url = [NSString stringWithFormat:@"http://pay.example.com/payment/pay?id=%@", id];
NSURLRequest *req = [NSURLRequest requestWithURL:[NSURL URLWithString:url]];
[webView loadRequest:req];
The server-side script, running on pay.example.com, would retrieve the order information from your database
based on the id, and do the full post to Adyen. If you only connect from a mobile site, then you can skip this
intermediate step and directly redirect to Adyen's hosted payment pages.
Copyright © Adyen B.V. 2011 5