subscribo / omnipay-subscribo-shared
Package with shared functionality for some Omnipay payment processing library drivers
Requires
- php: >=5.4
- omnipay/common: ~2.5.0
Requires (Dev)
- egeloen/http-adapter: ~0.8.0 || ~1.0.1
- omnipay/tests: ~2.0
- phpunit/phpunit: <5.0
- psr/http-message: ~1.0
- psr/log: ~1.0.0
- subscribo/psr-http-message-tools: ~0.4.4
- symfony/http-foundation: <=3.0
- zendframework/zend-diactoros: ~1.1.3 || ~1.3.5
Suggests
- egeloen/http-adapter: (~1.0.1) when HttpMessageSendingTrait is used
- psr/http-message: (~1.0) when HttpMessageSendingTrait is used
- psr/log: (~1.0.0) When GuzzleClientHelper or AbstractGateway::attachPsrLogger() is used
- subscribo/psr-http-message-tools: (~0.4.4) For PSR-7 compliant Request object factory, e.g. when SimpleRestfulRequestTrait, AbstractRestfulResponse or SimpleRestfulResponse is used
README
is extending functionality of Omnipay Common and providing shared functionality for some Omnipay drivers.
- PSR-7 Message sending using Guzzle client currently (June 2015) used by Omnipay Common
- SimpleRestfulRequestTrait to help sending http requests
- RestfulResponseInterface, AbstractRestfulResponse and SimpleRestfulResponse to help making Omnipay responses out of http responses
- Widget interface and basic functionality
- Support for widget-based workflow (for APIs providing at some point displayable widget or parameter(s) to create it)
- Extended CreditCard class (additional attributes)
- Extended Item (additional attributes) and ItemBag classes
- Address parser helper
Important note:
- This is a beta version.
Installing
Add dependency on this package to your Omnipay driver composer.json.
You might need to add also dependencies to packages psr/http-message and egeloen/http-adapter, if you are using protected method HttpMessageSendingTrait::sendHttpMessage()
"require": { "subscribo/omnipay-subscribo-shared": "~0.3.8", "egeloen/http-adapter": "~1.0.1", "psr/http-message": "~1.0" }
Usage
You can extend abstract classes provided by this package, use CreditCard and/or Item and ItemBag classes provided by this package, use Widget base functionality provided by this package, use trait SimpleRestfulRequestTrait for creating and sending http requests or use just trait HttpMessageSendingTrait (for PSR-7 http message sending) use helper GuzzleClientHelper (for httpClient logging using PSR-3 logger) or use helper AddressParser (for parsing of first line of address)
Contributing
For contribution guidelines see CONTRIBUTING.md
License
Package Subscribo OmnipaySubscriboShared is published under MIT License