#D3 Payment Systems"
- Skrill
- Luxon
- Cripto
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
'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);
} '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);
} '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);
} $component = Yii::$app->$componentName;
$component->findModel($model->id);
$options = []; // for each component can be own options
echo $component->showValue($options);