feat: add refund statuses
This commit is contained in:
@@ -7,8 +7,8 @@ import (
|
||||
|
||||
"quyun/app/models"
|
||||
"quyun/app/service/testx"
|
||||
"quyun/providers/wepay"
|
||||
|
||||
"github.com/go-pay/gopay/wechat/v3"
|
||||
. "github.com/riverqueue/river"
|
||||
. "github.com/smartystreets/goconvey/convey"
|
||||
"github.com/stretchr/testify/suite"
|
||||
@@ -42,13 +42,13 @@ func (t *WechatPayNotifySuite) Test_Work() {
|
||||
Convey("step 1", func() {
|
||||
notify := `{ "mchid": "1702644947", "appid": "wx47649361b6eba174", "out_trade_no": "20250430192543", "transaction_id": "4200002602202504300651871941", "trade_type": "JSAPI", "trade_state": "SUCCESS", "trade_state_desc": "支付成功", "bank_type": "OTHERS", "attach": "", "success_time": "2025-04-30T19:25:51+08:00", "payer": { "openid": "o5Bzk644x3LOMJsKSZRlqWin74IU" }, "amount": { "total": 1, "payer_total": 1, "currency": "CNY", "payer_currency": "CNY" } }`
|
||||
|
||||
var payNotify wepay.PayNotify
|
||||
var payNotify wechat.V3DecryptPayResult
|
||||
err := json.Unmarshal([]byte(notify), &payNotify)
|
||||
So(err, ShouldBeNil)
|
||||
|
||||
job := &Job[WechatPayNotify]{
|
||||
Args: WechatPayNotify{
|
||||
PayNotify: &payNotify,
|
||||
Notify: &payNotify,
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user