定制 k3rnel/omnipay-easy-pay 二次开发

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

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

k3rnel/omnipay-easy-pay

最新稳定版本:1.0.5

Composer 安装命令:

composer require k3rnel/omnipay-easy-pay

包简介

EasyPay gateway for Omnipay payment processing library

README 文档

README

EasyPay driver for the Omnipay Laravel payment processing library

Latest Stable Version Total Downloads Latest Unstable Version License PHP Version Require

Omnipay is a framework-agnostic, multi-gateway payment processing library for PHP 5.5+. This package implements EasyPay support for Omnipay.

Installation

Omnipay is installed via Composer. To install, add it to your composer.json file:

{
    "require": {
        "k3rnel/omnipay-easy-pay": "^1.0"
    }
}

Run composer to update your dependencies:

composer update

Or you can run

composer require k3rnel/omnipay-easy-pay

Basic Usage

  1. Initialize EasyPay gateway:
    use Omnipay\Omnipay;
    use Omnipay\EasyPay\EasyPayGateway;

    $gateway = Omnipay::create(EasyPayGateway::class);
    $gateway->setMerchantId('12345678'); // E-Merchant unique ID provided by EasyPay after being integrated
    $gateway->setMerchantToken('8f11efa4-4041-4e28-a191-0cc01c4ff66c'); // Merchant token (key) provided by EasyPay after being integrated
  1. Call purchase, it will automatically redirect to EasyPay's hosted page
    $purchaseRequest = $gateway->purchase();
    $purchaseRequest->setTransactionId('123456'); // Order ID of the merchant system.
    $purchaseRequest->setAmount(5); // Transaction amount
  1. Create a controller to handle the callback request. This URL merchant should provide EasyPay during registration.
    $gateway = Omnipay::create(EasyPayGateway::class);
    $gateway->setMerchantId('12345678');
    $gateway->setMerchantToken('8f11efa4-4041-4e28-a191-0cc01c4ff66c');
    
    $fetchTransactionRequest = $gateway->fetchTransaction();
    $fetchTransactionRequest->setTransactionId('123456');

    $fetchTransactionResponse = $fetchTransactionRequest->send();
    
    if ($fetchTransactionResponse->isSuccessful()) {
        // Your logic is to mark the order as paid.
    }

For general usage instructions, please see the main Omnipay repository.

Support

If you are having general issues with Omnipay, we suggest posting on Stack Overflow. Be sure to add the omnipay tag so it can be easily found.

If you want to keep up to date with release announcements, discuss ideas for the project, or ask more detailed questions, there is also a mailing list which you can subscribe to.

If you believe you have found a bug, please report it using the GitHub issue tracker, or better yet, fork the library and submit a pull request.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-12-08

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固