iboxchain

package module
v0.0.0-...-8015009 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 1, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

README

iboxchain

盒子支付 Golang SDK,好哒收款,慧掌柜 详细文档请参考 盒子支付官方文档

安装

go get -u github.com/iboxpay/iboxchain

使用

package main

import (
    "fmt"
    
    "github.com/iboxpay/iboxchain"
)

func main() {
    // 初始化
    iboxchain.Init("your_app_id", "your_app_secret", "your_merchant_id")
    
    // 创建订单
    order := iboxchain.Order{
        OutTradeNo: "your_out_trade_no",
        TotalFee:   100,
        Body:       "your_order_body",
        NotifyUrl:  "your_notify_url",
    }
    resp, err := iboxchain.CreateOrder(order)
    if err != nil {
        fmt.Println(err)
        return
    }
    fmt.Println(resp)
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Version

func Version() string

Version is the version of the framework.

Types

type IBoxChain

type IBoxChain struct {
	// contains filtered or unexported fields
}

IBoxChain 字节系开放平台

func NewIBoxChain

func NewIBoxChain(ctx context.Context) *IBoxChain

NewIBoxChain 创建一个新的 IBoxChain

func (*IBoxChain) SetCache

func (i *IBoxChain) SetCache(c cache.Cache)

SetCache 设置缓存

func (*IBoxChain) SetLogger

func (i *IBoxChain) SetLogger(l logger.ILogger)

SetLogger 设置日志

func (*IBoxChain) SetRequest

func (i *IBoxChain) SetRequest(r request.Request)

SetRequest 设置请求

func (*IBoxChain) Version

func (i *IBoxChain) Version() string

Version 获取版本

Directories

Path Synopsis
Package domain provides the domain logic for the iboxchain.
Package domain provides the domain logic for the iboxchain.
Package splitting provides the splitting logic for the iboxchain.
Package splitting provides the splitting logic for the iboxchain.
Package trade 统一交易接口
Package trade 统一交易接口
Package utility provides some utility functions for internal usage.
Package utility provides some utility functions for internal usage.
cache
Package cache provides a simple and flexible cache interface for cache operations.
Package cache provides a simple and flexible cache interface for cache operations.
helper
Package helper provides some helper functions for the project.
Package helper provides some helper functions for the project.
logger
Package logger provides a common logger interface for logging.
Package logger provides a common logger interface for logging.
request
Package request HTTP request interface
Package request HTTP request interface

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL