nontax

package
v1.0.0-beta.12 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package nontax 非税票据/缴费

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateBillCard

func CreateBillCard(ctx *offiaccount.OffiAccount, payload []byte) (resp []byte, err error)

创建财政电子票据接口

财政局可以通过这个接口帮助执收单位创建一张财政电子票据模板。同一个财政局可以对应多个执收单位,同一个执收单位,使用同一个card_id,不同的执收单位,使用不同的card_id

See: https://developers.weixin.qq.com/doc/offiaccount/WeChat_Invoice/Nontax_Bill/API_list.html

POST https://api.weixin.qq.com/nontax/createbillcard?access_token={access_token}

Example
package main

import (
	"fmt"

	"github.com/fastwego/offiaccount"
	"github.com/fastwego/offiaccount/apis/nontax"
)

func main() {
	var ctx *offiaccount.OffiAccount

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

	fmt.Println(resp, err)
}
Output:

func DownloadBill

func DownloadBill(ctx *offiaccount.OffiAccount, payload []byte) (resp []byte, err error)

下载对帐单(提供给银行)

See: https://developers.weixin.qq.com/doc/offiaccount/Non_tax_pay/API_document.html

POST https://api.weixin.qq.com/nontax/downloadbill?access_token=$AccessToken

Example
package main

import (
	"fmt"

	"github.com/fastwego/offiaccount"
	"github.com/fastwego/offiaccount/apis/nontax"
)

func main() {
	var ctx *offiaccount.OffiAccount

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

	fmt.Println(resp, err)
}
Output:

func GetBillAuthUrl

func GetBillAuthUrl(ctx *offiaccount.OffiAccount, payload []byte) (resp []byte, err error)

获取授权页链接

通过此接口,获取授权页链接,让用户跳转到授权页

See: https://developers.weixin.qq.com/doc/offiaccount/WeChat_Invoice/Nontax_Bill/API_list.html

POST https://api.weixin.qq.com/nontax/getbillauthurl?access_token={access_token}

Example
package main

import (
	"fmt"

	"github.com/fastwego/offiaccount"
	"github.com/fastwego/offiaccount/apis/nontax"
)

func main() {
	var ctx *offiaccount.OffiAccount

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

	fmt.Println(resp, err)
}
Output:

func GetOrder

func GetOrder(ctx *offiaccount.OffiAccount, payload []byte) (resp []byte, err error)

查询订单(提供给委办局、银行、财政)

See: https://developers.weixin.qq.com/doc/offiaccount/Non_tax_pay/API_document.html

POST https://api.weixin.qq.com/nontax/getorder?access_token=$AccessToken

Example
package main

import (
	"fmt"

	"github.com/fastwego/offiaccount"
	"github.com/fastwego/offiaccount/apis/nontax"
)

func main() {
	var ctx *offiaccount.OffiAccount

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

	fmt.Println(resp, err)
}
Output:

func GetOrderList

func GetOrderList(ctx *offiaccount.OffiAccount, payload []byte) (resp []byte, err error)

查询订单列表

See: https://developers.weixin.qq.com/doc/offiaccount/Non_tax_pay/API_document.html

POST https://api.weixin.qq.com/nontax/getorderlist?access_token=$AccessToken

Example
package main

import (
	"fmt"

	"github.com/fastwego/offiaccount"
	"github.com/fastwego/offiaccount/apis/nontax"
)

func main() {
	var ctx *offiaccount.OffiAccount

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

	fmt.Println(resp, err)
}
Output:

func GetRealName

func GetRealName(ctx *offiaccount.OffiAccount, payload []byte) (resp []byte, err error)

获取实名信息

See: https://developers.weixin.qq.com/doc/offiaccount/Non_tax_pay/API_document.html

POST https://api.weixin.qq.com/nontax/getrealname?access_token=ACCESS_TOKEN

Example
package main

import (
	"fmt"

	"github.com/fastwego/offiaccount"
	"github.com/fastwego/offiaccount/apis/nontax"
)

func main() {
	var ctx *offiaccount.OffiAccount

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

	fmt.Println(resp, err)
}
Output:

func InsertBill

func InsertBill(ctx *offiaccount.OffiAccount, payload []byte) (resp []byte, err error)

将财政电子票据添加到用户微信卡包

执收单位完成用户插卡授权后,向财政局请求给某一个订单号进行领取财政电子票据,财政局须调用该接口对用户进行开票

See: https://developers.weixin.qq.com/doc/offiaccount/WeChat_Invoice/Nontax_Bill/API_list.html

POST https://api.weixin.qq.com/nontax/insertbill?access_token={access_token}

Example
package main

import (
	"fmt"

	"github.com/fastwego/offiaccount"
	"github.com/fastwego/offiaccount/apis/nontax"
)

func main() {
	var ctx *offiaccount.OffiAccount

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

	fmt.Println(resp, err)
}
Output:

func MicroPay

func MicroPay(ctx *offiaccount.OffiAccount, payload []byte) (resp []byte, err error)

提交刷卡支付

提交支付请求后微信会同步返回支付结果。 接口返回系统失败时,等待5秒重新调用看返回码。 当结果返回用户支付中需要输入密码时,可每间隔一段时间(建议10秒)重新调用该接口,直到有明确成功、失败,或者超时(建议30秒)

See: https://developers.weixin.qq.com/doc/offiaccount/Non_tax_pay/API_document.html

