Skip to content

事后-风险商户处理结果同步接口

商户收到微信发送的商户风险交易推送后,调用该接口回传风险商户详细信息.

请求参数类型描述
securitytrue声明加载商户API证书
xmlobject声明请求的XML数据结构
mch_idstring服务商号
sub_mch_idstring商户ID
event_codestring事件单号
certificates_numberstring身份证号(需加密)
certificates_namestring身份证所有人姓名(需加密)
settlement_card_nostring结算账号(需加密)
settlement_card_namestring结算户名(需加密)
settlement_card_bankstring结算银行
business_license_numberstring营业执照编号(需加密)
company_namestring公司名称
store_addressstring门店地址
store_longitudestring门店经度
store_latitudestring门店纬度
risk_typestring风险类型
punish_typestring处罚方式
sign_typestring签名类型
HMAC-SHA256 枚举值
php
$instance->v2->mchrisk->syncmchriskresult->postAsync([
  'security' => true,
  'xml' => [
    'mch_id'                  => '1900000109',
    'sub_mch_id'              => '1230000109',
    'event_code'              => '123456123',
    'certificates_number'     => '8609cb22e1774a50a930e414cc71eca06121bcd266335cda230d24a7886a8d9f',
    'certificates_name'       => 'ca775af5f841bdf424b2e6eb86a6e21e',
    'settlement_card_no'      => 'ca775af5f841bdf424b2e6eb86a6e21e',
    'settlement_card_name'    => 'ca775af5f841bdf424b2e6eb86a6e21e',
    'settlement_card_bank'    => '招商银行科技园支行',
    'business_license_number' => '00110105MA00BE3C1W',
    'company_name'            => 'XXXXX有限公司',
    'store_address'           => '广东省深圳市南山区深南大道10000号',
    'store_longitude'         => '22.5461478801',
    'store_latitude'          => '113.9410519639',
    'risk_type'               => 'GAMBLING,SEXYCHEATTRANSACTION_DISPUTESONE_YUAN_BUYMULTILEVEL_DISTRIBUTION_REBATEOTHERNO_ABNORMALITIES',
    'punish_type'             => 'CLOSE_PAY_PERMISSIONEXTEND_SETTLEMENT_CYCLECLOSE_WITHDRAW_CASHCLEAN_UPOTHER',
    'sign_type'               => 'HMAC-SHA256',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
})
->wait();
php
$instance->chain('v2/mchrisk/syncmchriskresult')->postAsync([
  'security' => true,
  'xml' => [
    'mch_id'                  => '1900000109',
    'sub_mch_id'              => '1230000109',
    'event_code'              => '123456123',
    'certificates_number'     => '8609cb22e1774a50a930e414cc71eca06121bcd266335cda230d24a7886a8d9f',
    'certificates_name'       => 'ca775af5f841bdf424b2e6eb86a6e21e',
    'settlement_card_no'      => 'ca775af5f841bdf424b2e6eb86a6e21e',
    'settlement_card_name'    => 'ca775af5f841bdf424b2e6eb86a6e21e',
    'settlement_card_bank'    => '招商银行科技园支行',
    'business_license_number' => '00110105MA00BE3C1W',
    'company_name'            => 'XXXXX有限公司',
    'store_address'           => '广东省深圳市南山区深南大道10000号',
    'store_longitude'         => '22.5461478801',
    'store_latitude'          => '113.9410519639',
    'risk_type'               => 'GAMBLING,SEXYCHEATTRANSACTION_DISPUTESONE_YUAN_BUYMULTILEVEL_DISTRIBUTION_REBATEOTHERNO_ABNORMALITIES',
    'punish_type'             => 'CLOSE_PAY_PERMISSIONEXTEND_SETTLEMENT_CYCLECLOSE_WITHDRAW_CASHCLEAN_UPOTHER',
    'sign_type'               => 'HMAC-SHA256',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
})
->wait();
php
$instance['v2/mchrisk/syncmchriskresult']->postAsync([
  'security' => true,
  'xml' => [
    'mch_id'                  => '1900000109',
    'sub_mch_id'              => '1230000109',
    'event_code'              => '123456123',
    'certificates_number'     => '8609cb22e1774a50a930e414cc71eca06121bcd266335cda230d24a7886a8d9f',
    'certificates_name'       => 'ca775af5f841bdf424b2e6eb86a6e21e',
    'settlement_card_no'      => 'ca775af5f841bdf424b2e6eb86a6e21e',
    'settlement_card_name'    => 'ca775af5f841bdf424b2e6eb86a6e21e',
    'settlement_card_bank'    => '招商银行科技园支行',
    'business_license_number' => '00110105MA00BE3C1W',
    'company_name'            => 'XXXXX有限公司',
    'store_address'           => '广东省深圳市南山区深南大道10000号',
    'store_longitude'         => '22.5461478801',
    'store_latitude'          => '113.9410519639',
    'risk_type'               => 'GAMBLING,SEXYCHEATTRANSACTION_DISPUTESONE_YUAN_BUYMULTILEVEL_DISTRIBUTION_REBATEOTHERNO_ABNORMALITIES',
    'punish_type'             => 'CLOSE_PAY_PERMISSIONEXTEND_SETTLEMENT_CYCLECLOSE_WITHDRAW_CASHCLEAN_UPOTHER',
    'sign_type'               => 'HMAC-SHA256',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
})
->wait();
php
$response = $instance->v2->mchrisk->syncmchriskresult->post([
  'security' => true,
  'xml' => [
    'mch_id'                  => '1900000109',
    'sub_mch_id'              => '1230000109',
    'event_code'              => '123456123',
    'certificates_number'     => '8609cb22e1774a50a930e414cc71eca06121bcd266335cda230d24a7886a8d9f',
    'certificates_name'       => 'ca775af5f841bdf424b2e6eb86a6e21e',
    'settlement_card_no'      => 'ca775af5f841bdf424b2e6eb86a6e21e',
    'settlement_card_name'    => 'ca775af5f841bdf424b2e6eb86a6e21e',
    'settlement_card_bank'    => '招商银行科技园支行',
    'business_license_number' => '00110105MA00BE3C1W',
    'company_name'            => 'XXXXX有限公司',
    'store_address'           => '广东省深圳市南山区深南大道10000号',
    'store_longitude'         => '22.5461478801',
    'store_latitude'          => '113.9410519639',
    'risk_type'               => 'GAMBLING,SEXYCHEATTRANSACTION_DISPUTESONE_YUAN_BUYMULTILEVEL_DISTRIBUTION_REBATEOTHERNO_ABNORMALITIES',
    'punish_type'             => 'CLOSE_PAY_PERMISSIONEXTEND_SETTLEMENT_CYCLECLOSE_WITHDRAW_CASHCLEAN_UPOTHER',
    'sign_type'               => 'HMAC-SHA256',
  ],
]);
print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
php
$response = $instance->chain('v2/mchrisk/syncmchriskresult')->post([
  'security' => true,
  'xml' => [
    'mch_id'                  => '1900000109',
    'sub_mch_id'              => '1230000109',
    'event_code'              => '123456123',
    'certificates_number'     => '8609cb22e1774a50a930e414cc71eca06121bcd266335cda230d24a7886a8d9f',
    'certificates_name'       => 'ca775af5f841bdf424b2e6eb86a6e21e',
    'settlement_card_no'      => 'ca775af5f841bdf424b2e6eb86a6e21e',
    'settlement_card_name'    => 'ca775af5f841bdf424b2e6eb86a6e21e',
    'settlement_card_bank'    => '招商银行科技园支行',
    'business_license_number' => '00110105MA00BE3C1W',
    'company_name'            => 'XXXXX有限公司',
    'store_address'           => '广东省深圳市南山区深南大道10000号',
    'store_longitude'         => '22.5461478801',
    'store_latitude'          => '113.9410519639',
    'risk_type'               => 'GAMBLING,SEXYCHEATTRANSACTION_DISPUTESONE_YUAN_BUYMULTILEVEL_DISTRIBUTION_REBATEOTHERNO_ABNORMALITIES',
    'punish_type'             => 'CLOSE_PAY_PERMISSIONEXTEND_SETTLEMENT_CYCLECLOSE_WITHDRAW_CASHCLEAN_UPOTHER',
    'sign_type'               => 'HMAC-SHA256',
  ],
]);
print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
php
$response = $instance['v2/mchrisk/syncmchriskresult']->post([
  'security' => true,
  'xml' => [
    'mch_id'                  => '1900000109',
    'sub_mch_id'              => '1230000109',
    'event_code'              => '123456123',
    'certificates_number'     => '8609cb22e1774a50a930e414cc71eca06121bcd266335cda230d24a7886a8d9f',
    'certificates_name'       => 'ca775af5f841bdf424b2e6eb86a6e21e',
    'settlement_card_no'      => 'ca775af5f841bdf424b2e6eb86a6e21e',
    'settlement_card_name'    => 'ca775af5f841bdf424b2e6eb86a6e21e',
    'settlement_card_bank'    => '招商银行科技园支行',
    'business_license_number' => '00110105MA00BE3C1W',
    'company_name'            => 'XXXXX有限公司',
    'store_address'           => '广东省深圳市南山区深南大道10000号',
    'store_longitude'         => '22.5461478801',
    'store_latitude'          => '113.9410519639',
    'risk_type'               => 'GAMBLING,SEXYCHEATTRANSACTION_DISPUTESONE_YUAN_BUYMULTILEVEL_DISTRIBUTION_REBATEOTHERNO_ABNORMALITIES',
    'punish_type'             => 'CLOSE_PAY_PERMISSIONEXTEND_SETTLEMENT_CYCLECLOSE_WITHDRAW_CASHCLEAN_UPOTHER',
    'sign_type'               => 'HMAC-SHA256',
  ],
]);
print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
返回字典类型描述
return_codestring返回状态码
SUCCESS | FAIL 枚举值之一
return_msgstring返回信息
result_codestring业务结果
SUCCESS | FAIL 枚举值之一
err_codestring错误代码
err_code_desstring错误描述

参阅 官方文档

Published on the GitHub by TheNorthMemory