You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
126 lines
2.6 KiB
126 lines
2.6 KiB
syntax = "proto3";
|
|
|
|
package api;
|
|
|
|
import "google/protobuf/empty.proto";
|
|
//import "common.proto";
|
|
option go_package = "bkb-payment/api";
|
|
|
|
|
|
// The greeting service definition.
|
|
service Greeter {
|
|
// Sends a greeting
|
|
rpc Ping (google.protobuf.Empty) returns (PingReply) {
|
|
|
|
}
|
|
rpc CountryList (google.protobuf.Empty) returns (CountryReply) {
|
|
|
|
}
|
|
rpc DistrictCascade (DistrictRequest) returns (DistrictReply) {
|
|
|
|
}
|
|
rpc PayTransactionApp(PayTransRequest) returns (PayTransResponse) {
|
|
|
|
}
|
|
rpc GetPaymentUrl(PayUrlRequest) returns (PayUrlResponse) {
|
|
|
|
}
|
|
rpc PayTransactionAppUrl(PayTransRequest) returns (PayUrlResponse) {
|
|
|
|
}
|
|
rpc SuccessPayback(PaybackRequest) returns (PaybackResp) {
|
|
|
|
}
|
|
rpc PaypalPayback(PaybackRequest) returns (PaybackResp) {
|
|
|
|
}
|
|
rpc GetPayTransaction(google.protobuf.Empty) returns (GetPayTransactionResp) {
|
|
|
|
}
|
|
rpc CloseBill(CloseBillRequest) returns (PingReply) {
|
|
|
|
}
|
|
// rpc ClosePayTransaction(google.protobuf.Empty) returns (PingReply) {
|
|
// option (google.api.http) = {
|
|
// post: "/pay/transaction/outTradeNo/close"
|
|
// };
|
|
// }
|
|
}
|
|
|
|
// The response message containing the greetings
|
|
message PingReply {
|
|
string message = 1;
|
|
}
|
|
message Country{
|
|
int32 id = 1;
|
|
string name = 2;
|
|
}
|
|
message CountryReply{
|
|
repeated Country list = 1;
|
|
}
|
|
message DistrictRequest {
|
|
int32 country = 1;
|
|
}
|
|
message District {
|
|
string label = 1;
|
|
string adcode = 2;
|
|
int32 parentId = 3;
|
|
repeated District children = 4;
|
|
}
|
|
message DistrictReply{
|
|
repeated District list = 1;
|
|
}
|
|
message PayTransRequest{
|
|
string appid = 1;
|
|
string mchid = 2;
|
|
string out_trade_no = 3;
|
|
string attach = 4;
|
|
string notify_url = 5;
|
|
double amount = 6;
|
|
string currency = 7;
|
|
string pay_channel = 8;
|
|
string return_url = 9;
|
|
string cancel_url = 10;
|
|
}
|
|
message PayTransResponse{
|
|
string transaction_id = 1;
|
|
string status = 2;
|
|
string message = 3;
|
|
}
|
|
message PayUrlRequest{
|
|
string mchid = 1;
|
|
string pay_channel = 2;
|
|
string transaction_id = 3;
|
|
}
|
|
message PayUrlResponse{
|
|
string pay_channel = 1;
|
|
string pay_id = 2;
|
|
string pay_return = 3;
|
|
string pay_status = 4;
|
|
}
|
|
message PaybackRequest{
|
|
string mchid = 1;
|
|
string pay_channel = 2;
|
|
string pay_id = 3;
|
|
string event_type = 4;
|
|
}
|
|
message PaybackResp{
|
|
string out_trade_no = 1;
|
|
string trade_state = 2;
|
|
string message = 3;
|
|
}
|
|
message GetPayTransOutTradeNoRequest{
|
|
string appid = 1;
|
|
string mchid = 2;
|
|
string out_trade_no = 3;
|
|
}
|
|
message GetPayTransactionResp{
|
|
GetPayTransaction data = 1;
|
|
}
|
|
message GetPayTransaction{
|
|
string appid = 1;
|
|
string mchid = 2;
|
|
}
|
|
message CloseBillRequest{
|
|
string transaction_id = 1;
|
|
}
|