Files
full/module/finance/wallet/proto/payment.proto

80 lines
2.9 KiB
Protocol Buffer
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
syntax = "proto3";
package wallet;
option go_package = "bsm/full/module/finance/wallet/pb;wallet";
import "module/finance/wallet/proto/const.proto";
service Payment {
rpc Hello(blocks.Empty) returns (PaymentReply) {}
//获取平台支持的支付网关
rpc Way(WayRequest) returns (WayReply) {}
//获取支付的详情
rpc Get(blocks.IdentRequest) returns (PaymentItem){}
//支付-电商订单
rpc ByOrder (OrderRequest) returns (PaymentReply) {};
//支付-充值
rpc ByCharge (ChargeRequest) returns (PaymentReply) {};
//回调更新支付的结果和状态
rpc Callback (CallbackRequest) returns (blocks.StatusReply) {};
}
message WayRequest {
string platform=1;//平台
}
message WayReply {
repeated WayItem way=1; //支付通道列表
}
message WayItem {
string ident=1; //支付通道标识
string title=2; //支付通道标题
string intro=3; //支付通道说明
string args=4; //支付通道相关参数
}
message PaymentItem {
string order_no = 1; // 订单号
string trade_no = 2; // 第三方交易流水号
int32 type = 3; // 类型:1充值;2支付电商订单
int32 pay_channel = 4; // 支付模型WECHATALIPAY,BALANCE
string pay_type = 5; // 支付类型 JSAPI:微信浏览器内支付 APP:app支付 MINI:小程序 NATIVE:Native支付,pc端生成二维码供用户扫码支付,QUICK_MSECURITY_PAY:app支付 QUICK_WAP_WAY:手机网站支付 FAST_INSTANT_TRADE_PAY:pc网站支付
int64 amount = 6; //充值金额 单位为分
string args = 7; // 相关参数
int32 status = 8; // 支付状态
}
message ChargeRequest {
int64 amount = 1; //充值金额 单位为分
string remark = 2; //备注
int32 pay_channel = 3; //支付模型WECHATALIPAY
string pay_type = 4; //支付类型 JSAPI:微信浏览器内支付 APP:app支付 MWEB:H5支付 NATIVE:Native支付,pc端生成二维码供用户扫码支付,QUICK_MSECURITY_PAY:app支付 QUICK_WAP_WAY:手机网站支付 FAST_INSTANT_TRADE_PAY:pc网站支付
string desc=5; //支付描述
string open_id=6; //微信用户的OpenID
}
message OrderRequest {
string order_no = 1; //订单号
int32 pay_channel = 2; //支付模型WECHATALIPAY,BALANCE
string pay_type = 3; //支付类型 JSAPI:微信浏览器内支付 APP:app支付 MINI:小程序 NATIVE:Native支付,pc端生成二维码供用户扫码支付,QUICK_MSECURITY_PAY:app支付 QUICK_WAP_WAY:手机网站支付 FAST_INSTANT_TRADE_PAY:pc网站支付
string password =4; //支付密码
string args = 5; //相关参数
string desc=6; //支付描述
string open_id=7; //微信用户的OpenID
}
message CallbackRequest {
int64 id = 1; // 唯一ID
string identity = 2; // 唯一码
bool callback_status = 3; // 支付回调状态
string callback_msg = 4; // 支付回调结果
}
message PaymentReply {
int64 code =1;
map<string,string> result =2; //预支付返回
}