Devsy Authorize.Net Laravel Package
A Laravel package wrapping the official Authorize.Net PHP SDK to provide a more concise API, OOP code and easy Laravel integration.
Prerequisites
The package requires PHP 7.4 to function.
Installation
The installation for the package is done via composer.
Open up command line where your composer.json
file is (usually the root of the project) and run:
composer require devsy/authorize-net
This will download the authorize-net package to your system.
If you're using Laravel versions prior to 5.4, you will need to manually register the service container as follows:
todo
Configuration
Open up your .env
file and fill out the following settings:
ANET_LOGIN_NAME=XXXX
ANET_TRANSACTION_KEY=XXXX
You can get both these in your API dashboard on Authorize.Net
Usage
The main API can be accessed via the AuthorizeNet
trait.
First you need to import it in your code and then use the trait.
use Devsy\AuthorizeNet;
class HomeController extends Controller
{
use AuthorizeNet;
...
You can check if the package is configured properly and communicating with Authorize.Net servers by going to the following url:
your-domain.example/authorizenet/heartbeat
You should see a page that will tell you the current status of the connection and, if not, what needs to be fixed.
Development Roadmap
- Publish on Packagist
- Laravel service provider set
- Sandbox (Developer) Mode
- Production Mode
- User (Access user profiles and charging information)
- Payment Transactions
@ 2020 Devsy. All rights reserved