payment

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package payment 企业支付

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddMerchant

func AddMerchant(ctx *corporation.App, payload []byte) (resp []byte, err error)

新增商户号

使用该接口时需要开通对外收款能力并绑定第一个商户号。(说明:第一个商户号的绑定需要由企业管理员手动绑定,绑定入口在:手机端工作台-对外收款,或管理后台-应用管理-对外收款-启用)通过该接口可以导入其他商户号,同一个企业最多绑定200个商户号。

See: https://work.weixin.qq.com/api/doc/90000/90135/93666

POST https://qyapi.weixin.qq.com/cgi-bin/externalpay/addmerchant?access_token=ACCESS_TOKEN

Example
package main

import (
	"fmt"

	"github.com/arkii/wxwork/corporation"
	"github.com/arkii/wxwork/corporation/apis/payment"
)

func main() {
	var ctx *corporation.App

	payload := []byte("{}")
	resp, err := payment.AddMerchant(ctx, payload)

	fmt.Println(resp, err)
}
Output:

func DelMerchant

func DelMerchant(ctx *corporation.App, payload []byte) (resp []byte, err error)

删除商户号

通过该接口可以删除未绑定的商户号

See: https://work.weixin.qq.com/api/doc/90000/90135/93666

POST https://qyapi.weixin.qq.com/cgi-bin/externalpay/delmerchant?access_token=ACCESS_TOKEN

Example
package main

import (
	"fmt"

	"github.com/arkii/wxwork/corporation"
	"github.com/arkii/wxwork/corporation/apis/payment"
)

func main() {
	var ctx *corporation.App

	payload := []byte("{}")
	resp, err := payment.DelMerchant(ctx, payload)

	fmt.Println(resp, err)
}
Output:

func GetBillList

func GetBillList(ctx *corporation.App, payload []byte) (resp []byte, err error)

获取对外收款记录

企业和服务商可通过此接口获取企业的对外收款记录。

See: https://work.weixin.qq.com/api/doc/90000/90135/93667

POST https://qyapi.weixin.qq.com/cgi-bin/externalpay/get_bill_list?access_token=ACCESS_TOKEN

Example
package main

import (
	"fmt"

	"github.com/arkii/wxwork/corporation"
	"github.com/arkii/wxwork/corporation/apis/payment"
)

func main() {
	var ctx *corporation.App

	payload := []byte("{}")
	resp, err := payment.GetBillList(ctx, payload)

	fmt.Println(resp, err)
}
Output:

func GetMerchant

func GetMerchant(ctx *corporation.App, payload []byte) (resp []byte, err error)

查询商户号详情

通过该接口可以查询商户号信息以及商户号使用范围

See: https://work.weixin.qq.com/api/doc/90000/90135/93666

POST https://qyapi.weixin.qq.com/cgi-bin/externalpay/getmerchant?access_token=ACCESS_TOKEN

Example
package main

import (
	"fmt"

	"github.com/arkii/wxwork/corporation"
	"github.com/arkii/wxwork/corporation/apis/payment"
)

func main() {
	var ctx *corporation.App

	payload := []byte("{}")
	resp, err := payment.GetMerchant(ctx, payload)

	fmt.Println(resp, err)
}
Output:

func SetMchUseScope

func SetMchUseScope(ctx *corporation.App, payload []byte) (resp []byte, err error)

设置商户号使用范围

通过该接口可以设置商户号的使用范围

See: https://work.weixin.qq.com/api/doc/90000/90135/93666

POST https://qyapi.weixin.qq.com/cgi-bin/externalpay/set_mch_use_scope?access_token=ACCESS_TOKEN

Example
package main

import (
	"fmt"

	"github.com/arkii/wxwork/corporation"
	"github.com/arkii/wxwork/corporation/apis/payment"
)

func main() {
	var ctx *corporation.App

	payload := []byte("{}")
	resp, err := payment.SetMchUseScope(ctx, payload)

	fmt.Println(resp, err)
}
Output:

Types

This section is empty.

Jump to

Keyboard shortcuts

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