dell/yii2-stripe

Yii 2 Stripe

v0.1.1 2016-11-19 14:23 UTC

This package is not auto-updated.

Last update: 2024-05-20 11:40:48 UTC


README

Configuration

<?php
// @console
return [
    // ....
    'bootstrap' => [\dell\stripe\Module::MODULE_ID],
    // ....
    'modules' => [
        // ....
        \dell\stripe\Module::MODULE_ID => [
            'class' => \dell\stripe\Module::class
        ],
    ],
    // ....
];

// @frontend
return [
    // ....
    'modules' => [
        \dell\stripe\Module::MODULE_ID => [
            'class' => \dell\stripe\Module::class,
            'apiPublicKey' => 'pk_xxxx_xxxxxxxxxxxxxxxxxxxxxxxx',
            'apiSecretKey' => 'sk_xxxx_xxxxxxxxxxxxxxxxxxxxxxxx',
        ],
    ],
    // ....
];

Migrations

./yii migrate --migrationPath='@stripe/migrations'

Form integration

<?php echo \dell\stripe\widget\stripe\Form::widget([
    'template' => 'form',
    'params' => ['card' => new \dell\stripe\models\card\Form()]
]); ?>

Or button integration

<?php echo \dell\stripe\widget\stripe\Form::widget([
    'template' => 'button',
    'params' => [
        'name' => 'Test',
        'description' => 'Test application'
    ],
]); ?>