支付平台接口文档

github 地址: 支付平台代码仓库

请求说明

必须参数说明

如无特殊说明, 接口必须传入以下参数

key 值类型 说明 是否参与签名计算
sign 字符串 所有参数依照规则的计算结果
key 字符串 在支付平台生成的 API KEY
nonce 字符串 随机字符串, 需要保证短时间(10秒)内唯一, 重复nonce的请求会被拒绝

签名计算规则

  1. 将所有参数的key按照ASCII码从小到大排序
  2. 参数值为空不参与签名
  3. sign参数不参与签名
  4. 将排序后的参与签名的参数key与value使用URL键值对的格式**(key1=value1&key2=value2)**组成字符串 得到 strA
  5. strA 拼接上 security (在平台生成的 API SECURITY) strA + "&security=" + security 得到 strB
  6. 计算 strB 的 SHA256 (使用 HmacSHA256) 值并转为16进制, 得到签名

示例-JAVA

  1. 引入依赖
<dependency><groupId>live.lingting</groupId><artifactId>payment-sdk</artifactId><version>0.0.2-SNAPSHOT</version>
</dependency>
  1. 签名
import live.lingting.sdk.util.MixUtils;
@SneakyThrows
String sign(String security, Map<String, Object> params) {return MixUtils.sign(security, params)
}

返回值说明

  1. 所有接口返回值都是 json
  2. 所有接口的返回值结构一致

示例

{"code": int,"data": object,"message": string
}

说明

key 值类型 说明
code 纯数字 此次请求状态, 200 表示成功, 其他表示失败!
message 字符串 如果 code 值为 200 , 则本值为 Success, 否则表示此次请求失败原因
data 对象 接口返回数据, 具体内容视接口而定, 可能是 对象, 数组, null

参数说明

通用参数说明

key 值类型 说明
projectTradeNo 字符串 项目交易号, 请在项目内部保证唯一; 注: 长度限制在50位以内
tradeNo 字符串 支付平台交易号, 下单后获取
notifyUrl http地址 回调通知地址, 请保证外网可访问; 注: 长度限制在200以内
amount 字符串 金额, 单位依据支付货币确定, 具体参照下表. 注: 返回值中的amount字段与参数中的amount单位一致; 注: 小数保留4位, 小数点前请不要超过21位

amount [金额] 使用单位

支付货币 单位
CNY

thirdPart [第三方]

第三方 说明
WX 微信支付
ALI 支付宝支付

mode [支付模式]

支付模式 说明
QR 二维码支付
TRANSFER 扫码转账

虚拟货币充值使用流程

