承接 devcbh/checkout-wrapper 相关项目开发

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

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

devcbh/checkout-wrapper

最新稳定版本:1.1.3

Composer 安装命令:

composer require devcbh/checkout-wrapper

包简介

A Laravel-friendly wrapper for the Pisopay Checkout API.

README 文档

README

A Laravel-friendly wrapper for the Pisopay Checkout API.

Installation

You can install the package via composer:

composer require devcbh/checkout-wrapper

The package will automatically register its service provider.

Configuration

Publish the configuration file:

php artisan vendor:publish --provider="Devcbh\CheckoutWrapper\CheckoutWrapperServiceProvider" --tag="config"

This will create a config/checkout-wrapper.php file in your app. You can set your API credentials in your .env file:

CHECKOUT_API_ENDPOINT=https://api.example.com
CHECKOUT_API_VERSION=v1
CHECKOUT_API_USERNAME=your-username
CHECKOUT_API_PASSWORD=your-password

Usage

Using the Instance

use Devcbh\CheckoutWrapper\Checkout;

// Instantiate the class
$checkout = app(Checkout::class);

// Generate a token
$details = [
    array("name" => "itemSample", "price" => "1.00", "quantity" => "1"),
    array("name" => "itemSample1", "price" => "1.00", "quantity" => "2")
];
$arrayData = [
    "branch_code" => "",
    "amount" => "3",
    "delivery_fees" => "0",
    "transaction_type" => "",
    "processor_name" => "",
    "customer_name" => "John Doe",
    "customer_email" => "developer@pisopay.com.ph",
    "customer_phone" => "09091231234",
    "customer_address" => "PH",
    "merchant_trace_no" => "sampleTraceNo12345", //unique trace no 
    "merchant_callback_url" => "https://pisopay.com.ph/received", //status update webhook
    "callback_url" => "https://pisopay.com.ph", //redirection after payment and other returns
    "ip_address" => "192.168.123.1",
    "expiry_date" => "2027-01-01 00:00:00" // any future date
];
$token = $checkout->generateToken($details, $arrayData);

// Generate a reference number
$referenceNumber = $checkout->generateReferenceNumber($arrayData, "PPC"); // 2nd param is the channel code

Using the Facade

//use Devcbh\CheckoutWrapper\Facades\Checkout;
// Or use the alias which is automatically registered
use Checkout;

// Generate a token
$details = [
    array("name" => "itemSample", "price" => "1.00", "quantity" => "1"),
    array("name" => "itemSample1", "price" => "1.00", "quantity" => "2")
];
$arrayData = [
    "branch_code" => "",
    "amount" => "3",
    "delivery_fees" => "0",
    "transaction_type" => "",
    "processor_name" => "",
    "customer_name" => "John Doe",
    "customer_email" => "developer@pisopay.com.ph",
    "customer_phone" => "09091231234",
    "customer_address" => "PH",
    "merchant_trace_no" => "sampleTraceNo12345", //unique trace no 
    "merchant_callback_url" => "https://pisopay.com.ph/received", //status update webhook
    "callback_url" => "https://pisopay.com.ph", //redirection after payment and other returns
    "ip_address" => "192.168.123.1",
    "expiry_date" => "2027-01-01 00:00:00" // any future date
];
$token = Checkout::generateToken($details, $arrayData);

// Generate a reference number
$referenceNumber = Checkout::generateReferenceNumber($arrayData, "PPC"); // 2nd param is the channel code

Testing

composer test

License

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

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: proprietary
  • 更新时间: 2025-07-02

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固