Skip to content

拉取订单评价数据

商户可以通过该接口拉取用户在微信支付交易记录中针对你的支付记录进行的评价内容。商户可结合商户系统逻辑对该内容数据进行存储、分析、展示、客服回访以及其他使用。如商户业务对评价内容有依赖,可主动引导用户进入微信支付交易记录进行评价。

请求参数类型描述
securitytrue声明加载商户API证书
xmlobject声明请求的XML数据结构
appidstring公众账号ID
mch_idstring商户号
sign_typestring签名类型
HMAC-SHA256 枚举值
begin_timestring开始时间
end_timestring结束时间
offsetnumber位移
limitnumber条数
php
$instance->v2->billcommentsp->batchquerycomment->postAsync([
  'security' => true,
  'xml' => [
    'appid'      => 'wx8888888888888888',
    'mch_id'     => '1900000109',
    'sign_type'  => 'HMAC-SHA256',
    'begin_time' => '20170724000000',
    'end_time'   => '20170725000000',
    'offset'     => '0',
    'limit'      => '100',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
})
->wait();
php
$instance->chain('v2/billcommentsp/batchquerycomment')->postAsync([
  'security' => true,
  'xml' => [
    'appid'      => 'wx8888888888888888',
    'mch_id'     => '1900000109',
    'sign_type'  => 'HMAC-SHA256',
    'begin_time' => '20170724000000',
    'end_time'   => '20170725000000',
    'offset'     => '0',
    'limit'      => '100',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
})
->wait();
php
$instance['v2/billcommentsp/batchquerycomment']->postAsync([
  'security' => true,
  'xml' => [
    'appid'      => 'wx8888888888888888',
    'mch_id'     => '1900000109',
    'sign_type'  => 'HMAC-SHA256',
    'begin_time' => '20170724000000',
    'end_time'   => '20170725000000',
    'offset'     => '0',
    'limit'      => '100',
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
})
->wait();
php
$response = $instance->v2->billcommentsp->batchquerycomment->post([
  'security' => true,
  'xml' => [
    'appid'      => 'wx8888888888888888',
    'mch_id'     => '1900000109',
    'sign_type'  => 'HMAC-SHA256',
    'begin_time' => '20170724000000',
    'end_time'   => '20170725000000',
    'offset'     => '0',
    'limit'      => '100',
  ],
]);
print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
php
$response = $instance->chain('v2/billcommentsp/batchquerycomment')->post([
  'security' => true,
  'xml' => [
    'appid'      => 'wx8888888888888888',
    'mch_id'     => '1900000109',
    'sign_type'  => 'HMAC-SHA256',
    'begin_time' => '20170724000000',
    'end_time'   => '20170725000000',
    'offset'     => '0',
    'limit'      => '100',
  ],
]);
print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
php
$response = $instance['v2/billcommentsp/batchquerycomment']->post([
  'security' => true,
  'xml' => [
    'appid'      => 'wx8888888888888888',
    'mch_id'     => '1900000109',
    'sign_type'  => 'HMAC-SHA256',
    'begin_time' => '20170724000000',
    'end_time'   => '20170725000000',
    'offset'     => '0',
    'limit'      => '100',
  ],
]);
print_r(\WeChatPay\Transformer::toArray((string) $response->getBody()));
返回字典类型描述
return_codestring返回状态码
SUCCESS | FAIL 枚举值之一
return_msgstring返回信息
result_codestring业务结果
FAIL 枚举值
err_codestring错误代码
err_code_desstring错误代码描述

参阅 官方JSAPI文档 官方NATIVE文档 官方APP文档 官方H5文档 官方小程序支付文档

Published on the GitHub by TheNorthMemory