设置风险通知回调链接
设置通知回调链接,当支付风险能力平台有事件通知时,通过该链接通知银行或者渠道服务商。
请求参数 | 类型 | 描述 |
---|---|---|
xml | object | 声明请求的XML 数据结构 |
mch_id | string | 服务商号 |
callback_url | string | 回调链接 |
sign_type | string | 签名类型HMAC-SHA256 枚举值 |
php
$instance->v2->mchrisk->setmchriskcallback->postAsync([
'xml' => [
'mch_id' => '1900000109',
'callback_url' => 'https://pay.weixin.qq.com/wxpay/risk.action',
'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/setmchriskcallback')->postAsync([
'xml' => [
'mch_id' => '1900000109',
'callback_url' => 'https://pay.weixin.qq.com/wxpay/risk.action',
'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/setmchriskcallback']->postAsync([
'xml' => [
'mch_id' => '1900000109',
'callback_url' => 'https://pay.weixin.qq.com/wxpay/risk.action',
'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->setmchriskcallback->post([
'xml' => [
'mch_id' => '1900000109',
'callback_url' => 'https://pay.weixin.qq.com/wxpay/risk.action',
'sign_type' => 'HMAC-SHA256',
],
]);
print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
php
$response = $instance->chain('v2/mchrisk/setmchriskcallback')->post([
'xml' => [
'mch_id' => '1900000109',
'callback_url' => 'https://pay.weixin.qq.com/wxpay/risk.action',
'sign_type' => 'HMAC-SHA256',
],
]);
print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
php
$response = $instance['v2/mchrisk/setmchriskcallback']->post([
'xml' => [
'mch_id' => '1900000109',
'callback_url' => 'https://pay.weixin.qq.com/wxpay/risk.action',
'sign_type' => 'HMAC-SHA256',
],
]);
print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
返回字典 | 类型 | 描述 |
---|---|---|
return_code | string | 返回状态码SUCCESS | FAIL 枚举值之一 |
return_msg | string | 返回信息 |
mch_id | string | 服务商号 |
result_code | string | 业务结果SUCCESS | FAIL 枚举值之一 |
err_code | string | 错误代码 |
err_code_des | string | 错误描述 |
参阅 官方文档