#mermaid-svg-V3IU0Gtf5xYlwkZG .label{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);fill:#333;color:#333}#mermaid-svg-V3IU0Gtf5xYlwkZG .label text{fill:#333}#mermaid-svg-V3IU0Gtf5xYlwkZG .node rect,#mermaid-svg-V3IU0Gtf5xYlwkZG .node circle,#mermaid-svg-V3IU0Gtf5xYlwkZG .node ellipse,#mermaid-svg-V3IU0Gtf5xYlwkZG .node polygon,#mermaid-svg-V3IU0Gtf5xYlwkZG .node path{fill:#ECECFF;stroke:#9370db;stroke-width:1px}#mermaid-svg-V3IU0Gtf5xYlwkZG .node .label{text-align:center;fill:#333}#mermaid-svg-V3IU0Gtf5xYlwkZG .node.clickable{cursor:pointer}#mermaid-svg-V3IU0Gtf5xYlwkZG .arrowheadPath{fill:#333}#mermaid-svg-V3IU0Gtf5xYlwkZG .edgePath .path{stroke:#333;stroke-width:1.5px}#mermaid-svg-V3IU0Gtf5xYlwkZG .flowchart-link{stroke:#333;fill:none}#mermaid-svg-V3IU0Gtf5xYlwkZG .edgeLabel{background-color:#e8e8e8;text-align:center}#mermaid-svg-V3IU0Gtf5xYlwkZG .edgeLabel rect{opacity:0.9}#mermaid-svg-V3IU0Gtf5xYlwkZG .edgeLabel span{color:#333}#mermaid-svg-V3IU0Gtf5xYlwkZG .cluster rect{fill:#ffffde;stroke:#aa3;stroke-width:1px}#mermaid-svg-V3IU0Gtf5xYlwkZG .cluster text{fill:#333}#mermaid-svg-V3IU0Gtf5xYlwkZG div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);font-size:12px;background:#ffffde;border:1px solid #aa3;border-radius:2px;pointer-events:none;z-index:100}#mermaid-svg-V3IU0Gtf5xYlwkZG .actor{stroke:#ccf;fill:#ECECFF}#mermaid-svg-V3IU0Gtf5xYlwkZG text.actor>tspan{fill:#000;stroke:none}#mermaid-svg-V3IU0Gtf5xYlwkZG .actor-line{stroke:grey}#mermaid-svg-V3IU0Gtf5xYlwkZG .messageLine0{stroke-width:1.5;stroke-dasharray:none;stroke:#333}#mermaid-svg-V3IU0Gtf5xYlwkZG .messageLine1{stroke-width:1.5;stroke-dasharray:2, 2;stroke:#333}#mermaid-svg-V3IU0Gtf5xYlwkZG #arrowhead path{fill:#333;stroke:#333}#mermaid-svg-V3IU0Gtf5xYlwkZG .sequenceNumber{fill:#fff}#mermaid-svg-V3IU0Gtf5xYlwkZG #sequencenumber{fill:#333}#mermaid-svg-V3IU0Gtf5xYlwkZG #crosshead path{fill:#333;stroke:#333}#mermaid-svg-V3IU0Gtf5xYlwkZG .messageText{fill:#333;stroke:#333}#mermaid-svg-V3IU0Gtf5xYlwkZG .labelBox{stroke:#ccf;fill:#ECECFF}#mermaid-svg-V3IU0Gtf5xYlwkZG .labelText,#mermaid-svg-V3IU0Gtf5xYlwkZG .labelText>tspan{fill:#000;stroke:none}#mermaid-svg-V3IU0Gtf5xYlwkZG .loopText,#mermaid-svg-V3IU0Gtf5xYlwkZG .loopText>tspan{fill:#000;stroke:none}#mermaid-svg-V3IU0Gtf5xYlwkZG .loopLine{stroke-width:2px;stroke-dasharray:2, 2;stroke:#ccf;fill:#ccf}#mermaid-svg-V3IU0Gtf5xYlwkZG .note{stroke:#aa3;fill:#fff5ad}#mermaid-svg-V3IU0Gtf5xYlwkZG .noteText,#mermaid-svg-V3IU0Gtf5xYlwkZG .noteText>tspan{fill:#000;stroke:none}#mermaid-svg-V3IU0Gtf5xYlwkZG .activation0{fill:#f4f4f4;stroke:#666}#mermaid-svg-V3IU0Gtf5xYlwkZG .activation1{fill:#f4f4f4;stroke:#666}#mermaid-svg-V3IU0Gtf5xYlwkZG .activation2{fill:#f4f4f4;stroke:#666}#mermaid-svg-V3IU0Gtf5xYlwkZG .mermaid-main-font{font-family:"trebuchet ms", verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-V3IU0Gtf5xYlwkZG .section{stroke:none;opacity:0.2}#mermaid-svg-V3IU0Gtf5xYlwkZG .section0{fill:rgba(102,102,255,0.49)}#mermaid-svg-V3IU0Gtf5xYlwkZG .section2{fill:#fff400}#mermaid-svg-V3IU0Gtf5xYlwkZG .section1,#mermaid-svg-V3IU0Gtf5xYlwkZG .section3{fill:#fff;opacity:0.2}#mermaid-svg-V3IU0Gtf5xYlwkZG .sectionTitle0{fill:#333}#mermaid-svg-V3IU0Gtf5xYlwkZG .sectionTitle1{fill:#333}#mermaid-svg-V3IU0Gtf5xYlwkZG .sectionTitle2{fill:#333}#mermaid-svg-V3IU0Gtf5xYlwkZG .sectionTitle3{fill:#333}#mermaid-svg-V3IU0Gtf5xYlwkZG .sectionTitle{text-anchor:start;font-size:11px;text-height:14px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-V3IU0Gtf5xYlwkZG .grid .tick{stroke:#d3d3d3;opacity:0.8;shape-rendering:crispEdges}#mermaid-svg-V3IU0Gtf5xYlwkZG .grid .tick text{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-V3IU0Gtf5xYlwkZG .grid path{stroke-width:0}#mermaid-svg-V3IU0Gtf5xYlwkZG .today{fill:none;stroke:red;stroke-width:2px}#mermaid-svg-V3IU0Gtf5xYlwkZG .task{stroke-width:2}#mermaid-svg-V3IU0Gtf5xYlwkZG .taskText{text-anchor:middle;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-V3IU0Gtf5xYlwkZG .taskText:not([font-size]){font-size:11px}#mermaid-svg-V3IU0Gtf5xYlwkZG .taskTextOutsideRight{fill:#000;text-anchor:start;font-size:11px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-V3IU0Gtf5xYlwkZG .taskTextOutsideLeft{fill:#000;text-anchor:end;font-size:11px}#mermaid-svg-V3IU0Gtf5xYlwkZG .task.clickable{cursor:pointer}#mermaid-svg-V3IU0Gtf5xYlwkZG .taskText.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}#mermaid-svg-V3IU0Gtf5xYlwkZG .taskTextOutsideLeft.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}#mermaid-svg-V3IU0Gtf5xYlwkZG .taskTextOutsideRight.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}#mermaid-svg-V3IU0Gtf5xYlwkZG .taskText0,#mermaid-svg-V3IU0Gtf5xYlwkZG .taskText1,#mermaid-svg-V3IU0Gtf5xYlwkZG .taskText2,#mermaid-svg-V3IU0Gtf5xYlwkZG .taskText3{fill:#fff}#mermaid-svg-V3IU0Gtf5xYlwkZG .task0,#mermaid-svg-V3IU0Gtf5xYlwkZG .task1,#mermaid-svg-V3IU0Gtf5xYlwkZG .task2,#mermaid-svg-V3IU0Gtf5xYlwkZG .task3{fill:#8a90dd;stroke:#534fbc}#mermaid-svg-V3IU0Gtf5xYlwkZG .taskTextOutside0,#mermaid-svg-V3IU0Gtf5xYlwkZG .taskTextOutside2{fill:#000}#mermaid-svg-V3IU0Gtf5xYlwkZG .taskTextOutside1,#mermaid-svg-V3IU0Gtf5xYlwkZG .taskTextOutside3{fill:#000}#mermaid-svg-V3IU0Gtf5xYlwkZG .active0,#mermaid-svg-V3IU0Gtf5xYlwkZG .active1,#mermaid-svg-V3IU0Gtf5xYlwkZG .active2,#mermaid-svg-V3IU0Gtf5xYlwkZG .active3{fill:#bfc7ff;stroke:#534fbc}#mermaid-svg-V3IU0Gtf5xYlwkZG .activeText0,#mermaid-svg-V3IU0Gtf5xYlwkZG .activeText1,#mermaid-svg-V3IU0Gtf5xYlwkZG .activeText2,#mermaid-svg-V3IU0Gtf5xYlwkZG .activeText3{fill:#000 !important}#mermaid-svg-V3IU0Gtf5xYlwkZG .done0,#mermaid-svg-V3IU0Gtf5xYlwkZG .done1,#mermaid-svg-V3IU0Gtf5xYlwkZG .done2,#mermaid-svg-V3IU0Gtf5xYlwkZG .done3{stroke:grey;fill:#d3d3d3;stroke-width:2}#mermaid-svg-V3IU0Gtf5xYlwkZG .doneText0,#mermaid-svg-V3IU0Gtf5xYlwkZG .doneText1,#mermaid-svg-V3IU0Gtf5xYlwkZG .doneText2,#mermaid-svg-V3IU0Gtf5xYlwkZG .doneText3{fill:#000 !important}#mermaid-svg-V3IU0Gtf5xYlwkZG .crit0,#mermaid-svg-V3IU0Gtf5xYlwkZG .crit1,#mermaid-svg-V3IU0Gtf5xYlwkZG .crit2,#mermaid-svg-V3IU0Gtf5xYlwkZG .crit3{stroke:#f88;fill:red;stroke-width:2}#mermaid-svg-V3IU0Gtf5xYlwkZG .activeCrit0,#mermaid-svg-V3IU0Gtf5xYlwkZG .activeCrit1,#mermaid-svg-V3IU0Gtf5xYlwkZG .activeCrit2,#mermaid-svg-V3IU0Gtf5xYlwkZG .activeCrit3{stroke:#f88;fill:#bfc7ff;stroke-width:2}#mermaid-svg-V3IU0Gtf5xYlwkZG .doneCrit0,#mermaid-svg-V3IU0Gtf5xYlwkZG .doneCrit1,#mermaid-svg-V3IU0Gtf5xYlwkZG .doneCrit2,#mermaid-svg-V3IU0Gtf5xYlwkZG .doneCrit3{stroke:#f88;fill:#d3d3d3;stroke-width:2;cursor:pointer;shape-rendering:crispEdges}#mermaid-svg-V3IU0Gtf5xYlwkZG .milestone{transform:rotate(45deg) scale(0.8, 0.8)}#mermaid-svg-V3IU0Gtf5xYlwkZG .milestoneText{font-style:italic}#mermaid-svg-V3IU0Gtf5xYlwkZG .doneCritText0,#mermaid-svg-V3IU0Gtf5xYlwkZG .doneCritText1,#mermaid-svg-V3IU0Gtf5xYlwkZG .doneCritText2,#mermaid-svg-V3IU0Gtf5xYlwkZG .doneCritText3{fill:#000 !important}#mermaid-svg-V3IU0Gtf5xYlwkZG .activeCritText0,#mermaid-svg-V3IU0Gtf5xYlwkZG .activeCritText1,#mermaid-svg-V3IU0Gtf5xYlwkZG .activeCritText2,#mermaid-svg-V3IU0Gtf5xYlwkZG .activeCritText3{fill:#000 !important}#mermaid-svg-V3IU0Gtf5xYlwkZG .titleText{text-anchor:middle;font-size:18px;fill:#000;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-V3IU0Gtf5xYlwkZG g.classGroup text{fill:#9370db;stroke:none;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);font-size:10px}#mermaid-svg-V3IU0Gtf5xYlwkZG g.classGroup text .title{font-weight:bolder}#mermaid-svg-V3IU0Gtf5xYlwkZG g.clickable{cursor:pointer}#mermaid-svg-V3IU0Gtf5xYlwkZG g.classGroup rect{fill:#ECECFF;stroke:#9370db}#mermaid-svg-V3IU0Gtf5xYlwkZG g.classGroup line{stroke:#9370db;stroke-width:1}#mermaid-svg-V3IU0Gtf5xYlwkZG .classLabel .box{stroke:none;stroke-width:0;fill:#ECECFF;opacity:0.5}#mermaid-svg-V3IU0Gtf5xYlwkZG .classLabel .label{fill:#9370db;font-size:10px}#mermaid-svg-V3IU0Gtf5xYlwkZG .relation{stroke:#9370db;stroke-width:1;fill:none}#mermaid-svg-V3IU0Gtf5xYlwkZG .dashed-line{stroke-dasharray:3}#mermaid-svg-V3IU0Gtf5xYlwkZG #compositionStart{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-V3IU0Gtf5xYlwkZG #compositionEnd{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-V3IU0Gtf5xYlwkZG #aggregationStart{fill:#ECECFF;stroke:#9370db;stroke-width:1}#mermaid-svg-V3IU0Gtf5xYlwkZG #aggregationEnd{fill:#ECECFF;stroke:#9370db;stroke-width:1}#mermaid-svg-V3IU0Gtf5xYlwkZG #dependencyStart{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-V3IU0Gtf5xYlwkZG #dependencyEnd{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-V3IU0Gtf5xYlwkZG #extensionStart{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-V3IU0Gtf5xYlwkZG #extensionEnd{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-V3IU0Gtf5xYlwkZG .commit-id,#mermaid-svg-V3IU0Gtf5xYlwkZG .commit-msg,#mermaid-svg-V3IU0Gtf5xYlwkZG .branch-label{fill:lightgrey;color:lightgrey;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-V3IU0Gtf5xYlwkZG .pieTitleText{text-anchor:middle;font-size:25px;fill:#000;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-V3IU0Gtf5xYlwkZG .slice{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-V3IU0Gtf5xYlwkZG g.stateGroup text{fill:#9370db;stroke:none;font-size:10px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-V3IU0Gtf5xYlwkZG g.stateGroup text{fill:#9370db;fill:#333;stroke:none;font-size:10px}#mermaid-svg-V3IU0Gtf5xYlwkZG g.statediagram-cluster .cluster-label text{fill:#333}#mermaid-svg-V3IU0Gtf5xYlwkZG g.stateGroup .state-title{font-weight:bolder;fill:#000}#mermaid-svg-V3IU0Gtf5xYlwkZG g.stateGroup rect{fill:#ECECFF;stroke:#9370db}#mermaid-svg-V3IU0Gtf5xYlwkZG g.stateGroup line{stroke:#9370db;stroke-width:1}#mermaid-svg-V3IU0Gtf5xYlwkZG .transition{stroke:#9370db;stroke-width:1;fill:none}#mermaid-svg-V3IU0Gtf5xYlwkZG .stateGroup .composit{fill:white;border-bottom:1px}#mermaid-svg-V3IU0Gtf5xYlwkZG .stateGroup .alt-composit{fill:#e0e0e0;border-bottom:1px}#mermaid-svg-V3IU0Gtf5xYlwkZG .state-note{stroke:#aa3;fill:#fff5ad}#mermaid-svg-V3IU0Gtf5xYlwkZG .state-note text{fill:black;stroke:none;font-size:10px}#mermaid-svg-V3IU0Gtf5xYlwkZG .stateLabel .box{stroke:none;stroke-width:0;fill:#ECECFF;opacity:0.7}#mermaid-svg-V3IU0Gtf5xYlwkZG .edgeLabel text{fill:#333}#mermaid-svg-V3IU0Gtf5xYlwkZG .stateLabel text{fill:#000;font-size:10px;font-weight:bold;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-V3IU0Gtf5xYlwkZG .node circle.state-start{fill:black;stroke:black}#mermaid-svg-V3IU0Gtf5xYlwkZG .node circle.state-end{fill:black;stroke:white;stroke-width:1.5}#mermaid-svg-V3IU0Gtf5xYlwkZG #statediagram-barbEnd{fill:#9370db}#mermaid-svg-V3IU0Gtf5xYlwkZG .statediagram-cluster rect{fill:#ECECFF;stroke:#9370db;stroke-width:1px}#mermaid-svg-V3IU0Gtf5xYlwkZG .statediagram-cluster rect.outer{rx:5px;ry:5px}#mermaid-svg-V3IU0Gtf5xYlwkZG .statediagram-state .divider{stroke:#9370db}#mermaid-svg-V3IU0Gtf5xYlwkZG .statediagram-state .title-state{rx:5px;ry:5px}#mermaid-svg-V3IU0Gtf5xYlwkZG .statediagram-cluster.statediagram-cluster .inner{fill:white}#mermaid-svg-V3IU0Gtf5xYlwkZG .statediagram-cluster.statediagram-cluster-alt .inner{fill:#e0e0e0}#mermaid-svg-V3IU0Gtf5xYlwkZG .statediagram-cluster .inner{rx:0;ry:0}#mermaid-svg-V3IU0Gtf5xYlwkZG .statediagram-state rect.basic{rx:5px;ry:5px}#mermaid-svg-V3IU0Gtf5xYlwkZG .statediagram-state rect.divider{stroke-dasharray:10,10;fill:#efefef}#mermaid-svg-V3IU0Gtf5xYlwkZG .note-edge{stroke-dasharray:5}#mermaid-svg-V3IU0Gtf5xYlwkZG .statediagram-note rect{fill:#fff5ad;stroke:#aa3;stroke-width:1px;rx:0;ry:0}:root{--mermaid-font-family: '"trebuchet ms", verdana, arial';--mermaid-font-family: "Comic Sans MS", "Comic Sans", cursive}#mermaid-svg-V3IU0Gtf5xYlwkZG .error-icon{fill:#522}#mermaid-svg-V3IU0Gtf5xYlwkZG .error-text{fill:#522;stroke:#522}#mermaid-svg-V3IU0Gtf5xYlwkZG .edge-thickness-normal{stroke-width:2px}#mermaid-svg-V3IU0Gtf5xYlwkZG .edge-thickness-thick{stroke-width:3.5px}#mermaid-svg-V3IU0Gtf5xYlwkZG .edge-pattern-solid{stroke-dasharray:0}#mermaid-svg-V3IU0Gtf5xYlwkZG .edge-pattern-dashed{stroke-dasharray:3}#mermaid-svg-V3IU0Gtf5xYlwkZG .edge-pattern-dotted{stroke-dasharray:2}#mermaid-svg-V3IU0Gtf5xYlwkZG .marker{fill:#333}#mermaid-svg-V3IU0Gtf5xYlwkZG .marker.cross{stroke:#333}:root { --mermaid-font-family: "trebuchet ms", verdana, arial;}#mermaid-svg-V3IU0Gtf5xYlwkZG {color: rgba(0, 0, 0, 0.75);font: ;}用户服务端支付平台申请虚拟货币充值预下单请求返回 收款地址,交易号,过期时间展示收款地址在过期时间之前未提交hash,会收到充值失败回调提交Hash(TxId)提交hash请求回调充值结果根据充值结果修改用户数据用户服务端支付平台

