PHPackages                             alkurn/yii2-stripe - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Payment Processing](/categories/payments)
4. /
5. alkurn/yii2-stripe

ActiveYii2-extension[Payment Processing](/categories/payments)

alkurn/yii2-stripe
==================

Yii2 Stripe Wrapper

21.9k4[3 issues](https://github.com/alkurn/yii2-stripe/issues)[1 PRs](https://github.com/alkurn/yii2-stripe/pulls)PHPCI failing

Since Aug 14Pushed 4y ago2 watchersCompare

[ Source](https://github.com/alkurn/yii2-stripe)[ Packagist](https://packagist.org/packages/alkurn/yii2-stripe)[ RSS](/packages/alkurn-yii2-stripe/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependenciesVersions (1)Used By (0)

Yii2 Stripe Wrapper.
====================

[](#yii2-stripe-wrapper)

Installation
------------

[](#installation)

The preferred way to install this extension is through .

Either run

```
php composer.phar require alkurn/yii2-stripe "dev-master"
```

or add

```
"alkurn/yii2-stripe": "dev-master"
```

to the require section of your `composer.json` file.

Usage
-----

[](#usage)

Add a new component in main.php

```
'components' => [
...
'stripe' => [
    'class' => 'alkurn\stripe\Stripe',
    'publicKey' => "pk_test_xxxxxxxxxxxxxxxxxxx",
    'privateKey' => "sk_test_xxxxxxxxxxxxxxxxxx",
    'ClientId' => "ca_xxxxxxxxxxxxxxxxxx", //Optional
],
...
```

To render simple checkout form just call the widget in the view, it will automatically register the scripts. Check stripe documentation for more options.

```
use alkurn\stripe\StripeCheckout;
