Files
lone-services/rpc/payment/payment.proto
T
zzw 851348ed5c
CI / changes (push) Successful in 37s
CI / ad (push) Successful in 1s
CI / admin (push) Successful in 0s
CI / bff (push) Successful in 23s
CI / chore (push) Successful in 0s
CI / equipment (push) Successful in 0s
CI / express (push) Successful in 1s
CI / factory (push) Successful in 0s
CI / message (push) Successful in 0s
CI / order (push) Successful in 1s
CI / payment (push) Successful in 33s
CI / product (push) Successful in 0s
CI / record (push) Successful in 0s
CI / sale (push) Successful in 0s
CI / support (push) Successful in 0s
CI / task (push) Successful in 0s
CI / user (push) Successful in 18s
CI / wecom (push) Successful in 0s
feat: payment
2026-10-05 15:29:19 +08:00

78 lines
1.4 KiB
Protocol Buffer

syntax = "proto3";
package payment;
option go_package = "lone-services/rpc/payment";
import "google/api/annotations.proto";
service Payment {
rpc Pay(PayReq) returns (Response) {
option (google.api.http) = {
post: "/api/v3/payment/pay"
body: "*"
};
}
rpc Query(QueryReq) returns (Response) {
option (google.api.http) = {
post: "/api/v3/payment/query"
body: "*"
};
}
rpc Close(CloseReq) returns (Response) {
option (google.api.http) = {
post: "/api/v3/payment/close"
body: "*"
};
}
rpc Refund(RefundReq) returns (Response) {
option (google.api.http) = {
post: "/api/v3/payment/refund"
body: "*"
};
}
rpc Notify(NotifyReq) returns (Response) {
option (google.api.http) = {
post: "/api/v3/payment/notify"
body: "*"
};
}
}
message Response {
int32 code = 1;
string msg = 2;
string data = 3;
}
message PayReq {
string order_sn = 1;
string client = 2;
string channel = 3;
}
message QueryReq {
string order_sn = 1;
string channel = 2;
}
message CloseReq {
string order_sn = 1;
string channel = 2;
}
message RefundReq {
string order_sn = 1;
string channel = 2;
string amount = 3; // 元,字符串避免浮点误差
string reason = 4;
}
message NotifyReq {
string channel = 1;
map<string, string> headers = 2;
bytes body = 3;
}