银联商务天满服务平台
Java PHP Python



public class OpenApiSdkTest {
    public static void main(String[] args) throws Exception{
        String url = "https://api-mop.chinaums.com/";
        //开发者ID
        String appId = "平台分配";
        //开发者秘钥
        String appKey = "平台分配";
        //实例化客户端
        ConfigBean configBean = new ConfigBean();
        OpenApiContext context = new OpenApiContext();
        String request = "";
        context.setStartTime(System.currentTimeMillis());
        context.setRequestId(UUID.randomUUID().toString().replace("-", ""));
        context.setOpenServUrl(url.split("/v")[0].concat("/"));
        context.setApiServiceUrl(url);
        context.setVersion(url.split("/")[3]);
        context.setAppId(appId);
        context.setAppKey(appKey);
        context.setConfigBean(configBean);
        context.setServiceCode(url.split("/v")[1].substring(1));
        OpenApiCache.getCurrentToken(context);
        System.out.println(HttpTransport.getInstance().doPost(context, request));
    }
}
<?php
require_once "../utils/Log.php";
require_once "../utils/Tools.php";
require_once "../DefaultOpenApiClient.php";
class DataRequest

{
    public $url = "";
    public $serviceCode = "";
    public $apiVersion ="";
    public $needToken = true;
    public $needDataTag = false;
    public $data;

    function __construct($data, $url)
    {
        $this->data = $data;
        $apiVersion = preg_split("/[/]+/s",$url)[2];
        $this->apiVersion = $apiVersion;
        $serviceCode = strstr($url,$apiVersion);
        $this->url = strstr($url,"/".$apiVersion,true);
        $this->serviceCode = preg_replace("/^" . preg_quote($apiVersion, "/") . "/", "", $serviceCode);
    }
}

class DataDemo{
    public function main(){
        $appid = "平台分配";
        $appkey = "平台分配";
        $url = "https://api-mop.chinaums.com/";
        $data = json_encode(array());
        $reqiest = new DataRequest($data,$url);
        $client = new DefaultOpenApiClient();
        $content = $client->execute($reqiest,$appid,$appkey);
        $obj = json_decode($content);
        print_r($obj->errCode);
        print_r($obj->errInfo);
    }
}
$p = new DataDemo();
$p->main();
?>
# -*- coding: utf-8 -*-
from webapi.DefaultOpenApiClient import DefaultOpenApiClient

url = "https://api-mop.chinaums.com/"

class DataRequest(object):
    def __init__(self, data: dict) -> dict:
        self.data = data
        self.serviceCode = url[len(url.split("/v")[0])+len(url.split("/")[3])+1: len(url)]
        self.apiVersion = url.split("/")[3]
        self.needToken = True
        self.needDataTag = True

appId="平台分配"
appKey="平台分配"
client = DefaultOpenApiClient(appId, appKey)
cls = DataRequest()
response = client.execute(cls)
print(str(response.get("data")))
print(response.get("errCode"))
print(response.get("errInfo"))
print(response.get("resultCode"))
print(response.get("resultInfo"))

代扣成功通知

URL

  • 生产环境: `` https://api-mop.chinaums.com/
  • 测试环境: `` https://test-api-open.chinaums.com/

描述:

ContentType:

请求参数

名称 类型 必填 最大长度 描述 示例值
notifyId string - 支付通知ID 通知唯一ID,重发通知的notifyId不变
mid string - 商户号
tid string - 终端号
merName string - 商户名称
attachedData string - 附加数据
bankCardNo string - 支付银行信息
billFunds string - 资金渠道
billFundsDesc string - 资金渠道说明
buyerId string - 卖家ID
buyerUsername string - 买家用户名
buyerPayAmount number - 实付金额
totalAmount number - 订单金额,单位分
invoiceAmount number - 开票金额
merOrderId string - 商户订单号
payTime string - 支付时间,格式yyyy-MM-dd HH:mm:ss
receiptAmount number - 实收金额
refId string - 支付银行卡参考号
refundAmount number - 退款金额
refundDesc string - 退款说明
seqId string - 系统交易流水号
settleDate string - 结算日期,格式yyyy-MM-dd
status string - 订单状态
subBuyerId string - 卖家子ID
targetOrderId string - 渠道订单号
targetSys string - 支付渠道
couponMerchantContribute number - 商户出资优惠金额
couponOtherContribute number - 其他出资优惠金额
activityIds string - 微信活动ID
refundTargetOrderId string - 退货渠道订单号
refundPayTime string - 退货时间
refundSettleDate string - 结算日期
orderDesc string - 订单详情
createTime string - 订单创建时间
mchntUuid string - 商户UUID
connectSys string - 转接系统
subInst string - 商户所属分支机构代码
yxlmAmount number - 联盟优惠金额
refundExtOrderId string - 退货外部订单号
goodsTradeNo string - 商品交易单号
extOrderId string - 外部订单号
secureStatus string - 担保交易状态
completeAmount string - 担保完成金额
refundOrderId string - 退货订单号
buyerCashPayAmt number - 实付现金金额
refundInvoiceAmount number - 实退现金金额
fenOrderId string 32 支付分订单号
cardAttr string - 卡属性 DEBIT_CARD(借记卡);CREDIT_CARD(贷记卡)
couponAmount string - 网付计算的优惠金额
bankInfo string - 银行信息
instMid string - 业务类型

响应示例

{

}

响应参数

错误码