This extension library facilitates integration between Symphony framework based applications and PHP SDK for Tradenity ecommerce API.
This package is available through Packagist (PHP Package Index), to install it type the following on the command line:
$ composer install tradenity/symfony-ext
Or, add this line to your application's composer.json:
{
'tradenity/symfony-ext':"0.5.0"
}
And then execute:
$ composer install
Dfine the required services:
In app/config/services.yml
:
services:
tradenity.session.service:
class: Tradenity\SDK\Ext\Symfony\Services\SessionService
arguments: ['@request_stack']
app.tradenity_customer_user_provider:
class: Tradenity\SDK\Ext\Symfony\Auth\CustomerUserProvider
If you will use the provided authentication support, add this to your security encoders:
encoders:
Tradenity\SDK\Ext\Symfony\Auth\CustomerUser:
algorithm: bcrypt
cost: 10
Now you can add your credentials and start use the SDK services:
In app/config/config.yml
:
parameters:
tradenity_key: sk_xxxxxxxxxxxxxxxxxxxx
stripe_public_key: pk_xxxxxxxxxxxxxxxx
Working sample application code can be found here.
Detailed documentation can be found on our knowledge base site:
- Fork it ( https://github.com/tradenity/php-sdk-symfony-ext/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request