22 lines
416 B
Go
22 lines
416 B
Go
package logic
|
|
|
|
import (
|
|
"context"
|
|
"linkpay/internal/service"
|
|
|
|
"git.linkiio.cn/linkpay/protobuf"
|
|
)
|
|
|
|
func Pay(ctx context.Context, req *protobuf.PayReq) (res *protobuf.Orders, err error) {
|
|
|
|
//测试请求API
|
|
r, err := service.Request(ctx).Header("Authorization", "{Token}").ContentType("application/json").Post("", req)
|
|
|
|
//返回支付结果
|
|
res = &protobuf.Orders{
|
|
Response: r.ReadAllString(),
|
|
}
|
|
|
|
return
|
|
}
|