承接 zarulizham/laravel-duitnow 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

zarulizham/laravel-duitnow

最新稳定版本:2.0.5

Composer 安装命令:

composer require zarulizham/laravel-duitnow

包简介

Malaysia DuitNow payment

README 文档

README

DNOBW Logo

Latest Version on Packagist Total Downloads

Package for Malaysia DuitNow Online Banking/Wallet Payment

Installation

You can install the package via composer:

composer require zarulizham/laravel-duitnow

You can publish and run the migrations with:

php artisan vendor:publish --tag="duitnow-migrations"
php artisan migrate

You can publish the config file with:

php artisan vendor:publish --tag="duitnow-config"

You can publish the controller file with:

php artisan vendor:publish --tag="duitnow-controller"

This is the contents of the published config file:

return [
    'url' => env('DUITNOW_URL'),
    'client_id' => env('DUITNOW_CLIENT_ID'),
    'product_id' => env('DUITNOW_PRODUCT_ID'),
    'client_secret' => env('DUITNOW_CLIENT_SECRET'),
    'merchant_id' => env('DUITNOW_MERCHANT_ID'),
    'x_signature_key' => env('DUITNOW_X_SIGNATURE_KEY'),
    'token_expiry' => env('DUITNOW_TOKEN_EXPIRY', 3600),
    'bank_cache' => env('DUITNOW_BANK_CACHE', 43200), # 12 hours
    'merchant_name' => env('DUITNOW_MERCHANT_NAME'),
    'account_type' => env('DUITNOW_MERCHANT_ACCOUNT_TYPE'),

    'source_of_funds' => [
        "01"
    ],

    'certificates' => [
        'uat' => [
            'disk' => 'local',
            'dir' => 'paynet/duitnow/',
        ],
        'production' => [
            'disk' => 'local',
            'dir' => 'paynet/duitnow/',
        ]
    ],

    'direct_path' => env('DUITNOW_DIRECT_PATH'),
    'callback_path' => env('DUITNOW_CALLBACK_PATH'),
];

Optionally, you can publish the views using

php artisan vendor:publish --tag="duitnow-views"

Usage

    $duitNowPayment = new DuitNowPayment();

    $bankInfo = explode('|', $request->bank);
    $bankId = $bankInfo[0];
    $bankType = $bankInfo[1];

    $redirectUrl = $duitNowPayment->initiatePayment(10, "Zarul Zubir", $bankType, "Ref: " . rand(100, 200), $bankId, 'A1000001');

Upgrade v1 to v2

This major upgrade add column on transaction table to allow morphing.

Run `php artisan vendor:publish --tag=duitnow-v2-migration`

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.

统计信息

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

GitHub 信息

  • Stars: 9
  • Watchers: 1
  • Forks: 3
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-02-13

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固