虚拟货币请求接口

  1. 返回结果均为实际返回结构中 data 的值
  2. 如无特殊说明, 接口请求参数使用json传递

预下单

请求地址

pay/virtual

请求方式

POST

请求参数

key 值类型 可选/必选 示例 说明
notifyUrl http地址 必选 http://www.baidu.com 回调通知地址
projectTradeNo 字符串 必选 a1231 项目交易号
contract 字符串 必选 USDT 合约, 仅支持 USDT
chain 字符串 必选 OMNI 链, 仅支持 OMNI ETH TRC

返回结果

返回结果示例

{"address": "收款地址","tradeNo": "交易号","expireTime": "过期时间, 如果在过期时间内未提交Hash, 则此次支付为失败, 会收到失败回调, 且不可重试",
}

代码示例-Java

public static void main(String[] args) {MixPay mixPay = new MixPay("服务器地址", "api key", "api security", "回调地址");MixVirtualPayResponse mixVirtualPayResponse = mixPay.virtualPay("项目交易号", SdkContract.USDT,Chain.OMNI);
}

提交hash

在预下单的 expireTime 时间之后, 无法提交hash.

请求地址

pay/virtual/submit

请求方式

POST

请求参数

key 值类型 可选/必选 示例 说明
projectTradeNo 字符串 可选 a1231 项目交易号, 不能和tradeNo字段同时为空
tradeNo 字符串 可选 11131221afv 预下单接口返回的tradeNo字段, 不能和projectTradeNo字段同时为空
hash 字符串 必选 alfdkfahkdsljf 用户填写的hash

返回结果

代码示例-Java

public static void main(String[] args) {MixPay mixPay = new MixPay("服务器地址", "api key", "api security", "回调地址");MixVirtualSubmitResponse mixVirtualSubmitResponse = mixPay.virtualSubmit("平台交易号", "项目交易号", hash);
}

重试

虚拟货币支付收到重试回调后可以尝试重试

每次尝试重试后, 可能会有新的重试回调

收到失败回调表示不可重试

仅在支付状态为重试时允许重试

请求地址

pay/virtual/retry

请求方式

POST

请求参数

key 值类型 可选/必选 示例 说明
projectTradeNo 字符串 可选 a1231 项目交易号, 不能和tradeNo字段同时为空
tradeNo 字符串 可选 11131221afv 预下单接口返回的tradeNo字段, 不能和projectTradeNo字段同时为空
hash 字符串 可选 alfdkfahkdsljf 重试允许更新Hash, 如果不需要更新, 则留空或者不传

返回结果

返回结果示例

{"tradeNo": "交易号","retryEndTime": "重试截止时间, 示例: 2021-10-13 14:05:20"
}

代码示例-Java

public static void main(String[] args) {MixPay mixPay = new MixPay("服务器地址", "api key", "api security", "回调地址");MixVirtualRetryResponse mixVirtualRetryResponse = mixPay.virtualRetry("平台交易号", "项目交易号", hash);
}

真实货币 QR 支付流程