POST https://api.weixin.qq.com/nontax/micropay?access_token=$AccessToken

Example
package main

import (
	"fmt"

	"github.com/fastwego/offiaccount"
	"github.com/fastwego/offiaccount/apis/nontax"
)

func main() {
	var ctx *offiaccount.OffiAccount

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

	fmt.Println(resp, err)
}
Output:

func MockNotification

func MockNotification(ctx *offiaccount.OffiAccount, payload []byte) (resp []byte, err error)

测试支付结果通知

接口提供给接入方在联调前自己调试支付通知接口的加解密和其它基本逻辑。 若version为1,会通知两次,分别测试加解密是否正确和是否有验签。 调用此接口会触发微信后台向 url 发送支付结果通知的测试数据

See: https://developers.weixin.qq.com/doc/offiaccount/Non_tax_pay/API_document.html

POST https://api.weixin.qq.com/nontax/mocknotification?access_token=$AccessToken

Example
package main

import (
	"fmt"

	"github.com/fastwego/offiaccount"
	"github.com/fastwego/offiaccount/apis/nontax"
)

func main() {
	var ctx *offiaccount.OffiAccount

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

	fmt.Println(resp, err)
}
Output:

func MockQueryFee

func MockQueryFee(ctx *offiaccount.OffiAccount, payload []byte) (resp []byte, err error)

测试查询应收信息

此接口提供给接入方在联调前自己调试查询应收信息接口的加解密和其它基本逻辑。 若version为1,会通知两次,分别测试加解密是否正确和是否有验签。 调用此接口会触发微信后台向 url 发送查询应收信息的测试数据

See: https://developers.weixin.qq.com/doc/offiaccount/Non_tax_pay/API_document.html

POST https://api.weixin.qq.com/nontax/mockqueryfee?access_token=$AccessToken

Example
package main

import (
	"fmt"

	"github.com/fastwego/offiaccount"
	"github.com/fastwego/offiaccount/apis/nontax"
)

func main() {
	var ctx *offiaccount.OffiAccount

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

	fmt.Println(resp, err)
}
Output:

func NotifyInconsistentOrder

func NotifyInconsistentOrder(ctx *offiaccount.OffiAccount, payload []byte) (resp []byte, err error)

通知不一致订单(提供给财政)

See: https://developers.weixin.qq.com/doc/offiaccount/Non_tax_pay/API_document.html

POST https://api.weixin.qq.com/nontax/notifyinconsistentorder?access_token=$AccessToken

Example
package main

import (
	"fmt"

	"github.com/fastwego/offiaccount"
	"github.com/fastwego/offiaccount/apis/nontax"
)

func main() {
	var ctx *offiaccount.OffiAccount

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

	fmt.Println(resp, err)
}
Output:

func QueryFee

func QueryFee(ctx *offiaccount.OffiAccount, payload []byte) (resp []byte, err error)

查询应收信息(提供给委办局)

See: https://developers.weixin.qq.com/doc/offiaccount/Non_tax_pay/API_document.html

POST https://api.weixin.qq.com/nontax/queryfee?access_token=$AccessToken

Example
package main

import (
	"fmt"

	"github.com/fastwego/offiaccount"
	"github.com/fastwego/offiaccount/apis/nontax"
)

func main() {
	var ctx *offiaccount.OffiAccount

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

	fmt.Println(resp, err)
}
Output:

func RealNameGetAuthUrl

func RealNameGetAuthUrl(ctx *offiaccount.OffiAccount, payload []byte) (resp []byte, err error)

获取用户实名信息-获取授权链接

See: https://developers.weixin.qq.com/doc/offiaccount/Non_tax_pay/API_document.html

POST https://api.weixin.qq.com/intp/realname/getauthurl?access_token=ACCESS_TOKEN

Example
package main

import (
	"fmt"

	"github.com/fastwego/offiaccount"
	"github.com/fastwego/offiaccount/apis/nontax"
)

func main() {
	var ctx *offiaccount.OffiAccount

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

	fmt.Println(resp, err)
}
Output:

func Refund

func Refund(ctx *offiaccount.OffiAccount, payload []byte) (resp []byte, err error)

申请退款(提供给银行)

See: https://developers.weixin.qq.com/doc/offiaccount/Non_tax_pay/API_document.html

POST https://api.weixin.qq.com/nontax/refund?access_token=$AccessToken

Example
package main

import (
	"fmt"

	"github.com/fastwego/offiaccount"
	"github.com/fastwego/offiaccount/apis/nontax"
)

func main() {
	var ctx *offiaccount.OffiAccount

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

	fmt.Println(resp, err)
}
Output:

func UnifiedOrder

func UnifiedOrder(ctx *offiaccount.OffiAccount, payload []byte) (resp []byte, err error)

支付下单(提供给委办局)

See: https://developers.weixin.qq.com/doc/offiaccount/Non_tax_pay/API_document.html

POST https://api.weixin.qq.com/nontax/unifiedorder?access_token=$AccessToken

Example
package main

import (
	"fmt"

	"github.com/fastwego/offiaccount"
	"github.com/fastwego/offiaccount/apis/nontax"
)

func main() {
	var ctx *offiaccount.OffiAccount

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

	fmt.Println(resp, err)
}
Output:

Types

This section is empty.

Directories

Path Synopsis
Package vehicle 非税车主平台
Package vehicle 非税车主平台

Jump to

Keyboard shortcuts

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