Beakable.com - Iain Hamilton A web developers porfolio
The beakable rabbit

Flash and PRO Merchant PayPal APIs

Sunday, June 28th, 2009

Recently a job popped up to modify a current Flash ActionScript 2.0 site which had a custom cart that sent the user to a PayPal page. The changes where to make the custom cart use the PayPal Merchant Pro API so that it ran the whole purchasing process within Flash. As simple as this should be there, is a lack of support or documentation kicking about on doing this within Flash. So after searching and working out how easy it really is I thought it would be a good idea to post about it, as the amount of questions and forum posts I came across asking if it’s possible and how to go about it was rather extreme.

This guide will cover the rough basics of creating the link beteen Flash and the PayPal API using a simple sendandload. It should be easy enough to adapt and tidy up to produce a proper transaction form.

The first, and quite possibly the longest step is to head over to http://sandbox.paypal.com and setup a sandbox account. You will need to acquire both a personal and business account within your sandbox. Once you have set up a businesses account you will also need to go through the process of upgrading it to a Merchant Pro account. Eventually you will be given the following details: (more…)