package gopay const ( payURL = "https://rummylotus.online/api/recharge/create" withdrawURL = "https://rummylotus.online/api/deposit/create" mid = "2024100038" key = "326eb5a2f78a4dacb4780104ba16030c" ) type PayReq struct { Amount int64 `json:"amount"` // 订单金额,整数,单位分,举例:10000 Currency string `json:"currency"` // 货币,举例:INR MerID string `json:"merId"` // 商户号,举例:2023100001 NotifyURL string `json:"notifyUrl"` // 异步回调通知地址 OrderID string `json:"orderId"` // 商户订单号 Type int `json:"type"` // 类型,默认: 1 ReturnURL string `json:"returnUrl"` // 订单完成同步跳转地址 Sign string `json:"sign"` // 签名值,详情见1 签名说明 UserName string `json:"userName,omitempty"` // 用户名 (可选) Email string `json:"email,omitempty"` // 邮箱 (可选) Mobile string `json:"mobile,omitempty"` // 手机号 (可选) } type PayResp struct { Code int `json:"code"` // 状态码,200 表示提单成功,400 表示提单失败 Message string `json:"message"` // 状态信息,"SUCCESS" 表示成功,"FAIL" 表示失败 Data struct { ID int `json:"id"` // 平台订单号 MerID string `json:"merId"` // 商户号 OrderID string `json:"orderId"` // 商户订单号 Amount int `json:"amount"` // 金额 Fee int `json:"fee"` // 手续费 PayLink string `json:"payLink"` // 支付链接地址 } `json:"data"` // 数据字段 } type PayCallbackReq struct { Code int `json:"code"` // 状态码,200 表示支付成功 Message string `json:"message"` // 状态信息,"SUCCESS" 表示成功,"FAIL" 表示失败 Data struct { MerID string `json:"merId"` // 商户号 ID string `json:"id"` // 平台订单号 OrderID string `json:"orderId"` // 商户订单号 OperatorNum string `json:"operatorNum,omitempty"` // UTR,此参数有可能不参与回调,建议判空是否参与验签 (可选) Amount string `json:"amount"` // 金额 Fee string `json:"fee"` // 手续费 Currency string `json:"currency"` // 货币类型 Sign string `json:"sign"` // 签名值,详情见1 签名说明 } `json:"data"` // 数据字段 } type WithdrawReq struct { Amount int64 `json:"amount"` // 订单金额,整数,单位分,举例:10000 Currency string `json:"currency"` // 货币,举例:INR MerID string `json:"merId"` // 商户号,举例:2023100001 NotifyURL string `json:"notifyUrl"` // 异步回调通知地址 OrderID string `json:"orderId"` // 商户订单号 Type int `json:"type"` // 类型,默认: 1 BankCode string `json:"bankCode"` // IFSC码,11位 Account string `json:"account"` // 收款账号 Sign string `json:"sign"` // 签名值,详情见1 签名说明 UserName string `json:"userName"` // 用户名 Email string `json:"email"` // 邮箱 Mobile string `json:"mobile"` // 手机号 } type WithdrawResp struct { Code int `json:"code"` // 状态码,200 表示提单成功,400 表示提单失败 Message string `json:"message"` // 状态信息,"SUCCESS" 表示成功,"FAIL" 表示失败 Data struct { ID int `json:"id"` // 平台订单号 MerID string `json:"merId"` // 商户号 OrderID string `json:"orderId"` // 商户订单号 Amount int `json:"amount"` // 金额 Fee int `json:"fee"` // 手续费 } `json:"data"` // 数据字段 } type WithdrawCallbackReq struct { Code int `json:"code"` // 状态码,200 表示提现成功,400 表示提现失败 Message string `json:"message"` // 状态信息,"SUCCESS" 表示成功,"FAIL" 表示失败 Data struct { MerID string `json:"merId"` // 商户号 ID string `json:"id"` // 平台订单号 OrderID string `json:"orderId"` // 商户订单号 Amount string `json:"amount"` // 金额 Fee string `json:"fee"` // 手续费 Currency string `json:"currency"` // 货币类型 Sign string `json:"sign"` // 签名值,详情见1 签名说明 Utr string `json:"utr"` } `json:"data"` // 数据字段 }