#mermaid-svg-KpAww0Jt6a92iQB2 .label{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);fill:#333;color:#333}#mermaid-svg-KpAww0Jt6a92iQB2 .label text{fill:#333}#mermaid-svg-KpAww0Jt6a92iQB2 .node rect,#mermaid-svg-KpAww0Jt6a92iQB2 .node circle,#mermaid-svg-KpAww0Jt6a92iQB2 .node ellipse,#mermaid-svg-KpAww0Jt6a92iQB2 .node polygon,#mermaid-svg-KpAww0Jt6a92iQB2 .node path{fill:#ECECFF;stroke:#9370db;stroke-width:1px}#mermaid-svg-KpAww0Jt6a92iQB2 .node .label{text-align:center;fill:#333}#mermaid-svg-KpAww0Jt6a92iQB2 .node.clickable{cursor:pointer}#mermaid-svg-KpAww0Jt6a92iQB2 .arrowheadPath{fill:#333}#mermaid-svg-KpAww0Jt6a92iQB2 .edgePath .path{stroke:#333;stroke-width:1.5px}#mermaid-svg-KpAww0Jt6a92iQB2 .flowchart-link{stroke:#333;fill:none}#mermaid-svg-KpAww0Jt6a92iQB2 .edgeLabel{background-color:#e8e8e8;text-align:center}#mermaid-svg-KpAww0Jt6a92iQB2 .edgeLabel rect{opacity:0.9}#mermaid-svg-KpAww0Jt6a92iQB2 .edgeLabel span{color:#333}#mermaid-svg-KpAww0Jt6a92iQB2 .cluster rect{fill:#ffffde;stroke:#aa3;stroke-width:1px}#mermaid-svg-KpAww0Jt6a92iQB2 .cluster text{fill:#333}#mermaid-svg-KpAww0Jt6a92iQB2 div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);font-size:12px;background:#ffffde;border:1px solid #aa3;border-radius:2px;pointer-events:none;z-index:100}#mermaid-svg-KpAww0Jt6a92iQB2 .actor{stroke:#ccf;fill:#ECECFF}#mermaid-svg-KpAww0Jt6a92iQB2 text.actor>tspan{fill:#000;stroke:none}#mermaid-svg-KpAww0Jt6a92iQB2 .actor-line{stroke:grey}#mermaid-svg-KpAww0Jt6a92iQB2 .messageLine0{stroke-width:1.5;stroke-dasharray:none;stroke:#333}#mermaid-svg-KpAww0Jt6a92iQB2 .messageLine1{stroke-width:1.5;stroke-dasharray:2, 2;stroke:#333}#mermaid-svg-KpAww0Jt6a92iQB2 #arrowhead path{fill:#333;stroke:#333}#mermaid-svg-KpAww0Jt6a92iQB2 .sequenceNumber{fill:#fff}#mermaid-svg-KpAww0Jt6a92iQB2 #sequencenumber{fill:#333}#mermaid-svg-KpAww0Jt6a92iQB2 #crosshead path{fill:#333;stroke:#333}#mermaid-svg-KpAww0Jt6a92iQB2 .messageText{fill:#333;stroke:#333}#mermaid-svg-KpAww0Jt6a92iQB2 .labelBox{stroke:#ccf;fill:#ECECFF}#mermaid-svg-KpAww0Jt6a92iQB2 .labelText,#mermaid-svg-KpAww0Jt6a92iQB2 .labelText>tspan{fill:#000;stroke:none}#mermaid-svg-KpAww0Jt6a92iQB2 .loopText,#mermaid-svg-KpAww0Jt6a92iQB2 .loopText>tspan{fill:#000;stroke:none}#mermaid-svg-KpAww0Jt6a92iQB2 .loopLine{stroke-width:2px;stroke-dasharray:2, 2;stroke:#ccf;fill:#ccf}#mermaid-svg-KpAww0Jt6a92iQB2 .note{stroke:#aa3;fill:#fff5ad}#mermaid-svg-KpAww0Jt6a92iQB2 .noteText,#mermaid-svg-KpAww0Jt6a92iQB2 .noteText>tspan{fill:#000;stroke:none}#mermaid-svg-KpAww0Jt6a92iQB2 .activation0{fill:#f4f4f4;stroke:#666}#mermaid-svg-KpAww0Jt6a92iQB2 .activation1{fill:#f4f4f4;stroke:#666}#mermaid-svg-KpAww0Jt6a92iQB2 .activation2{fill:#f4f4f4;stroke:#666}#mermaid-svg-KpAww0Jt6a92iQB2 .mermaid-main-font{font-family:"trebuchet ms", verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-KpAww0Jt6a92iQB2 .section{stroke:none;opacity:0.2}#mermaid-svg-KpAww0Jt6a92iQB2 .section0{fill:rgba(102,102,255,0.49)}#mermaid-svg-KpAww0Jt6a92iQB2 .section2{fill:#fff400}#mermaid-svg-KpAww0Jt6a92iQB2 .section1,#mermaid-svg-KpAww0Jt6a92iQB2 .section3{fill:#fff;opacity:0.2}#mermaid-svg-KpAww0Jt6a92iQB2 .sectionTitle0{fill:#333}#mermaid-svg-KpAww0Jt6a92iQB2 .sectionTitle1{fill:#333}#mermaid-svg-KpAww0Jt6a92iQB2 .sectionTitle2{fill:#333}#mermaid-svg-KpAww0Jt6a92iQB2 .sectionTitle3{fill:#333}#mermaid-svg-KpAww0Jt6a92iQB2 .sectionTitle{text-anchor:start;font-size:11px;text-height:14px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-KpAww0Jt6a92iQB2 .grid .tick{stroke:#d3d3d3;opacity:0.8;shape-rendering:crispEdges}#mermaid-svg-KpAww0Jt6a92iQB2 .grid .tick text{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-KpAww0Jt6a92iQB2 .grid path{stroke-width:0}#mermaid-svg-KpAww0Jt6a92iQB2 .today{fill:none;stroke:red;stroke-width:2px}#mermaid-svg-KpAww0Jt6a92iQB2 .task{stroke-width:2}#mermaid-svg-KpAww0Jt6a92iQB2 .taskText{text-anchor:middle;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-KpAww0Jt6a92iQB2 .taskText:not([font-size]){font-size:11px}#mermaid-svg-KpAww0Jt6a92iQB2 .taskTextOutsideRight{fill:#000;text-anchor:start;font-size:11px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-KpAww0Jt6a92iQB2 .taskTextOutsideLeft{fill:#000;text-anchor:end;font-size:11px}#mermaid-svg-KpAww0Jt6a92iQB2 .task.clickable{cursor:pointer}#mermaid-svg-KpAww0Jt6a92iQB2 .taskText.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}#mermaid-svg-KpAww0Jt6a92iQB2 .taskTextOutsideLeft.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}#mermaid-svg-KpAww0Jt6a92iQB2 .taskTextOutsideRight.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}#mermaid-svg-KpAww0Jt6a92iQB2 .taskText0,#mermaid-svg-KpAww0Jt6a92iQB2 .taskText1,#mermaid-svg-KpAww0Jt6a92iQB2 .taskText2,#mermaid-svg-KpAww0Jt6a92iQB2 .taskText3{fill:#fff}#mermaid-svg-KpAww0Jt6a92iQB2 .task0,#mermaid-svg-KpAww0Jt6a92iQB2 .task1,#mermaid-svg-KpAww0Jt6a92iQB2 .task2,#mermaid-svg-KpAww0Jt6a92iQB2 .task3{fill:#8a90dd;stroke:#534fbc}#mermaid-svg-KpAww0Jt6a92iQB2 .taskTextOutside0,#mermaid-svg-KpAww0Jt6a92iQB2 .taskTextOutside2{fill:#000}#mermaid-svg-KpAww0Jt6a92iQB2 .taskTextOutside1,#mermaid-svg-KpAww0Jt6a92iQB2 .taskTextOutside3{fill:#000}#mermaid-svg-KpAww0Jt6a92iQB2 .active0,#mermaid-svg-KpAww0Jt6a92iQB2 .active1,#mermaid-svg-KpAww0Jt6a92iQB2 .active2,#mermaid-svg-KpAww0Jt6a92iQB2 .active3{fill:#bfc7ff;stroke:#534fbc}#mermaid-svg-KpAww0Jt6a92iQB2 .activeText0,#mermaid-svg-KpAww0Jt6a92iQB2 .activeText1,#mermaid-svg-KpAww0Jt6a92iQB2 .activeText2,#mermaid-svg-KpAww0Jt6a92iQB2 .activeText3{fill:#000 !important}#mermaid-svg-KpAww0Jt6a92iQB2 .done0,#mermaid-svg-KpAww0Jt6a92iQB2 .done1,#mermaid-svg-KpAww0Jt6a92iQB2 .done2,#mermaid-svg-KpAww0Jt6a92iQB2 .done3{stroke:grey;fill:#d3d3d3;stroke-width:2}#mermaid-svg-KpAww0Jt6a92iQB2 .doneText0,#mermaid-svg-KpAww0Jt6a92iQB2 .doneText1,#mermaid-svg-KpAww0Jt6a92iQB2 .doneText2,#mermaid-svg-KpAww0Jt6a92iQB2 .doneText3{fill:#000 !important}#mermaid-svg-KpAww0Jt6a92iQB2 .crit0,#mermaid-svg-KpAww0Jt6a92iQB2 .crit1,#mermaid-svg-KpAww0Jt6a92iQB2 .crit2,#mermaid-svg-KpAww0Jt6a92iQB2 .crit3{stroke:#f88;fill:red;stroke-width:2}#mermaid-svg-KpAww0Jt6a92iQB2 .activeCrit0,#mermaid-svg-KpAww0Jt6a92iQB2 .activeCrit1,#mermaid-svg-KpAww0Jt6a92iQB2 .activeCrit2,#mermaid-svg-KpAww0Jt6a92iQB2 .activeCrit3{stroke:#f88;fill:#bfc7ff;stroke-width:2}#mermaid-svg-KpAww0Jt6a92iQB2 .doneCrit0,#mermaid-svg-KpAww0Jt6a92iQB2 .doneCrit1,#mermaid-svg-KpAww0Jt6a92iQB2 .doneCrit2,#mermaid-svg-KpAww0Jt6a92iQB2 .doneCrit3{stroke:#f88;fill:#d3d3d3;stroke-width:2;cursor:pointer;shape-rendering:crispEdges}#mermaid-svg-KpAww0Jt6a92iQB2 .milestone{transform:rotate(45deg) scale(0.8, 0.8)}#mermaid-svg-KpAww0Jt6a92iQB2 .milestoneText{font-style:italic}#mermaid-svg-KpAww0Jt6a92iQB2 .doneCritText0,#mermaid-svg-KpAww0Jt6a92iQB2 .doneCritText1,#mermaid-svg-KpAww0Jt6a92iQB2 .doneCritText2,#mermaid-svg-KpAww0Jt6a92iQB2 .doneCritText3{fill:#000 !important}#mermaid-svg-KpAww0Jt6a92iQB2 .activeCritText0,#mermaid-svg-KpAww0Jt6a92iQB2 .activeCritText1,#mermaid-svg-KpAww0Jt6a92iQB2 .activeCritText2,#mermaid-svg-KpAww0Jt6a92iQB2 .activeCritText3{fill:#000 !important}#mermaid-svg-KpAww0Jt6a92iQB2 .titleText{text-anchor:middle;font-size:18px;fill:#000;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-KpAww0Jt6a92iQB2 g.classGroup text{fill:#9370db;stroke:none;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);font-size:10px}#mermaid-svg-KpAww0Jt6a92iQB2 g.classGroup text .title{font-weight:bolder}#mermaid-svg-KpAww0Jt6a92iQB2 g.clickable{cursor:pointer}#mermaid-svg-KpAww0Jt6a92iQB2 g.classGroup rect{fill:#ECECFF;stroke:#9370db}#mermaid-svg-KpAww0Jt6a92iQB2 g.classGroup line{stroke:#9370db;stroke-width:1}#mermaid-svg-KpAww0Jt6a92iQB2 .classLabel .box{stroke:none;stroke-width:0;fill:#ECECFF;opacity:0.5}#mermaid-svg-KpAww0Jt6a92iQB2 .classLabel .label{fill:#9370db;font-size:10px}#mermaid-svg-KpAww0Jt6a92iQB2 .relation{stroke:#9370db;stroke-width:1;fill:none}#mermaid-svg-KpAww0Jt6a92iQB2 .dashed-line{stroke-dasharray:3}#mermaid-svg-KpAww0Jt6a92iQB2 #compositionStart{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-KpAww0Jt6a92iQB2 #compositionEnd{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-KpAww0Jt6a92iQB2 #aggregationStart{fill:#ECECFF;stroke:#9370db;stroke-width:1}#mermaid-svg-KpAww0Jt6a92iQB2 #aggregationEnd{fill:#ECECFF;stroke:#9370db;stroke-width:1}#mermaid-svg-KpAww0Jt6a92iQB2 #dependencyStart{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-KpAww0Jt6a92iQB2 #dependencyEnd{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-KpAww0Jt6a92iQB2 #extensionStart{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-KpAww0Jt6a92iQB2 #extensionEnd{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-KpAww0Jt6a92iQB2 .commit-id,#mermaid-svg-KpAww0Jt6a92iQB2 .commit-msg,#mermaid-svg-KpAww0Jt6a92iQB2 .branch-label{fill:lightgrey;color:lightgrey;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-KpAww0Jt6a92iQB2 .pieTitleText{text-anchor:middle;font-size:25px;fill:#000;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-KpAww0Jt6a92iQB2 .slice{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-KpAww0Jt6a92iQB2 g.stateGroup text{fill:#9370db;stroke:none;font-size:10px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-KpAww0Jt6a92iQB2 g.stateGroup text{fill:#9370db;fill:#333;stroke:none;font-size:10px}#mermaid-svg-KpAww0Jt6a92iQB2 g.statediagram-cluster .cluster-label text{fill:#333}#mermaid-svg-KpAww0Jt6a92iQB2 g.stateGroup .state-title{font-weight:bolder;fill:#000}#mermaid-svg-KpAww0Jt6a92iQB2 g.stateGroup rect{fill:#ECECFF;stroke:#9370db}#mermaid-svg-KpAww0Jt6a92iQB2 g.stateGroup line{stroke:#9370db;stroke-width:1}#mermaid-svg-KpAww0Jt6a92iQB2 .transition{stroke:#9370db;stroke-width:1;fill:none}#mermaid-svg-KpAww0Jt6a92iQB2 .stateGroup .composit{fill:white;border-bottom:1px}#mermaid-svg-KpAww0Jt6a92iQB2 .stateGroup .alt-composit{fill:#e0e0e0;border-bottom:1px}#mermaid-svg-KpAww0Jt6a92iQB2 .state-note{stroke:#aa3;fill:#fff5ad}#mermaid-svg-KpAww0Jt6a92iQB2 .state-note text{fill:black;stroke:none;font-size:10px}#mermaid-svg-KpAww0Jt6a92iQB2 .stateLabel .box{stroke:none;stroke-width:0;fill:#ECECFF;opacity:0.7}#mermaid-svg-KpAww0Jt6a92iQB2 .edgeLabel text{fill:#333}#mermaid-svg-KpAww0Jt6a92iQB2 .stateLabel text{fill:#000;font-size:10px;font-weight:bold;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-KpAww0Jt6a92iQB2 .node circle.state-start{fill:black;stroke:black}#mermaid-svg-KpAww0Jt6a92iQB2 .node circle.state-end{fill:black;stroke:white;stroke-width:1.5}#mermaid-svg-KpAww0Jt6a92iQB2 #statediagram-barbEnd{fill:#9370db}#mermaid-svg-KpAww0Jt6a92iQB2 .statediagram-cluster rect{fill:#ECECFF;stroke:#9370db;stroke-width:1px}#mermaid-svg-KpAww0Jt6a92iQB2 .statediagram-cluster rect.outer{rx:5px;ry:5px}#mermaid-svg-KpAww0Jt6a92iQB2 .statediagram-state .divider{stroke:#9370db}#mermaid-svg-KpAww0Jt6a92iQB2 .statediagram-state .title-state{rx:5px;ry:5px}#mermaid-svg-KpAww0Jt6a92iQB2 .statediagram-cluster.statediagram-cluster .inner{fill:white}#mermaid-svg-KpAww0Jt6a92iQB2 .statediagram-cluster.statediagram-cluster-alt .inner{fill:#e0e0e0}#mermaid-svg-KpAww0Jt6a92iQB2 .statediagram-cluster .inner{rx:0;ry:0}#mermaid-svg-KpAww0Jt6a92iQB2 .statediagram-state rect.basic{rx:5px;ry:5px}#mermaid-svg-KpAww0Jt6a92iQB2 .statediagram-state rect.divider{stroke-dasharray:10,10;fill:#efefef}#mermaid-svg-KpAww0Jt6a92iQB2 .note-edge{stroke-dasharray:5}#mermaid-svg-KpAww0Jt6a92iQB2 .statediagram-note rect{fill:#fff5ad;stroke:#aa3;stroke-width:1px;rx:0;ry:0}:root{--mermaid-font-family: '"trebuchet ms", verdana, arial';--mermaid-font-family: "Comic Sans MS", "Comic Sans", cursive}#mermaid-svg-KpAww0Jt6a92iQB2 .error-icon{fill:#522}#mermaid-svg-KpAww0Jt6a92iQB2 .error-text{fill:#522;stroke:#522}#mermaid-svg-KpAww0Jt6a92iQB2 .edge-thickness-normal{stroke-width:2px}#mermaid-svg-KpAww0Jt6a92iQB2 .edge-thickness-thick{stroke-width:3.5px}#mermaid-svg-KpAww0Jt6a92iQB2 .edge-pattern-solid{stroke-dasharray:0}#mermaid-svg-KpAww0Jt6a92iQB2 .edge-pattern-dashed{stroke-dasharray:3}#mermaid-svg-KpAww0Jt6a92iQB2 .edge-pattern-dotted{stroke-dasharray:2}#mermaid-svg-KpAww0Jt6a92iQB2 .marker{fill:#333}#mermaid-svg-KpAww0Jt6a92iQB2 .marker.cross{stroke:#333}:root { --mermaid-font-family: "trebuchet ms", verdana, arial;}#mermaid-svg-KpAww0Jt6a92iQB2 {color: rgba(0, 0, 0, 0.75);font: ;}用户服务端支付平台申请真实货币 QR 充值真实货币下单返回 二维码信息,交易号将二维码信息转为二维码展示给用户扫描二维码, 进入第三方付款回调充值结果用户服务端支付平台

