2017 © Pedro Peláez
 

yii2-extension yii2-braintree

yii 2 braintree integration

image

sprypradeep/yii2-braintree

yii 2 braintree integration

  • Monday, May 16, 2016
  • by sprypradeep
  • Repository
  • 1 Watchers
  • 1 Stars
  • 30 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 0 % Grown

The README.md

Yii 2 Braintree Integration

braintree for yii 2, (*1)

Installation

The preferred way to install this extension is through composer., (*2)

Either run, (*3)

php composer.phar require --prefer-dist sprypradeep/yii2-braintree "*"

or add, (*4)

"sprypradeep/yii2-braintree": "*"

to the require section of your composer.json file., (*5)

Usage

Once the extension is installed, you should configure it in the application configuration like the following,, (*6)

'components' => [
    'braintree' => [
        'class' => 'sprypradeep\braintree\Braintree',
        'environment' => 'sandbox',
        'merchantId' => 'your_merchant_id',
        'publicKey' => 'your_public_key',
        'privateKey' => 'your_private_key',
    ]
]

** Creating a customer, (*7)

$braintree = Yii::$app->braintree;
$response = $braintree->call('Customer', 'create', [
    'firstName' => 'pradeep',
    ....
]);

$braintree = Yii::$app->braintree;
$response = $braintree->call('Transaction', 'sale', [
    'amount' => 25.00,
    'customerId' => 1,
    'paymentMethodToken' => 'some_token'
    ....
]);

braintree is using static methods for their API and to use the static methods for braintree. it should be like this Braintree_Transaction::sale($args) into $braintree->call('Transaction', 'sale', $args), (*8)

The Versions

16/05 2016

dev-master

9999999-dev

yii 2 braintree integration

  Sources   Download

MIT

The Requires

 

by Pradeep Sharma

yii2 extension braintree php

16/05 2016

1.0.1

1.0.1.0

yii 2 braintree integration

  Sources   Download

MIT

The Requires

 

by Pradeep Sharma

yii2 extension braintree php

25/09 2015

1.0.0

1.0.0.0

yii 2 braintree integration

  Sources   Download

MIT

The Requires

 

by Bryan Tan

yii2 extension braintree php