承接 tjmugova/laravel-dpo 相关项目开发

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

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

tjmugova/laravel-dpo

最新稳定版本:1.0.3

Composer 安装命令:

composer require tjmugova/laravel-dpo

包简介

Provides DPO Payment integration for Laravel

README 文档

README

A laravel package for integrating DPO Payment Gateway API to your application.

Installation 🚥

Add the package to your composer.json

"require": {
    ... 
    "tjmugova/laravel-dpo": "{version}"
},

Or just run composer require

$ composer require tjmugova/laravel-dpo

Configuration

Add your DPO Token, Payment Url, API Url, and Currency .env:

DPO_API_URL=https://secure.3gdirectpay.com/API/v6/ # always required
DPO_PAYMENT_URL=https://secure.3gdirectpay.com/payv2.php # always required
DPO_TOKEN=57466282-EBD7-4ED5-B699-8659330A6996 # always required
DPO_SERVICE_ID=1234

Advanced configuration

Run php artisan vendor:publish --provider="Tjmugova\Dpo\DpoProvider"

/config/dpo.php

Usage ✅

For full documentation, please refer to DPO Public API Docs

Create Token


use Tjmugova\Dpo\Facades\Dpo;
...
$token=Dpo::token();
$token->addService([
    'serviceType' => 1111,
    'serviceDescription' => 'Invoice',
    'serviceDate' => \Carbon\Carbon::now()->format("Y/m/d h:i"),
]);
$response = $token->createToken([
    'paymentAmount' => 200,
    'customerFirstName' => 'Test',
    'companyRef' => '15',
    'paymentCurrency' => 'USD',
    'redirectURL' => 'https://example.com',
    'backURL' => 'https://example.com',
]);

Redirect After Successfuly Token Request

return redirect($response['RedirectURL']);

Verify Token

You can verify a token received above. The method takes various parameters as specified in the DPO API docs.

$token->verifyToken([
    'transToken' => $response['transToken'],
 
]);

NOTE:

If you find any bugs or you have some ideas in mind that would make this better. Please don't hesitate to create a pull request.

If you find this package helpful, a simple star is very much appreciated.

MIT LICENSE

统计信息

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

GitHub 信息

  • Stars: 1
  • Watchers: 2
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-09-08

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固