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



public class OpenApiSdkTest {
    public static void main(String[] args) throws Exception{
        String url = "https://api-mop.chinaums.com/v1/inip/corporate-wallet/wechat-pay-point/order/modify";
        //开发者ID
        String appId = "平台分配";
        //开发者秘钥
        String appKey = "平台分配";
        //实例化客户端
        ConfigBean configBean = new ConfigBean();
        OpenApiContext context = new OpenApiContext();
        String request = "{\"fenOrderId\":\"\",
                    \"mid\":\"\",
                    \"serviceId\":\"\",
                    \"postPayments\":\"[{\"name\":\"\",\"amount\":\"\",\"description\":\"\",\"count\":\"\"}]\",
                    \"reason\":\"\",
                    \"postDiscounts\":\"[{\"name\":\"\",\"description\":\"\",\"amount\":\"\",\"count\":\"\"}]\",
                    \"totalAmount\":\"\"}";
        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/v1/inip/corporate-wallet/wechat-pay-point/order/modify";
        $data = json_encode(array("fenOrderId"=>"",
                    "mid"=>"",
                    "serviceId"=>"",
                    "postPayments"=>"json_encode(array([{"name"=>"","amount"=>"","description"=>"","count"=>""}]))",
                    "reason"=>"",
                    "postDiscounts"=>"json_encode(array([{"name"=>"","description"=>"","amount"=>"","count"=>""}]))",
                    "totalAmount"=>""));
        $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/v1/inip/corporate-wallet/wechat-pay-point/order/modify"

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({\"fenOrderId\":\"\",
                    \"mid\":\"\",
                    \"serviceId\":\"\",
                    \"postPayments\":\"[{\"name\":\"\",\"amount\":\"\",\"description\":\"\",\"count\":\"\"}]\",
                    \"reason\":\"\",
                    \"postDiscounts\":\"[{\"name\":\"\",\"description\":\"\",\"amount\":\"\",\"count\":\"\"}]\",
                    \"totalAmount\":\"\"})
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

  • 生产环境: POST https://api-mop.chinaums.com/v1/inip/corporate-wallet/wechat-pay-point/order/modify
  • 测试环境: POST https://test-api-open.chinaums.com/v1/inip/corporate-wallet/wechat-pay-point/order/modify

描述:修改支付分订单金额

ContentType:application/json

请求头

名称 必填 描述 示例值
Authorization 是 认证内容 (认证参考天满开发者中心->接入指引->平台认证方式:开发者中心) OPEN-BODY-SIG AppId="****",Timestamp="20170606135700",Nonce="99930a147f5353dd8a8f29a5329f37e9",Signature="IPmdGHYCcfN+mto0/02zkwoUF1NT3YqPKaUykMaec1T="

请求参数

名称 类型 必填 最大长度 描述 示例值
fenOrderId string 是 32 支付分订单号
mid string 是 32 商户号 银商商户号
serviceId string 是 32 服务ID 该服务ID有本接口对应产品的权限
postPayments array 是 后付费项目 后付费项目列表,最少包含1条,最多包含100条付费项目,用于用户侧展示与总金额的计算;覆盖完结订单接口传入的后付费项目。
   name string 否 20 付费项目名称
   amount number 否 64 金额 此付费项目总金额,大于等于0,单位为分,等于0时代表不需要扣费
   description string 否 20 计费说明
   count number 否 32 付费数量
reason string 是 50 修改原因
postDiscounts array 否 后付费商户优惠
   name string 是 20 优惠名称
   description string 否 30 优惠说明
   amount number 否 64 优惠金额
   count number 否 32 优惠数量
totalAmount number 是 - 总金额

响应示例

{
  "respCode":"",
  "respDesc":""
}

响应参数

名称 类型 必填 最大长度 描述 示例值
respCode string 是 - 错误码
respDesc string 否 - 错误信息

错误码