digital-canvas / cart-recover-phpapi
Cart Recover - PHP API.
dev-master
2013-08-05 19:35 UTC
Suggests
- guzzle/guzzle: Use Guzzle for making requests
- zendframework/zend-http: Use Zend\Http\Client from Zend Framework 2.x for making requests
- zendframework/zendframework1: Use Zend_Http_Client from Zend Framework 1.x for making requests
This package is auto-updated.
Last update: 2024-12-12 13:30:00 UTC
README
PHP API implementation of the Cart Recover order API.
http://www.cart-recover.com
Developed by Digital Canvas
Installation
Requirements
- PHP 5.2.4+ (external libraries used by adapters may have their own requirements)
At least one of the following adapters:
- PHP cURL extension to use cURL adapter
- Zend Framework 1.x to use Zend_Http_Client adapter
- Zend Framework 2.2.x to use Zend Zend\Http\Client adapter
- Guzzle library to use Guzzle adapter
- PEAR HTTP_Request2 library to use PEAR adapter
Install with composer
The easiest way to install the Cart Recover PHP API library is via composer. Create the following composer.json
file and run the php composer.phar install
command to install it.
Note composer requires PHP 5.3+
{ "require": { "digital-canvas/cart-recover-phpapi": "*" } }
<?php require 'vendor/autoload.php'; $account_key = 'my-unique-account-key'; $cart_recover = new CartRecover_API($account_key); $adapter = new CartRecover_Adapter_Curl(); $cart_recover->setHTTPClientAdapter($adapter);
Install without composer
Download the libraries from https://github.com/digital-canvas/cart-recover-phpapi/archive/master.zip and extract to a folder accessible from your app.
<?php require 'path/to/src/CartRecover/Autoloader.php'; CartRecover_Autoloader::registerAutoloader(); $account_key = 'my-unique-account-key'; $cart_recover = new CartRecover_API($account_key); $adapter = new CartRecover_Adapter_Curl(); $cart_recover->setHTTPClientAdapter($adapter);