kdaviesnz / cpgi
v1.0.0-alpha
2018-04-17 04:56 UTC
Requires
- php: ~7.0
- kdaviesnz/escrow: v1.0.0.0-alpha
- kdaviesnz/square: dev-master
- stripe/stripe-php: v6.4.2
Requires (Dev)
- phpunit/phpunit: >=5.4.3
- squizlabs/php_codesniffer: ^2.3
This package is not auto-updated.
Last update: 2025-03-02 07:32:03 UTC
README
Install
Via Composer
$ composer require kdaviesnz/cpgi
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.
// 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.
Testing
$ composer test
Contributing
Please see CONTRIBUTING.md and CODE_OF_CONDUCT.md for details.
Security
If you discover any security related issues, please email kdaviesnz@gmail.com instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see LICENSE.md for more information.
cpgi