真实货币 TRANSFER 支付流程

#mermaid-svg-zL416wcg5pdWPmIA .label{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);fill:#333;color:#333}#mermaid-svg-zL416wcg5pdWPmIA .label text{fill:#333}#mermaid-svg-zL416wcg5pdWPmIA .node rect,#mermaid-svg-zL416wcg5pdWPmIA .node circle,#mermaid-svg-zL416wcg5pdWPmIA .node ellipse,#mermaid-svg-zL416wcg5pdWPmIA .node polygon,#mermaid-svg-zL416wcg5pdWPmIA .node path{fill:#ECECFF;stroke:#9370db;stroke-width:1px}#mermaid-svg-zL416wcg5pdWPmIA .node .label{text-align:center;fill:#333}#mermaid-svg-zL416wcg5pdWPmIA .node.clickable{cursor:pointer}#mermaid-svg-zL416wcg5pdWPmIA .arrowheadPath{fill:#333}#mermaid-svg-zL416wcg5pdWPmIA .edgePath .path{stroke:#333;stroke-width:1.5px}#mermaid-svg-zL416wcg5pdWPmIA .flowchart-link{stroke:#333;fill:none}#mermaid-svg-zL416wcg5pdWPmIA .edgeLabel{background-color:#e8e8e8;text-align:center}#mermaid-svg-zL416wcg5pdWPmIA .edgeLabel rect{opacity:0.9}#mermaid-svg-zL416wcg5pdWPmIA .edgeLabel span{color:#333}#mermaid-svg-zL416wcg5pdWPmIA .cluster rect{fill:#ffffde;stroke:#aa3;stroke-width:1px}#mermaid-svg-zL416wcg5pdWPmIA .cluster text{fill:#333}#mermaid-svg-zL416wcg5pdWPmIA div.mermaidTooltip{position:absolute;text-align:center;max-width:200px;padding:2px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);font-size:12px;background:#ffffde;border:1px solid #aa3;border-radius:2px;pointer-events:none;z-index:100}#mermaid-svg-zL416wcg5pdWPmIA .actor{stroke:#ccf;fill:#ECECFF}#mermaid-svg-zL416wcg5pdWPmIA text.actor>tspan{fill:#000;stroke:none}#mermaid-svg-zL416wcg5pdWPmIA .actor-line{stroke:grey}#mermaid-svg-zL416wcg5pdWPmIA .messageLine0{stroke-width:1.5;stroke-dasharray:none;stroke:#333}#mermaid-svg-zL416wcg5pdWPmIA .messageLine1{stroke-width:1.5;stroke-dasharray:2, 2;stroke:#333}#mermaid-svg-zL416wcg5pdWPmIA #arrowhead path{fill:#333;stroke:#333}#mermaid-svg-zL416wcg5pdWPmIA .sequenceNumber{fill:#fff}#mermaid-svg-zL416wcg5pdWPmIA #sequencenumber{fill:#333}#mermaid-svg-zL416wcg5pdWPmIA #crosshead path{fill:#333;stroke:#333}#mermaid-svg-zL416wcg5pdWPmIA .messageText{fill:#333;stroke:#333}#mermaid-svg-zL416wcg5pdWPmIA .labelBox{stroke:#ccf;fill:#ECECFF}#mermaid-svg-zL416wcg5pdWPmIA .labelText,#mermaid-svg-zL416wcg5pdWPmIA .labelText>tspan{fill:#000;stroke:none}#mermaid-svg-zL416wcg5pdWPmIA .loopText,#mermaid-svg-zL416wcg5pdWPmIA .loopText>tspan{fill:#000;stroke:none}#mermaid-svg-zL416wcg5pdWPmIA .loopLine{stroke-width:2px;stroke-dasharray:2, 2;stroke:#ccf;fill:#ccf}#mermaid-svg-zL416wcg5pdWPmIA .note{stroke:#aa3;fill:#fff5ad}#mermaid-svg-zL416wcg5pdWPmIA .noteText,#mermaid-svg-zL416wcg5pdWPmIA .noteText>tspan{fill:#000;stroke:none}#mermaid-svg-zL416wcg5pdWPmIA .activation0{fill:#f4f4f4;stroke:#666}#mermaid-svg-zL416wcg5pdWPmIA .activation1{fill:#f4f4f4;stroke:#666}#mermaid-svg-zL416wcg5pdWPmIA .activation2{fill:#f4f4f4;stroke:#666}#mermaid-svg-zL416wcg5pdWPmIA .mermaid-main-font{font-family:"trebuchet ms", verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-zL416wcg5pdWPmIA .section{stroke:none;opacity:0.2}#mermaid-svg-zL416wcg5pdWPmIA .section0{fill:rgba(102,102,255,0.49)}#mermaid-svg-zL416wcg5pdWPmIA .section2{fill:#fff400}#mermaid-svg-zL416wcg5pdWPmIA .section1,#mermaid-svg-zL416wcg5pdWPmIA .section3{fill:#fff;opacity:0.2}#mermaid-svg-zL416wcg5pdWPmIA .sectionTitle0{fill:#333}#mermaid-svg-zL416wcg5pdWPmIA .sectionTitle1{fill:#333}#mermaid-svg-zL416wcg5pdWPmIA .sectionTitle2{fill:#333}#mermaid-svg-zL416wcg5pdWPmIA .sectionTitle3{fill:#333}#mermaid-svg-zL416wcg5pdWPmIA .sectionTitle{text-anchor:start;font-size:11px;text-height:14px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-zL416wcg5pdWPmIA .grid .tick{stroke:#d3d3d3;opacity:0.8;shape-rendering:crispEdges}#mermaid-svg-zL416wcg5pdWPmIA .grid .tick text{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-zL416wcg5pdWPmIA .grid path{stroke-width:0}#mermaid-svg-zL416wcg5pdWPmIA .today{fill:none;stroke:red;stroke-width:2px}#mermaid-svg-zL416wcg5pdWPmIA .task{stroke-width:2}#mermaid-svg-zL416wcg5pdWPmIA .taskText{text-anchor:middle;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-zL416wcg5pdWPmIA .taskText:not([font-size]){font-size:11px}#mermaid-svg-zL416wcg5pdWPmIA .taskTextOutsideRight{fill:#000;text-anchor:start;font-size:11px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-zL416wcg5pdWPmIA .taskTextOutsideLeft{fill:#000;text-anchor:end;font-size:11px}#mermaid-svg-zL416wcg5pdWPmIA .task.clickable{cursor:pointer}#mermaid-svg-zL416wcg5pdWPmIA .taskText.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}#mermaid-svg-zL416wcg5pdWPmIA .taskTextOutsideLeft.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}#mermaid-svg-zL416wcg5pdWPmIA .taskTextOutsideRight.clickable{cursor:pointer;fill:#003163 !important;font-weight:bold}#mermaid-svg-zL416wcg5pdWPmIA .taskText0,#mermaid-svg-zL416wcg5pdWPmIA .taskText1,#mermaid-svg-zL416wcg5pdWPmIA .taskText2,#mermaid-svg-zL416wcg5pdWPmIA .taskText3{fill:#fff}#mermaid-svg-zL416wcg5pdWPmIA .task0,#mermaid-svg-zL416wcg5pdWPmIA .task1,#mermaid-svg-zL416wcg5pdWPmIA .task2,#mermaid-svg-zL416wcg5pdWPmIA .task3{fill:#8a90dd;stroke:#534fbc}#mermaid-svg-zL416wcg5pdWPmIA .taskTextOutside0,#mermaid-svg-zL416wcg5pdWPmIA .taskTextOutside2{fill:#000}#mermaid-svg-zL416wcg5pdWPmIA .taskTextOutside1,#mermaid-svg-zL416wcg5pdWPmIA .taskTextOutside3{fill:#000}#mermaid-svg-zL416wcg5pdWPmIA .active0,#mermaid-svg-zL416wcg5pdWPmIA .active1,#mermaid-svg-zL416wcg5pdWPmIA .active2,#mermaid-svg-zL416wcg5pdWPmIA .active3{fill:#bfc7ff;stroke:#534fbc}#mermaid-svg-zL416wcg5pdWPmIA .activeText0,#mermaid-svg-zL416wcg5pdWPmIA .activeText1,#mermaid-svg-zL416wcg5pdWPmIA .activeText2,#mermaid-svg-zL416wcg5pdWPmIA .activeText3{fill:#000 !important}#mermaid-svg-zL416wcg5pdWPmIA .done0,#mermaid-svg-zL416wcg5pdWPmIA .done1,#mermaid-svg-zL416wcg5pdWPmIA .done2,#mermaid-svg-zL416wcg5pdWPmIA .done3{stroke:grey;fill:#d3d3d3;stroke-width:2}#mermaid-svg-zL416wcg5pdWPmIA .doneText0,#mermaid-svg-zL416wcg5pdWPmIA .doneText1,#mermaid-svg-zL416wcg5pdWPmIA .doneText2,#mermaid-svg-zL416wcg5pdWPmIA .doneText3{fill:#000 !important}#mermaid-svg-zL416wcg5pdWPmIA .crit0,#mermaid-svg-zL416wcg5pdWPmIA .crit1,#mermaid-svg-zL416wcg5pdWPmIA .crit2,#mermaid-svg-zL416wcg5pdWPmIA .crit3{stroke:#f88;fill:red;stroke-width:2}#mermaid-svg-zL416wcg5pdWPmIA .activeCrit0,#mermaid-svg-zL416wcg5pdWPmIA .activeCrit1,#mermaid-svg-zL416wcg5pdWPmIA .activeCrit2,#mermaid-svg-zL416wcg5pdWPmIA .activeCrit3{stroke:#f88;fill:#bfc7ff;stroke-width:2}#mermaid-svg-zL416wcg5pdWPmIA .doneCrit0,#mermaid-svg-zL416wcg5pdWPmIA .doneCrit1,#mermaid-svg-zL416wcg5pdWPmIA .doneCrit2,#mermaid-svg-zL416wcg5pdWPmIA .doneCrit3{stroke:#f88;fill:#d3d3d3;stroke-width:2;cursor:pointer;shape-rendering:crispEdges}#mermaid-svg-zL416wcg5pdWPmIA .milestone{transform:rotate(45deg) scale(0.8, 0.8)}#mermaid-svg-zL416wcg5pdWPmIA .milestoneText{font-style:italic}#mermaid-svg-zL416wcg5pdWPmIA .doneCritText0,#mermaid-svg-zL416wcg5pdWPmIA .doneCritText1,#mermaid-svg-zL416wcg5pdWPmIA .doneCritText2,#mermaid-svg-zL416wcg5pdWPmIA .doneCritText3{fill:#000 !important}#mermaid-svg-zL416wcg5pdWPmIA .activeCritText0,#mermaid-svg-zL416wcg5pdWPmIA .activeCritText1,#mermaid-svg-zL416wcg5pdWPmIA .activeCritText2,#mermaid-svg-zL416wcg5pdWPmIA .activeCritText3{fill:#000 !important}#mermaid-svg-zL416wcg5pdWPmIA .titleText{text-anchor:middle;font-size:18px;fill:#000;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-zL416wcg5pdWPmIA g.classGroup text{fill:#9370db;stroke:none;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family);font-size:10px}#mermaid-svg-zL416wcg5pdWPmIA g.classGroup text .title{font-weight:bolder}#mermaid-svg-zL416wcg5pdWPmIA g.clickable{cursor:pointer}#mermaid-svg-zL416wcg5pdWPmIA g.classGroup rect{fill:#ECECFF;stroke:#9370db}#mermaid-svg-zL416wcg5pdWPmIA g.classGroup line{stroke:#9370db;stroke-width:1}#mermaid-svg-zL416wcg5pdWPmIA .classLabel .box{stroke:none;stroke-width:0;fill:#ECECFF;opacity:0.5}#mermaid-svg-zL416wcg5pdWPmIA .classLabel .label{fill:#9370db;font-size:10px}#mermaid-svg-zL416wcg5pdWPmIA .relation{stroke:#9370db;stroke-width:1;fill:none}#mermaid-svg-zL416wcg5pdWPmIA .dashed-line{stroke-dasharray:3}#mermaid-svg-zL416wcg5pdWPmIA #compositionStart{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-zL416wcg5pdWPmIA #compositionEnd{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-zL416wcg5pdWPmIA #aggregationStart{fill:#ECECFF;stroke:#9370db;stroke-width:1}#mermaid-svg-zL416wcg5pdWPmIA #aggregationEnd{fill:#ECECFF;stroke:#9370db;stroke-width:1}#mermaid-svg-zL416wcg5pdWPmIA #dependencyStart{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-zL416wcg5pdWPmIA #dependencyEnd{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-zL416wcg5pdWPmIA #extensionStart{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-zL416wcg5pdWPmIA #extensionEnd{fill:#9370db;stroke:#9370db;stroke-width:1}#mermaid-svg-zL416wcg5pdWPmIA .commit-id,#mermaid-svg-zL416wcg5pdWPmIA .commit-msg,#mermaid-svg-zL416wcg5pdWPmIA .branch-label{fill:lightgrey;color:lightgrey;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-zL416wcg5pdWPmIA .pieTitleText{text-anchor:middle;font-size:25px;fill:#000;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-zL416wcg5pdWPmIA .slice{font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-zL416wcg5pdWPmIA g.stateGroup text{fill:#9370db;stroke:none;font-size:10px;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-zL416wcg5pdWPmIA g.stateGroup text{fill:#9370db;fill:#333;stroke:none;font-size:10px}#mermaid-svg-zL416wcg5pdWPmIA g.statediagram-cluster .cluster-label text{fill:#333}#mermaid-svg-zL416wcg5pdWPmIA g.stateGroup .state-title{font-weight:bolder;fill:#000}#mermaid-svg-zL416wcg5pdWPmIA g.stateGroup rect{fill:#ECECFF;stroke:#9370db}#mermaid-svg-zL416wcg5pdWPmIA g.stateGroup line{stroke:#9370db;stroke-width:1}#mermaid-svg-zL416wcg5pdWPmIA .transition{stroke:#9370db;stroke-width:1;fill:none}#mermaid-svg-zL416wcg5pdWPmIA .stateGroup .composit{fill:white;border-bottom:1px}#mermaid-svg-zL416wcg5pdWPmIA .stateGroup .alt-composit{fill:#e0e0e0;border-bottom:1px}#mermaid-svg-zL416wcg5pdWPmIA .state-note{stroke:#aa3;fill:#fff5ad}#mermaid-svg-zL416wcg5pdWPmIA .state-note text{fill:black;stroke:none;font-size:10px}#mermaid-svg-zL416wcg5pdWPmIA .stateLabel .box{stroke:none;stroke-width:0;fill:#ECECFF;opacity:0.7}#mermaid-svg-zL416wcg5pdWPmIA .edgeLabel text{fill:#333}#mermaid-svg-zL416wcg5pdWPmIA .stateLabel text{fill:#000;font-size:10px;font-weight:bold;font-family:'trebuchet ms', verdana, arial;font-family:var(--mermaid-font-family)}#mermaid-svg-zL416wcg5pdWPmIA .node circle.state-start{fill:black;stroke:black}#mermaid-svg-zL416wcg5pdWPmIA .node circle.state-end{fill:black;stroke:white;stroke-width:1.5}#mermaid-svg-zL416wcg5pdWPmIA #statediagram-barbEnd{fill:#9370db}#mermaid-svg-zL416wcg5pdWPmIA .statediagram-cluster rect{fill:#ECECFF;stroke:#9370db;stroke-width:1px}#mermaid-svg-zL416wcg5pdWPmIA .statediagram-cluster rect.outer{rx:5px;ry:5px}#mermaid-svg-zL416wcg5pdWPmIA .statediagram-state .divider{stroke:#9370db}#mermaid-svg-zL416wcg5pdWPmIA .statediagram-state .title-state{rx:5px;ry:5px}#mermaid-svg-zL416wcg5pdWPmIA .statediagram-cluster.statediagram-cluster .inner{fill:white}#mermaid-svg-zL416wcg5pdWPmIA .statediagram-cluster.statediagram-cluster-alt .inner{fill:#e0e0e0}#mermaid-svg-zL416wcg5pdWPmIA .statediagram-cluster .inner{rx:0;ry:0}#mermaid-svg-zL416wcg5pdWPmIA .statediagram-state rect.basic{rx:5px;ry:5px}#mermaid-svg-zL416wcg5pdWPmIA .statediagram-state rect.divider{stroke-dasharray:10,10;fill:#efefef}#mermaid-svg-zL416wcg5pdWPmIA .note-edge{stroke-dasharray:5}#mermaid-svg-zL416wcg5pdWPmIA .statediagram-note rect{fill:#fff5ad;stroke:#aa3;stroke-width:1px;rx:0;ry:0}:root{--mermaid-font-family: '"trebuchet ms", verdana, arial';--mermaid-font-family: "Comic Sans MS", "Comic Sans", cursive}#mermaid-svg-zL416wcg5pdWPmIA .error-icon{fill:#522}#mermaid-svg-zL416wcg5pdWPmIA .error-text{fill:#522;stroke:#522}#mermaid-svg-zL416wcg5pdWPmIA .edge-thickness-normal{stroke-width:2px}#mermaid-svg-zL416wcg5pdWPmIA .edge-thickness-thick{stroke-width:3.5px}#mermaid-svg-zL416wcg5pdWPmIA .edge-pattern-solid{stroke-dasharray:0}#mermaid-svg-zL416wcg5pdWPmIA .edge-pattern-dashed{stroke-dasharray:3}#mermaid-svg-zL416wcg5pdWPmIA .edge-pattern-dotted{stroke-dasharray:2}#mermaid-svg-zL416wcg5pdWPmIA .marker{fill:#333}#mermaid-svg-zL416wcg5pdWPmIA .marker.cross{stroke:#333}:root { --mermaid-font-family: "trebuchet ms", verdana, arial;}#mermaid-svg-zL416wcg5pdWPmIA {color: rgba(0, 0, 0, 0.75);font: ;}用户服务端支付平台申请真实货币 TRANSFER 充值展示从财务获取的收款二维码内部项目通过下面链接获取收款二维码http://192.168.1.7:8092/display/PAY/payment扫描二维码, 进入第三方付款输入付款成功后获得交易号(订单号)真实货币下单回调充值结果用户服务端支付平台

