dev-master
9999999-dev
The Requires
- php >=5.3.0
- balanced/balanced 1.*
- illuminate/support 4.2.*
by Patrick Lewis
laravel payments balanced
Integrates the Balanced Payments PHP library with Laravel 4 via a ServiceProvider and config extensions., (*1)
Include laravel-balanced as a dependency in composer.json:, (*2)
"revolt-visual/laravel-balanced": "dev-master"
Run composer install
to download the dependency., (*3)
Add the ServiceProvider to your provider array within app/config/app.php
:, (*4)
'providers' => array( 'RevoltVisual\LaravelBalanced\LaravelBalancedServiceProvider' )
Finally, publish the configuration files via php artisan config:publish revolt-visual/laravel-balanced
., (*5)
It is advisable to keep all of your sensitive configuration out of your configuration files. Instead, utilize Laravel's "dot files" to keep them out of source control and making them easily overridable on dev environments., (*6)
If you have not setup a "dot file", read Laravel's "Protecting Sensitive Configuration for detailed setup instructions. To quickly get up an running, simply create a .env.php
file in the same directory as you apps composer.json
file. Then add your Balanced API credentials to it., (*7)
<?php return array( 'balanced' => array( 'api_key' => 'your-api-key', 'secret_key' => 'your-secret-key' ) );
If you insist on keeping your API credentials in your config, you can set your API Key and Publishable Key in app/config/packages/revolt-visual/laravel-balanced/balanced.php
:, (*8)
<?php return array( 'api_key' => 'your-api-key', 'secret_key' => 'your-secret-key' );
You may use the Balanced PHP Library as normal within your application. The Balanced API will automatically be configured with your Secret Key, so you do not need to set it yourself., (*9)
Under you app.php file you may add aliases for each of the Balanced Payments Classes ex., (*10)
'Balanced' => 'Balanced\Marketplace', 'Balanced_Card' => 'Balanced\Card',
laravel payments balanced