2017 © Pedro Peláez
 

yii2-extension yii2-2checkout

Yii2 extension for 2checkout library

image

joni-jones/yii2-2checkout

Yii2 extension for 2checkout library

  • Wednesday, July 20, 2016
  • by joni-jones
  • Repository
  • 1 Watchers
  • 1 Stars
  • 369 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 2 Versions
  • 1 % Grown

The README.md

2Checkout PHP library for Yii 2

Extension provides access for 2Checkout library methods from Yii2 framework., (*1)

Latest Stable Version Total Downloads License, (*2)

How to install?

Get it via composer by adding the package to your composer.json:, (*3)

{
  "require": {
    "joni-jones/yii2-2checkout": "*"
  }
}

or run, (*4)

php composer.phar require --prefer-dist joni-jones/yii2-2checkout "*"

Usage

Once the extension is installed, simply modify your application configuration as follows:, (*5)

return [
    'components' => [
        'twocheckout' => [
            'class' => 'yii\twocheckout\TwoCheckout',
            'privateKey' => '',
            'sellerId' => '',
            'secretWord' => '', //by default is 'tango'
            'username' => '', //required to Admin API call
            'password' => '', //required to Admin API call
            'sandbox' => true, //by default false,
        ]
    ],
    // ...
];

The Charge class usage example (equal to Twocheckout_Charge::form()):, (*6)

$product['currency_code'] = 'USD';
$product['mode'] = '2CO';
$product['li_0_price'] = '0.01';
$product['merchant_order_id'] = '1122312';
$product['li_0_name'] = 'Credit';
$product['li_0_quantity'] = '1';
$product['li_0_type'] = 'product';
$product['li_0_tangible'] = 'N';
$product['li_0_product_id'] = '43242342';
$product['sid'] = Yii::$app->twocheckout->sellerId;
$product['demo'] = Yii::$app->twocheckout->demo;
$product['key'] = md5($product['merchant_order_id'].$product['li_0_product_id']);
Yii::$app->twocheckout->charge->form($product);

Full documentation you can find on 2Checkout site., (*7)

The Versions

20/07 2016

dev-master

9999999-dev

Yii2 extension for 2checkout library

  Sources   Download

MIT

The Requires

 

The Development Requires

by Ievgen Sentiabov

payment gateway yii2 2checkout 2co

20/07 2016

0.0.1

0.0.1.0

Yii2 extension for 2checkout library

  Sources   Download

MIT

The Requires

 

The Development Requires

by Ievgen Sentiabov

payment gateway yii2 2checkout 2co