真实货币请求接口

  1. 返回结果均为实际返回结构中 data 的值
  2. 如无特殊说明, 接口请求参数使用json传递

下单

请求地址

pay

请求方式

POST

请求参数

key 值类型 可选/必选 示例 说明
notifyUrl http地址 必选 http://www.baidu.com 回调通知地址
projectTradeNo 字符串 必选 a1231 项目交易号
subject 字符串 必选 Q币充值 商品信息
thirdPart 字符串 必选 WX 第三方, 仅支持 WX ALI
mode 字符串 必选 QR 支付模式, 仅支持 QR TRANSFER; 注: WX 不支持 TRANSFET 支付
currency 字符串 必选 CNY 支付货币, 仅支持 CNY
amount 字符串 可选 3.14 支付金额, 保留两位小数, mode值不为TRANSFER时必选
thirdPartTradeNo 字符串 可选 aa123123 第三方交易号, mode值为TRANSFER时必选

返回结果

返回结果示例

{"qr": "二维码信息, mode=QR时不为空","tradeNo": "交易号"
}

代码示例-QR-Java

public static void main(String[] args) {MixPay mixPay = new MixPay("服务器地址", "api key", "api security", "回调地址");MixRealPayResponse mixRealPayResponse = mixPay.realQrPay("12312413", new BigDecimal("0.01"),
ThirdPart.ALI, Currency.CNY, "测试-支付平台");
}

