承接 maryamnbyn/vandar-laravel 相关项目开发

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

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

maryamnbyn/vandar-laravel

Composer 安装命令:

composer require maryamnbyn/vandar-laravel

包简介

Laravel Library for Vandar Gateway

README 文档

README

This Laravel package allows you to connect to Vandar payment services. See vandar.io for more info.

Installation

This package can be installed through Laravel:

composer require maryamnbyn/vandar-laravel

Add vandar configuration to config/services.php:

 'vandar' => [
        'api' => 'your api key',
        'test' => false
    ]

You can get your api key at Vandar Dashboard

Usage

In every class where Vandar is used, you need to use the Vandar facade:

use Vandar\Laravel\Facade\Vandar;

Then, the payment requests can be sent like this:

$result = Vandar::request($amount, $callback, $mobile = null, $factorNumber = null, $description = null);

Further information on the responses is available on Vandar Documentation, but keep in mind that you need to store the $result['token'] to verify the payment later on.

After this, you may redirect the user to the payment service using one of these methods, note that token is optional:

Vandar::redirect($token);
Vandar::redirectUrl($token);

After the user made the payment, Vandar will redirect the user to the callback specified above with a token in url. you can verify payment by passing the token to the verify method:

$token=$_GET['token']; // You can also use $request->get('token') in the scope of a laravel controller
$result = Vandar::verify($token);

for get info of transaction you can make requestInfo method and send token for that then you can get information ;
To get updates on any transactions you may have created, you may use the requestInfo method along with the token you stored:

$result = Vandar::requestInfo($token);

Contribution

Pull-requests fixing bugs or adding to the documentation are very appreciated!

License

This project is licensed under the GPL-3, see LICENSE for more information.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: proprietary
  • 更新时间: 2021-02-01

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固