2017 © Pedro Peláez
 

library cpgi

image

kdaviesnz/cpgi

  • Wednesday, April 18, 2018
  • by kdaviesnz
  • Repository
  • 1 Watchers
  • 0 Stars
  • 0 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 0 % Grown

The README.md

cpgi

Install

Via Composer, (*1)

``` bash $ composer require kdaviesnz/cpgi, (*2)


## Usage NOTE: This is code is currently in ALPHA and is not guaranteed to work. DO NOT USE IN PRODUCTION. It has not been tested with actual payments etc. If anything, think of it as a starting point. ``` php // Create an order (Square) $commonPaymentGateway = new CPGI("square", "sandbox-sq0atb-xrWTG_wv3dJqYTQaTKgovw", "", ""); $lineItem = new LineItem($commonPaymentGateway, "Widget", "a description", 10.50, "USD", 1, "Electronics"); $lineItems = array($lineItem()); $tax = new Tax($commonPaymentGateway, 5.00); $taxes = array($tax()); // 5% tax $discount = new Discount($commonPaymentGateway, 5.00, 2.00, "USD"); $discounts = array($discount()); $order = new Order($commonPaymentGateway, "testOrder", "USD", "buyer@example.com", "seller@example.com", "a test order", $lineItems, "", $taxes, $discounts );

Change log

Please see CHANGELOG.md for more information on what has changed recently., (*3)

Testing

bash $ composer test, (*4)

Contributing

Please see CONTRIBUTING.md and CODE_OF_CONDUCT.md for details., (*5)

Security

If you discover any security related issues, please email kdaviesnz@gmail.com instead of using the issue tracker., (*6)

Credits

  • kdaviesnz@gmail.com

License

The MIT License (MIT). Please see LICENSE.md for more information., (*7)

cpgi, (*8)

The Versions

18/04 2018
17/04 2018