Implementing Stripe in CakePHP

Here’s a very rough sketch of the steps involved in bringing Stripe into a CakePHP application:

Step 1.

Update composer.json to require stripe, then run ‘composer update’.

(FYI, Composer failed first time because I didn’t have Curl installed on my server. Once this was fixed, all went smoothly.)

Step 2.

Manually install Hashmode’s Stripe component in the /Controller/Component directory.

(NOTE, doing this with composer borks on my install since this component is still in dev mode and conflicts with the update policies set for the app in composer.json.)

Step 3.

Change the default nameSpace in the new component to ‘/app/…’.

Step 4.

Set up a Stripe account

Step 5.

Add the Stripe keys to bootstrap.php

Step 6.

Create the ‘add card’ form

Step 7.

Create a ‘form-submit-button’ element, and include in the add-card form

Step 8.

Include links to jQuery & the Stripe JS in the app

… etc.