2017 © Pedro Peláez
 

cakephp-plugin cake-php-payment-manager

A stripe.com-based payment manager for CakePHP

image

asugai/cake-php-payment-manager

A stripe.com-based payment manager for CakePHP

  • Thursday, May 7, 2015
  • by asugai
  • Repository
  • 1 Watchers
  • 1 Stars
  • 428 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 1 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

CakePHP Payment Manager

A stripe.com-based payment manager for CakePHP, (*1)

Background

Simple credit card and bank account sending and receiving data abstraction layer for CakePHP using stripe.com, (*2)

Requirements

  • PHP >= 5.3
  • CakePHP 2.x
  • Basic knowledge of stripe.com API

Installation

[Manual], (*3)

  • Download this: http://github.com/asugai/CakePHP-Payment-Manager/zipball/master
  • Unzip that download.
  • Copy the resulting folder to app/Plugin
  • Rename the folder you just copied to PaymentManager

[GIT Submodule], (*4)

In your app directory type:, (*5)

git submodule add git://github.com/asugai/CakePHP-Payment-Manager.git Plugin/PaymentManager
git submodule update --init

[GIT Clone], (*6)

In your app directory type, (*7)

git clone git://github.com/asugai/CakePHP-Payment-Manager.git Plugin/PaymentManager

Enable plugin

Enable the plugin your app/Config/bootstrap.php file:, (*8)

CakePlugin::load('PaymentManager');

If you are already using CakePlugin::loadAll();, then this is not necessary., (*9)

Usage

Setup PaymentManager

Setup the autoloader if you are using composer in /app/Config/bootstrap.php:, (*10)

// Load composer autoload.
require APP . '/Vendor/autoload.php';

// Remove and re-prepend CakePHP's autoloader as composer thinks it is the most important.
// See https://github.com/composer/composer/commit/c80cb76b9b5082ecc3e5b53b1050f76bb27b127b
spl_autoload_unregister(array('App', 'load'));
spl_autoload_register(array('App', 'load'), true, true);

// Load the bootstrap file to load Payment Model
CakePlugin::loadAll([
    'PaymentManager' => [
        'bootstrap' => true
    ]
]);

Edit /app/Config/bootstrap.php file and add Stripe.test and Stripe.live keys:, (*11)

Configure::write('Stripe.test.secret', '');
Configure::write('Stripe.test.public', '');

Configure::write('Stripe.live.secret', '');
Configure::write('Stripe.live.public', '');

if (class_exists('EnvironmentUtility') && EnvironmentUtility::is('production')) {
    Configure::write('Stripe.keys', Configure::read('Stripe.live'));
} else {
    Configure::write('Stripe.keys', Configure::read('Stripe.test'));
}

Todo

  • Add namespaces
  • Comments!
  • Set up more error checking
  • Add Unit tests!

Aknowledgements

The basic layout of this of this README was taken from https://github.com/dkullmann/CakePHP-Elastic-Search-DataSource, (*12)

License

Copyright (c) 2013 Andre Sugai, (*13)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:, (*14)

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software., (*15)

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE., (*16)

The Versions

07/05 2015

dev-develop

dev-develop http://github.com/asugai/cake-php-payment-manager

A stripe.com-based payment manager for CakePHP

  Sources   Download

MIT

The Requires

 

api email cakephp sms payments push twilio urban airship

21/04 2014

1.1.0.x-dev

1.1.0.9999999-dev http://github.com/asugai/cake-php-payment-manager

A stripe.com-based payment manager for CakePHP

  Sources   Download

MIT

The Requires

 

api email cakephp sms payments push twilio urban airship

21/04 2014

dev-master

9999999-dev http://github.com/asugai/cake-php-payment-manager

A stripe.com-based payment manager for CakePHP

  Sources   Download

MIT

The Requires

 

api email cakephp sms payments push twilio urban airship

27/11 2013

1.0.0.x-dev

1.0.0.9999999-dev http://github.com/asugai/cake-php-payment-manager

A stripe.com-based payment manager for CakePHP

  Sources   Download

MIT

The Requires

 

api email cakephp sms payments push twilio urban airship