feat: payment pay
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
package logic
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"lone-services/pkg/utils"
|
||||
payment "lone-services/rpc/payment/pb"
|
||||
"lone-services/services/payment/internal/svc"
|
||||
|
||||
"github.com/zeromicro/go-zero/core/logx"
|
||||
)
|
||||
|
||||
type CloseLogic struct {
|
||||
ctx context.Context
|
||||
svcCtx *svc.ServiceContext
|
||||
logx.Logger
|
||||
}
|
||||
|
||||
func NewCloseLogic(ctx context.Context, svcCtx *svc.ServiceContext) *CloseLogic {
|
||||
return &CloseLogic{
|
||||
ctx: ctx,
|
||||
svcCtx: svcCtx,
|
||||
Logger: logx.WithContext(ctx),
|
||||
}
|
||||
}
|
||||
|
||||
func (l *CloseLogic) Close(in *payment.CloseReq) (*payment.Response, error) {
|
||||
if in == nil || in.OrderSn == utils.StringEmpty {
|
||||
return failResponse(utils.ErrorParams), nil
|
||||
}
|
||||
return outResponse(utils.Fail, "close not implemented"), nil
|
||||
}
|
||||
Reference in New Issue
Block a user