tlongren/money-collector

Simple money collector using Stripe

1.0 2015-06-28 07:05 UTC

This package is not auto-updated.

Last update: 2024-05-11 14:31:58 UTC


README

Simple website to accept payments through Stripe. You've gotta get a Stripe account.

You can see it action at http://pay.longren.org/. If you find this useful, feel free to drop me a few dollars for coffee and beer. :)

This was inspired by begriffs/lucre, like this but in Ruby.

If you find any issues or problems please report them using the Issues tracker here at Github.

Ribbon CSS from Josh Bader and form CSS from Joey.

Setup

  1. Open index.php and pay.php.

  2. In index.php, change the $yourName variable at line 2 to whatever you want it to be.

  3. In Index.php, edit javascript variables publicTestKey and publicLiveKey. You can find those keys in your Stripe settings. These keys are publishable.

  4. In pay.php, set your private live key and your private test key (on line 12 and 13).

  5. Upload all files to a PHP enabled webserver.

  6. If you uploaded to a folder called pay-me at domain.com, your payment form will be at http://domain.com/pay-me/.

7a. To go live, open pay.php and replace $privateTestKey with $privateLiveKey inside the Stripe::setApiKey method.

7b. Open index.php and replace publicTestKey with publicLiveKey inside the Stripe.setPublishableKey javascript function.

  1. For SSL, get a free SSL self-signed certificate from tinycert.org and use cloudflare (pro account needed) or Cloudbric.

Customization

If you don't like the background image, it's really easy to change. There's some additional backgrounds in the assets folder, all are png files except the default. To change the background image, find the background you want in the assets folder, and copy the filename. Open style.css and replace default_background.jpg on line 15 with the filename you copied from the assets folder. So, if you're switching to black_lozenge.png, you'd replace default_background.jpg with black_lozenge.png. You'll also want to remove the background-size property, and remove the no-repeat center center fixed piece from line 15, otherwise your new background won't tile like it should.

So, basically, change this:

body {
    background:url("/assets/default_background.jpg") no-repeat center center fixed;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    background-size: cover;
}

to this:

body {
	background:url("/assets/black_lozenge.png");
}