paylinksa/php 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

paylinksa/php

最新稳定版本:1.0.0

Composer 安装命令:

composer require paylinksa/php

包简介

PHP package for integrating with Paylink payment gateway services.

README 文档

README

This package enables seamless integration with the Paylink payment gateway within PHP applications. and provides convenient methods to interact with the Paylink API, facilitating payment processing and related functionalities.

Installation

You can install the paylinksa/php package via composer. Run the following command in your terminal:

composer require paylinksa/php

Environment Setup

Create an instance of Paylink based on your environment

  • For Testing
use Paylink\Paylink;

$paylink = Paylink::test();
  • For Production
use Paylink\Paylink;

$paylink = Paylink::production('API_ID_xxxxxxxxxx', 'SECRET_KEY_xxxxxxxxxx');

Methods

  1. Add Invoice:

    Add an invoice to the system for payment processing.

       use Paylink\Models\PaylinkProduct;
    
       $invoiceDetails = $paylink->addInvoice(
          amount: 250.0,
          clientMobile: '0512345678',
          clientName: 'Mohammed Ali',
          orderNumber: '123456789',
          products: [
             new PaylinkProduct(title: 'item1', price: 5.0, qty: 10),
             new PaylinkProduct(title: 'item2', price: 20.0, qty: 10)
          ],
          callBackUrl: 'https://example.com',
       );
  2. Get Invoice

    Retrieve invoice details.

       $invoiceDetails = $paylink->getInvoice(transactionNo: '1714289084591');
    
       // $invoiceDetails->orderStatus;
       // $invoiceDetails->transactionNo;
       // $invoiceDetails->url;
       // ...
  3. Cancel Invoice

    Cancel an existing invoice initiated by the merchant.

       $paylink->cancelInvoice(transactionNo: '1714289084591'); // true-false

Examples:

For detailed usage instructions, refer to the Paylink Payment Documentation

Support

If you encounter any issues or have questions about the Paylink Package, please contact us.

License

This package is open-source software licensed under the MIT license.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-09-24

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固