refund

package
v1.0.0-beta.4 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2020 License: Apache-2.0 Imports: 2 Imported by: 1

Documentation

Overview

Package refund 退款 相关

Package refund 退款 相关

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

func Refund

func Refund(ctx *wxpay.WXPay, params map[string]string) (result map[string]string, err error)

退款

当交易发生之后一段时间内,由于买家或者卖家的原因需要退款时,卖家可以通过退款接口将支付款退还给买家,微信支付将在收到退款请求并且验证成功之后,按照退款规则将支付款按原路退到买家帐号上。

See: https://pay.weixin.qq.com/wiki/doc/api/app/app.php?chapter=9_4&index=6

POST https://api.mch.weixin.qq.com/secapi/pay/refund

Example
package main

import (
	"fmt"

	"github.com/fastwego/wxpay"
	"github.com/fastwego/wxpay/apis/refund"
)

func main() {
	var ctx *wxpay.WXPay

	params := map[string]string{
		"appid": "APPID",
		// ...
	}
	resp, err := refund.Refund(ctx, params)

	fmt.Println(resp, err)
}
Output:

func RefundQuery

func RefundQuery(ctx *wxpay.WXPay, params map[string]string) (result map[string]string, err error)

查询退款

当提交退款申请后,通过调用该接口查询退款状态。退款有一定延时,用零钱支付的退款20分钟内到账,银行卡支付的退款3个工作日后重新查询退款状态。

See: https://pay.weixin.qq.com/wiki/doc/api/app/app.php?chapter=9_5&index=7

POST https://api.mch.weixin.qq.com/pay/refundquery

Example
package main

import (
	"fmt"

	"github.com/fastwego/wxpay"
	"github.com/fastwego/wxpay/apis/refund"
)

func main() {
	var ctx *wxpay.WXPay

	params := map[string]string{
		"appid": "APPID",
		// ...
	}
	resp, err := refund.RefundQuery(ctx, params)

	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