代码示例-TRANSFER-Java

public static void main(String[] args) {MixPay mixPay = new MixPay("服务器地址", "api key", "api security", "回调地址");MixRealPayResponse mixRealPayResponse = mixPay.realTransferPay("12312413", "987618723121",
ThirdPart.ALI, Currency.CNY, "测试-支付平台");
}

共用接口

  1. 返回结果均为实际返回结构中 data 的值
  2. 如无特殊说明, 接口请求参数使用json传递

强制重试

使指定交易强制进入重试阶段

目前仅支持支付货币为 USDT 的交易

仅对当前支付状态为 WAIT 的交易有效

请求地址

forcibly/retry

请求方式

POST

请求参数

key 值类型 可选/必选 示例 说明
projectTradeNo 字符串 可选 a1231 项目交易号, 不能和tradeNo字段同时为空
tradeNo 字符串 可选 11131221afv 预下单接口返回的tradeNo字段, 不能和projectTradeNo字段同时为空

返回结果

代码示例-Java

public static void main(String[] args) {MixPay mixPay = new MixPay("服务器地址", "api key", "api security", "回调地址");MixForciblyRetryResponse mixForciblyRetryResponse = mixPay.forciblyRetry("平台交易号", "项目交易号");
}

强制失败

使指定交易强制失败

目前仅支持支付货币为 USDT 的交易

仅对当前支付状态为 WAITRETRY 的交易有效

如果支付状态为 WAIT, 会先变成 RETRY, 在变成 FAIL

如果支付状态为 RETRY, 会直接进入 FAIL

请求地址

forcibly/fail

请求方式

POST

请求参数

key 值类型 可选/必选 示例 说明
projectTradeNo 字符串 可选 a1231 项目交易号, 不能和tradeNo字段同时为空
tradeNo 字符串 可选 11131221afv 预下单接口返回的tradeNo字段, 不能和projectTradeNo字段同时为空

返回结果

代码示例-Java

public static void main(String[] args) {MixPay mixPay = new MixPay("服务器地址", "api key", "api security", "回调地址");MixForciblyFailResponse mixForciblyFailResponse = mixPay.forciblyFail("平台交易号", "项目交易号");
}

查询

请求地址

query

请求方式

POST

请求参数

key 值类型 可选/必选 示例 说明
projectTradeNo 字符串 可选 a1231 项目交易号, 不能和tradeNo字段同时为空
tradeNo 字符串 可选 11131221afv 预下单接口返回的tradeNo字段, 不能和projectTradeNo字段同时为空

返回结果

返回结果示例

{"tradeNo": "交易号","projectId": "项目id","projectTradeNo": "项目交易号","thirdPartTradeNo": "如果该次支付使用虚拟货币, 该值为支付提交的HASH; 如果该次支付使用真实货币, 该值为第三方的交易号","status": "支付状态  WAIT: 等待支付, RETRT: 重试,SUCCESS: 成功, FAIL: 失败","amount": "支付金额, 示例: 3.14","currency": "支付货币, 如果该次支付使用虚拟货币, 示例: USDT ; 如果该次支付使用真实货币, 示例: CNY","chain": "链, 该次支付使用虚拟货币不为空","retryEndTime": "重试截止时间, 如果支付状态为失败, 且该次支付使用虚拟货币, 则本值不为空; 示例: 2021-10-13 14:05:20","address": "收款地址, 该次支付使用虚拟货币不为空","thirdPart": "第三方, 该次支付使用真实货币不为空","mode":"支付模式, 该次支付使用真实货币不为空","desc":"描述-如果支付状态为失败, 表示失败原因","notifyUrl": "通知地址, 下单时传入的通知地址","notifyStatus": "通知状态, WAIT: 等待, ING: 正在通知, SUCCESS: 成功, FAIL: 失败","completeTime": "完成时间","createTime": "下单时间"
}

代码示例-Java

public static void main(String[] args) {MixPay mixPay = new MixPay("服务器地址", "api key", "api security", "回调地址");MixQueryResponse mixQueryResponse = mixPay.query("平台交易号", "项目交易号");
}

