tmob/kesspay

Unofficial Kess library

v0.1 2023-03-27 03:47 UTC

This package is auto-updated.

Last update: 2024-04-27 06:31:50 UTC


README

This documentation aims to provide all the information you need to work with Kess library.

Installation

 composer install tmob/kesspay

Usage

 $kess = new \tmob\Kess();

Create new instance of Kess

$kess = new Kess([
    "api_url" => "{api_url}",
    "username" => "{username}",
    "password" => "{password}",
    "client_id" => "{client_id}",
    "client_secret" => "{client_secret}",
    "seller_code" => "{seller_code}",
    "api_secret_key" => "{api_secret_key}",
]);

Usage/Examples

Generate payment link

$link = $kess=>generatePaymentLink([
        "body": "Delishop",
        "currency": "USD",
        "out_trade_no": "TR-20230310104700",
        "total_amount": 10,
        "invoke_reuse": 1
    ])

List all payment method

$allPaymentMethod = $kess=>listAllPaymentMethod()

Query Order

$queryOrder = $kess=>queryOrder([
	"out_trade_no": "TR-20230310104700"
])

Close Order

$queryOrder = $kess=>closeOrder([
	"out_trade_no": "TR-20230310104700"
])

Kess Documentation

Documentation