codylewis / authorizenet
Authorize.net API wrapper, includes Laravel 5 support.
Installs: 1 939
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 3
Open Issues: 0
Requires
- php: >=7.0.0
- authorizenet/authorizenet: ~1.9
Requires (Dev)
- phpunit/phpunit: 5.7
This package is not auto-updated.
Last update: 2024-04-14 01:46:48 UTC
README
Basic abstraction with Laravel integration for Authorize.net
Notice
Namespace of package has been updated from Pseudocody
to Codylewis
to reflect github name update, this is a one time change.
Installation
composer require codylewis/authorizenet
- For Laravel 5 support:
- Add the service provider to
config/app.php
:Codylewis\AuthorizeNet\AuthorizeNetServiceProvider
- Register the facade:
'AuthorizeNet' => Codylewis\AuthorizeNet\AuthorizeNetFacade::class,
- Add
.env
value forAUTHORIZE_NET_LOGIN
(Login ID) andAUTHORIZE_NET_TRANSACTION_KEY
(Transaction Key) - Optionally create the config file:
config/authorizenet.php
- Add the service provider to
Usage
- Within Laravel 5, instantiate using the API key in the constructor:
$authorizeNet = new Codylewis\AuthorizeNet\AuthorizeNet($loginId, $transactionKey)
AuthorizeNet::authorizeCreditCard($order)
attempts authorize cards with provided information, returns responseAuthorizeNet::capturePreviouslyAuthorizedCreditcard($transactionId, $amount)
attempts to capture previously authorized credit card