Component for WalletOne service

Installs: 368

Dependents: 0

Suggesters: 0

Security: 0

Stars: 8

Watchers: 3

Forks: 7

Open Issues: 2


1.0.0 2016-08-15 19:57 UTC

This package is not auto-updated.

Last update: 2024-02-17 15:50:37 UTC


Total Downloads Latest Unstable Version License


The preferred way to install this extension is through composer.

To install, either run

$ php composer.phar require bookin/yii2-wallet-one "@dev"

or add

"bookin/yii2-wallet-one": "@dev"

to the require section of your composer.json file.


Configure component:


secretKey - it your secret key, you can find it on setting integration page your account

walletOptions - it parameters for generating a payment form, you can set permanent data

signatureMethod - EDS creation method, this parameter must be the same as your selected method on the setting integration page your account (default - sha1)

buttonLabel - label for WalletOneButton

If you don't use encryption method, you need set signatureMethod and secretKey to NULL

Example show form

You can get fields (add some options), and create form:

$action = Yii::$app->walletone->apiUrl;
$formData = Yii::$app->walletone->getFields([
    'WMI_DESCRIPTION'=>'Top up the account - '.Yii::$app->user->identity->username,
echo Html::beginForm($action);
foreach($formData as $key => $value){
    echo Html::hiddenInput($key, $value);
echo Html::submitButton('Pay', ['class'=>'btn btn-info']);
echo Html::endForm();

Or use simple form (button)

echo WalletOneButton::widget([
        'WMI_DESCRIPTION'=>'Top up the account - '.Yii::$app->user->identity->username,

Example success action

$post = Yii::$app->request->post();

/** @var WalletOne $walletone */
$walletone = Yii::$app->walletone;

        //... save info about payment
}catch (ErrorException $c){
    return 'WMI_RESULT=RETRY&WMI_DESCRIPTION='.$c->getMessage();
return 'WMI_RESULT=OK';


If you enabled enableCsrfValidation for your application you should disable it manually (Yii::app()->request->enableCsrfValidation = false;) before initializing form to have the correct token.