定制 d3yii2/d3paymentsystems 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

d3yii2/d3paymentsystems

Composer 安装命令:

composer require d3yii2/d3paymentsystems

包简介

D3 Payment Systems

关键字:

README 文档

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);

Examples

统计信息

  • 总下载量: 113
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 5
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: Unknown
  • 更新时间: 2023-04-27