汇率查询

请求地址

rate

请求方式

GET

请求参数

key 值类型 可选/必选 示例 说明
currency 字符串 必选 USDT 支付货币, 仅支持 CNY USDT

返回结果

返回的结果为 1单位指定货币 可兑换多少单位 CNY

注: 真实货币单位参考 http://192.168.1.7/lingting/payment-platform/wikis/API%E4%BD%BF%E7%94%A8%E6%96%87%E6%A1%A3#amount-%E9%87%91%E9%A2%9D-%E4%BD%BF%E7%94%A8%E5%8D%95%E4%BD%8D

注: 虚拟货币单位: 个

返回结果示例

3.14

代码示例-Java

public static void main(String[] args) {MixPay mixPay = new MixPay("服务器地址", "api key", "api security", "回调地址");MixRateResponse mixRateResponse = mixPay.rate("平台交易号", "项目交易号");
}

回调说明

回调方式

POST

回调参数类型

application/json

回调参数

回调参数示例

{"tradeNo": "交易号","projectId": "项目id","projectTradeNo": "项目交易号","thirdPartTradeNo": "如果该次支付使用虚拟货币, 该值为支付提交的HASH; 如果该次支付使用真实货币, 该值为第三方的交易号","status": "支付状态  WAIT: 等待支付, RETRT: 重试,SUCCESS: 成功, FAIL: 失败","amount": "支付金额, 示例: 3.14","currency": "支付货币, 如果该次支付使用虚拟货币, 示例: USDT ; 如果该次支付使用真实货币, 示例: CNY","chain": "链, 该次支付使用虚拟货币不为空","retryEndTime": "重试截止时间, 如果支付状态为失败, 且该次支付使用虚拟货币, 则本值不为空; 示例: 2021-10-13 14:05:20","address": "收款地址, 该次支付使用虚拟货币不为空","thirdPart": "第三方, 该次支付使用真实货币不为空","mode":"支付模式, 该次支付使用真实货币不为空","desc":"描述-如果支付状态为失败, 表示失败原因","notifyUrl": "通知地址, 下单时传入的通知地址","notifyStatus": "通知状态, WAIT: 等待, ING: 正在通知, SUCCESS: 成功, FAIL: 失败","completeTime": "完成时间","createTime": "下单时间","rate": "汇率, 可能为 null","key": "api Key","nonce": "随机字符串","sign": "签名"
}

回调接收示例-Java

package live.lingting.api.controller;import com.hccake.ballcat.common.util.JsonUtils;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.annotation.Profile;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import live.lingting.sdk.constant.SdkConstants;
import live.lingting.sdk.domain.MixCallback;
import live.lingting.sdk.util.MixUtils;/*** @author lingting 2021/6/15 19:30*/
@Slf4j
@RestController
@RequiredArgsConstructor
@RequestMapping("test")
public class TestController {@PostMappingpublic String test(@RequestBody MixCallback callback) {log.info("收到请求: 参数: {}", JsonUtils.toJson(callback));log.info("收到请求: 验签: {}", MixUtils.verifySign("Api Security", callback));return SdkConstants.SUCCESS_BODY;}}

注意事项

  1. 请对每次回调进行验签
  2. 如果确定回调信息无误请返回字符 success
  3. 如果回调信息有问题, 请返回 fail 或者 具体信息
  4. 如果回调通知失败(未返回 success 或请求异常 [请求异常标准为 http 状态码不是200] ), 会发起多次通知, 通知频率: 10分钟/20分钟/30分钟/1小时/2小时/3小时/6小时/12小时; 总计 25小时
  5. 可能收到同一交易的多次通知(网络延迟或其他), 请保证能够正确的处理重复的通知
  6. 不要再回调中进行耗时处理, 请求超时会视为通知失败! 建议在1分钟内处理完回调, 返回结果!

FAQ

  1. 迟迟没有收到回调?

请检查回调地址是否外网可以正确访问

检查请求日志, 查看是否已收到回调只是没有注意

如果交易为虚拟货币支付, 请检查提交的hash是否有效, 校验hash的最长时间为6个小时, 如果hash无效请耐心等待

  1. 为什么我只收到失败回调?

如果是虚拟货币支付, 请检查hash是否填写正确

如果是真实货币支付, 请确认是否正确付款

  1. 如果我想不付钱就收到成功回调该怎么做?

请在本地搭建测试用后台, 配置文件中添加以下配置:

mix:api:test: true

该配置可以开启测试用模式, 该模式下真实货币支付和虚拟货币支付按照以下逻辑处理

真实货币支付: 下单后该次支付有50%几率直接成功或者直接失败.

虚拟货币支付: 提交Hash后该次支付有50%几率直接成功或者直接失败.

Payment支付平台API接口文档相关推荐

  1. 电商平台订单获取API接口文档

    电商平台原始订单推送(不包含订单敏感信息) 描述 用于点三OMS向外部ERP推送电商平台原始订单信息,原始订单状态变化.地址变更.备注修改.旗帜变化.退款变化等都会触发推送. 电商平台订单获取API接 ...

  2. 盘点 8 款好用的 API 接口文档管理工具

    随着互联网的普及和发展,API 接口已经无处不在.它已经在 Web 应用程序.移动应用程序.云计算.物联网.人工智能等领域中得到广泛应用. 例如,在金融行业中,API 接口可以被用于构建支付服务.银行 ...

  3. 极速验号API接口文档说明

    使用场景: 1.旺旺号授权后,可以获取大部分的数据 2.可根据用户的购买行为.信用分值等一系列的数值 3.相对于照妖镜验号来说,极速验号获取的信息更全面更准确,可以多维度判断旺旺号是否可靠 4.可以看 ...

  4. python生成api文档_Django 自动生成api接口文档教程

    最近在写测试平台,需要实现一个节点服务器的api,正好在用django,准备使用djangorestframework插件实现. 需求 实现一个接口,在调用时,通过传递的参数,直接运行对应项目的自动化 ...

  5. python api接口生成_Django 自动生成api接口文档教程

    最近在写测试平台,需要实现一个节点服务器的api,正好在用django,准备使用djangorestframework插件实现. 需求 实现一个接口,在调用时,通过传递的参数,直接运行对应项目的自动化 ...

  6. android api接口文档,API 接口文档

    API 接口文档 接口类说明 本文档所有接口所涉及的相关类及说明如下: 接口 说明 GsManager SDK 功能接口类,用于调用个数相关功能 GsConfig SDK 配置接口类,用于设置个数相关 ...

  7. 商品库存推送至外部系统API接口文档

    没有与外部系统对接,商品库存数据不通?往下看看 电商API文档---点击查看!http://ds.xnxxxk.cn/apijk?comefrom=CSDN&plan=kucuntongbu1 ...

  8. java扫描接口_一种扫描接口并生成可调用API接口文档的方法与流程

    本发明属于JavaWeb开发技术领域,涉及一种API接口文档的生成方法,尤其是一种扫描接口并生成可调用API接口文档的方法. 背景技术: API(Application Programming Int ...

  9. 芋道 Spring Boot API 接口文档 Swagger 入门

    点击上方"芋道源码",选择"设为星标" 做积极的人,而不是积极废人! 源码精品专栏 原创 | Java 2020 超神之路,很肝~ 中文详细注释的开源项目 RP ...

  10. 利用eoLinker快速录入Api接口文档信息

    传统的接口信息录入过程太过繁琐,而最近在线接口文档编写的平台变得越来越多,我参考了知乎上推荐的几款接口平台,eoLinker是用过几天之后觉得还不错的,特此记录一下如何通过它来实现快速录入Api接口文 ...

最新文章

  1. 阿里程序员深夜智救31楼跳楼邻居
  2. java 配置hdfs集群_Hadoop集群搭建-04安装配置HDFS
  3. linux系统用户锁定与解锁
  4. Qt工作笔记-Qt5中中文编码方面的笔记
  5. html5图像映射坐标怎么看,html学习之创建图像映射
  6. Java之transient关键字
  7. 基于51单片机直流电机PWM控制器设计
  8. 软件系统演示脚本实践(草稿)
  9. oracle自增序列及其触发器
  10. 高德地图api接口免费查询天气实战案例,axios请求查询天气,js版,【接上一篇微信测试号推送纪念日】
  11. 2022年 AI 技术成熟度曲线
  12. go 切片排序以及转为带间隔符的字符串
  13. UTF8 中文占几个字节
  14. marked生成Markdown导致代码块错位的BUG解决
  15. 页面显示LCD液晶字体,特殊字体,@font-face属性详细用法,配图
  16. 将1-1000中所有12的倍数存到一个一维数组中,输出该数组和数的个数
  17. linux查看磁盘性能sar,基于sar分析磁盘IO性能
  18. 【转】 SCM工具对比分析
  19. 论文阅读笔记:3D deeply supervised network for automated segmentation of volumetric medical images
  20. 思科静态路由配置简单命令

热门文章

  1. 外贸网站建站营销及推广?
  2. 聊聊北京大部分前端从业者所面临的困境
  3. 文献速递 | 通过m6A RNA甲基化修饰调节癌症中的端粒稳态和基因组稳定性
  4. css挪动背景块位置的属性,CSS 背景位置 background-position属性
  5. sprintf左右对齐
  6. 臻游网络手游[乱弹西游]4月中旬开启首测
  7. 打印文件出现xps_什么是XPS文件?Windows为什么要我将其打印到一个文件?
  8. python颜色识别_python实现简单颜色识别程序
  9. 线性电阻软件的伏安特性曲线测试,线性电阻和非线性电阻的伏安特性曲线
  10. java 时间处理工具类