Skip to content

设置支付后展示的积分到账

商户调此接口,若已设置支付后展示积分,且该笔订单对应的积分已到账,则可以入参积分对应的交易商户号+商户订单号将该笔支付后展示的积分状态设置为“已到账”

请求参数类型描述
card_idstring会员卡模板id
codestring会员卡code
jsonobject声明请求的JSON数据结构
out_trade_nostring商户订单号
mchidstring直连商户号
sub_mchidstring子商户号
bonus_valueinteger会员积分值
php
$instance->v3->marketing->membercardOpen->cards->_card_id_->codes->_code_->bonus->commit->postAsync([
  'card_id' => '478515832665',
  'code' => '478515832665',
  'json' => [
    'out_trade_no' => '1217752501201407033233368018',
    'mchid'        => '1230000109',
    'sub_mchid'    => '1900000109',
    'bonus_value'  => 30,
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r($response->getStatusCode() === 204);
})
->wait();
php
$instance->chain('v3/marketing/membercard-open/cards/{card_id}/codes/{code}/bonus/commit')->postAsync([
  'card_id' => '478515832665',
  'code' => '478515832665',
  'json' => [
    'out_trade_no' => '1217752501201407033233368018',
    'mchid'        => '1230000109',
    'sub_mchid'    => '1900000109',
    'bonus_value'  => 30,
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r($response->getStatusCode() === 204);
})
->wait();
php
$instance['v3/marketing/membercard-open/cards/{card_id}/codes/{code}/bonus/commit']->postAsync([
  'card_id' => '478515832665',
  'code' => '478515832665',
  'json' => [
    'out_trade_no' => '1217752501201407033233368018',
    'mchid'        => '1230000109',
    'sub_mchid'    => '1900000109',
    'bonus_value'  => 30,
  ],
])
->then(static function(\Psr\Http\Message\ResponseInterface $response) {
  print_r($response->getStatusCode() === 204);
})
->wait();
php
$response = $instance->v3->marketing->membercardOpen->cards->_card_id_->codes->_code_->bonus->commit->post([
  'card_id' => '478515832665',
  'code' => '478515832665',
  'json' => [
    'out_trade_no' => '1217752501201407033233368018',
    'mchid'        => '1230000109',
    'sub_mchid'    => '1900000109',
    'bonus_value'  => 30,
  ],
]);
print_r($response->getStatusCode() === 204);
php
$response = $instance->chain('v3/marketing/membercard-open/cards/{card_id}/codes/{code}/bonus/commit')->post([
  'card_id' => '478515832665',
  'code' => '478515832665',
  'json' => [
    'out_trade_no' => '1217752501201407033233368018',
    'mchid'        => '1230000109',
    'sub_mchid'    => '1900000109',
    'bonus_value'  => 30,
  ],
]);
print_r($response->getStatusCode() === 204);
php
$response = $instance['v3/marketing/membercard-open/cards/{card_id}/codes/{code}/bonus/commit']->post([
  'card_id' => '478515832665',
  'code' => '478515832665',
  'json' => [
    'out_trade_no' => '1217752501201407033233368018',
    'mchid'        => '1230000109',
    'sub_mchid'    => '1900000109',
    'bonus_value'  => 30,
  ],
]);
print_r($response->getStatusCode() === 204);
返回字典类型描述
空字符串(无返回内容)

参阅 官方文档

Published on the GitHub by TheNorthMemory