Skip to content

商圈会员积分同步

通过积分通知回调API,商圈商户/服务商可针对微信支付前序推送给商圈系统的顾客商圈内交易通知,告知微信支付系统该笔交易的积分情况

请求参数类型描述
jsonobject声明请求的JSON数据结构
sub_mchidstring商圈商户ID
transaction_idstring微信订单号
appidstring小程序appid
openidstring顾客openid
earn_pointsboolean是否获得积分
increased_pointsinteger订单新增积分值
points_update_timestring积分更新时间
no_points_remarksstring未获得积分的备注信息
total_pointsinteger顾客积分总额
php
$instance->v3->businesscircle->points->notify->postAsync([
  'json' => [
    'sub_mchid' => '1234567890',
    'transaction_id' => '1217752501201407033233368018',
    'appid' => 'wx1234567890abcdef',
    'openid' => 'oWmnN4xxxxxxxxxxe92NHIGf1xd8',
    'earn_points' => true,
    'increased_points' => 100,
    'points_update_time' => '2020-05-20T13:29:35.120+08:00',
    'no_points_remarks' => '商品不参与积分活动',
    'total_points' => 888888,
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r($response->getStatusCode() === 204);
})
->wait();
php
$instance->chain('v3/businesscircle/points/notify')->postAsync([
  'json' => [
    'sub_mchid' => '1234567890',
    'transaction_id' => '1217752501201407033233368018',
    'appid' => 'wx1234567890abcdef',
    'openid' => 'oWmnN4xxxxxxxxxxe92NHIGf1xd8',
    'earn_points' => true,
    'increased_points' => 100,
    'points_update_time' => '2020-05-20T13:29:35.120+08:00',
    'no_points_remarks' => '商品不参与积分活动',
    'total_points' => 888888,
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r($response->getStatusCode() === 204);
})
->wait();
php
$instance['v3/businesscircle/points/notify']->postAsync([
  'json' => [
    'sub_mchid' => '1234567890',
    'transaction_id' => '1217752501201407033233368018',
    'appid' => 'wx1234567890abcdef',
    'openid' => 'oWmnN4xxxxxxxxxxe92NHIGf1xd8',
    'earn_points' => true,
    'increased_points' => 100,
    'points_update_time' => '2020-05-20T13:29:35.120+08:00',
    'no_points_remarks' => '商品不参与积分活动',
    'total_points' => 888888,
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r($response->getStatusCode() === 204);
})
->wait();
php
$response = $instance->v3->businesscircle->points->notify->post([
  'json' => [
    'sub_mchid' => '1234567890',
    'transaction_id' => '1217752501201407033233368018',
    'appid' => 'wx1234567890abcdef',
    'openid' => 'oWmnN4xxxxxxxxxxe92NHIGf1xd8',
    'earn_points' => true,
    'increased_points' => 100,
    'points_update_time' => '2020-05-20T13:29:35.120+08:00',
    'no_points_remarks' => '商品不参与积分活动',
    'total_points' => 888888,
  ],
]);
print_r($response->getStatusCode() === 204);
php
$response = $instance->chain('v3/businesscircle/points/notify')->post([
  'json' => [
    'sub_mchid' => '1234567890',
    'transaction_id' => '1217752501201407033233368018',
    'appid' => 'wx1234567890abcdef',
    'openid' => 'oWmnN4xxxxxxxxxxe92NHIGf1xd8',
    'earn_points' => true,
    'increased_points' => 100,
    'points_update_time' => '2020-05-20T13:29:35.120+08:00',
    'no_points_remarks' => '商品不参与积分活动',
    'total_points' => 888888,
  ],
]);
print_r($response->getStatusCode() === 204);
php
$response = $instance['v3/businesscircle/points/notify']->post([
  'json' => [
    'sub_mchid' => '1234567890',
    'transaction_id' => '1217752501201407033233368018',
    'appid' => 'wx1234567890abcdef',
    'openid' => 'oWmnN4xxxxxxxxxxe92NHIGf1xd8',
    'earn_points' => true,
    'increased_points' => 100,
    'points_update_time' => '2020-05-20T13:29:35.120+08:00',
    'no_points_remarks' => '商品不参与积分活动',
    'total_points' => 888888,
  ],
]);
print_r($response->getStatusCode() === 204);
返回字典类型描述
空字符串(无返回内容)

参阅 官方文档 官方文档

Published on the GitHub by TheNorthMemory