d3yii2 / d3paymentsystems
There is no license information available for the latest version (dev-master) of this package.
D3 Payment Systems
dev-master
2024-11-01 18:12 UTC
Requires
- yiisoft/yii2: *
This package is auto-updated.
Last update: 2024-11-01 18:12:31 UTC
README
#D3 Payment Systems"
Features
models and components for d3pPersonContacts
- Skrill
- Luxon
- Cripto
Installation
Too app composer.json require add
"d3yii2/d3paymentsystems": "dev-master"
Translation
'd3paymentsystems => [ 'class' => \'yii\i18n\PhpMessageSource\', 'basePath' => '@vendor/d3yii2/d3paymentsystems/messages', 'sourceLanguage' => 'en-US', ],
config
skrill component
Config
'PersonSettingSkrill' => [ 'class' => 'd3yii2\d3paymentsystems\components\PersonSettingSkrill', 'contactTypeId' => 4, 'currencyList' => ['EUR','USD','MULTI'] ],
Migration
$model = new D3pContactType(); $model->id = D3pContactType::TYPE_SKRILL; $model->class_name = 'component:PersonSettingSkrill'; $model->setGroupSettings(); if (!$model->save()) { throw new d3system\exceptions\D3ActiveRecordException($model); } $model->language = 'ru'; $model->name = 'Skrill'; if (!$model->saveTranslation()) { throw new d3system\exceptions\D3ActiveRecordException($model); }
Crypto component
'PersonSettingCrypto' => [ 'class' => 'd3yii2\d3paymentsystems\components\PersonSettingCrypto', 'contactTypeId' => 17, 'typeDef' => [ 'BNB' => [ 'bep20' ] ] ],
migration
$model = new D3pContactType(); $model->id = D3pContactType::TYPE_CRYPTO; $model->class_name = 'component:PersonSettingCrypto'; $model->setGroupSettings(); if (!$model->save()) { throw new d3system\exceptions\D3ActiveRecordException($model); } $model->language = 'ru'; $model->name = 'Crypto'; if (!$model->saveTranslation()) { throw new d3system\exceptions\D3ActiveRecordException($model); }
Luxor component
'PersonSettingLuxon' => [ 'class' => 'd3yii2\d3paymentsystems\components\PersonSettingLuxon', 'contactTypeId' => 16, ],
migration
$model = new D3pContactType(); $model->id = D3pContactType::TYPE_LUXON; $model->class_name = 'component:PersonSettingLuxon'; $model->setGroupSettings(); if (!$model->save()) { throw new d3system\exceptions\D3ActiveRecordException($model); } $model->language = 'ru'; $model->name = 'Luxon'; if (!$model->saveTranslation()) { throw new d3system\exceptions\D3ActiveRecordException($model); }
Display value
$component = Yii::$app->$componentName; $component->findModel($model->id); $options = []; // for each component can be own options echo $component->showValue($options);