PHPackages                             ruskid/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. ruskid/yii2-stripe

ActiveLibrary[Payment Processing](/categories/payments)

ruskid/yii2-stripe
==================

Yii2 Stripe Wrapper

1.6(7y ago)3121.3k17[6 issues](https://github.com/ruskid/yii2-stripe/issues)GNUPHP

Since Mar 24Pushed 6y ago6 watchersCompare

[ Source](https://github.com/ruskid/yii2-stripe)[ Packagist](https://packagist.org/packages/ruskid/yii2-stripe)[ Docs](https://github.com/ruskid/yii2-stripe)[ RSS](/packages/ruskid-yii2-stripe/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (6)Dependencies (2)Versions (8)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 ruskid/yii2-stripe "dev-master"
```

or add

```
"ruskid/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' => 'ruskid\stripe\Stripe',
    'publicKey' => "pk_test_xxxxxxxxxxxxxxxxxxx",
    'privateKey' => "sk_test_xxxxxxxxxxxxxxxxxx",
],
...
```

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 ruskid\stripe\StripeCheckout;
