商圈会员积分同步
通过积分通知回调API,商圈商户/服务商可针对微信支付前序推送给商圈系统的顾客商圈内交易通知,告知微信支付系统该笔交易的积分情况
请求参数 | 类型 | 描述 |
---|---|---|
json | object | 声明请求的JSON 数据结构 |
sub_mchid | string | 商圈商户ID |
transaction_id | string | 微信订单号 |
appid | string | 小程序appid |
openid | string | 顾客openid |
earn_points | boolean | 是否获得积分 |
increased_points | integer | 订单新增积分值 |
points_update_time | string | 积分更新时间 |
no_points_remarks | string | 未获得积分的备注信息 |
total_points | integer | 顾客积分总额 |
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);
返回字典 | 类型 | 描述 |
---|---|---|
空字符串(无返回内容) |