alkurn / yii2-braintree
yii 2 braintree integration
Installs: 103
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:yii2-extension
Requires
- braintree/braintree_php: ~3.0
- yiisoft/yii2: *
This package is not auto-updated.
Last update: 2025-03-07 03:16:09 UTC
README
braintree for yii 2
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist alkurn/yii2-braintree "dev-master"
or add
"alkurn/yii2-braintree": "*"
to the require section of your composer.json
file.
Usage
Once the extension is installed, you should configure it in the application configuration like the following,
'components' => [ 'braintree' => [ 'class' => 'alkurn\braintree\Braintree', 'environment' => 'sandbox', 'merchantId' => 'your_merchant_id', 'publicKey' => 'your_public_key', 'privateKey' => 'your_private_key', ] ]
** Creating a customer
Yii::$app->braintree->gateway->customer()->create(['firstName' => 'first_name', 'lastName' => 'last_name', 'paymentMethodNonce' => 'Nonce']);