导入code接口.

@param string $cardId
@param array  $codes

@return mixed
357627
public function deposit(string $cardId, array $codes)
    {
        $params = [
            'card_id' => $cardId,
            'code' => $codes,
        ];

        return $this->httpPostJson('card/code/deposit', $params);
    }
545117
public function cardConsume($code, $cardId = null)
    {
        $result = $this->httpRaw(static::WECHAT_CARD_CONSUME_URL . 'access_token=' . $this->getAccessToken(), [
            'code' => $code,
            'card_id' => $cardId
        ]);
        if (isset($result['errmsg']) && $result['errmsg'] === 'ok') {
            return ['card_id' => $result['card']['card_id'], 'openid' => $result['openid']];
        }
        return false;
    }
155489
public function getCode($code)
    {
        $result = $this->wechat->httpPost(self::WECHAT_DELETE_CARD_URL, [
            'code' => $code
        ], [
            'access_token' => $this->wechat->getAccessToken()
        ]);
        return isset($result['errmsg']) && $result['errmsg'] === 'ok' ? $result : false;
    }
907486
public function getdepositcount($card_id)
    {
        if (!is_string($card_id)) {
            $this->setError('参数错误');

            return false;
        }

        $queryStr            = [];
        $queryStr['card_id'] = $card_id;

        $this->apitype = 'card';
        $this->module  = 'code';
        $res           = $this->_post('getdepositcount', $queryStr);

        return $res;
    }
176270
public function deleteCard($cardId)
    {
        $result = $this->wechat->httpPost(self::WECHAT_DELETE_CARD_URL, [
            'card_id' => $cardId
        ], [
            'access_token' => $this->wechat->getAccessToken()
        ]);
        return isset($result['errmsg']) && $result['errmsg'] === 'ok' ? true : false;
    }
1279634
public function consumeCardCode($code, $cardId = '')
    {
        $data = json_encode([
            'code' => $code,
            'card_id' => $cardId,
        ], JSON_UNESCAPED_UNICODE);

        return $this->auth(function () use ($data) {
            return $this->http->postJson(
                $this->baseUrl . 'card/code/consume?access_token=' . $this->accessToken,
                $data
            );
        });
    }
343659
public function get(array $ids = [], array $codes = [], $offset = 0, $limit = self::MAX_GET_USERS): array
    {
        $options = ['json' => compact('ids', 'codes')];
        $options['json']['size'] = $limit;
        $options['json']['offset'] = $offset;

        /** @var JsonStream $stream */
        $stream = $this->client
            ->get(UserApi::generateUrl('users.json'), $options)
            ->getBody();

        return $stream->jsonSerialize()['users'];
    }
1222409
public function get(string $cardId, string $encryptCode)
    {
        $params = [
            'card_id' => $cardId,
            'encrypt_code' => $encryptCode,
        ];

        return $this->httpPostJson('cgi-bin/card/invoice/reimburse/getinvoiceinfo', $params);
    }
1226087
public function deactivate(string $cardId, string $code)
    {
        $params = [
            'card_id' => $cardId,
            'code' => $code,
        ];

        return $this->httpPostJson('card/generalcard/unactivate', $params);
    }
699718
public function consume($code, $card_id = null)
    {
        $data = ['code' => $code];
        is_null($card_id) || $data['card_id'] = $card_id;
        $url = "https://api.weixin.qq.com/card/code/consume?access_token=ACCESS_TOKEN";
        $this->registerApi($url, __FUNCTION__, func_get_args());
        return $this->httpPostForJson($url, $data);
    }
1155702
public function getUserId($code)
    {
        $apiUrl = 'https://qyapi.weixin.qq.com/cgi-bin/user/getuserinfo';

        $result = $this->_curl($apiUrl, [
            'access_token' => $this->getAccessToken(),
            'code' => $code,
        ]);

        return ($result and isset($result['UserId'])) ? $result['UserId'] : null;
    }
964555
public function getUser(string $cardId, string $code)
    {
        $params = [
            'card_id' => $cardId,
            'code' => $code,
        ];

        return $this->httpPostJson('card/membercard/userinfo/get', $params);
    }
567399
public function get($codes = null){
		if(is_array($codes)){
			$return = Array();
			foreach($codes as $code){
				$return[$code] = $this->get($code);
			}
			return $return;
		}elseif(is_string($codes)){
			return $this->shortcodes[$codes];
		}else{
			return $this->shortcodes;
		}
	}
1214666
public function consume($code, $card_id = '')
    {
        if (empty($code)) {
            $this->setError('参数错误');

            return false;
        }

        $queryStr = [];

        if (!empty($card_id)) {
            $queryStr['card_id'] = $card_id;
        }

        $queryStr['code'] = $code;

        $this->apitype = 'card';
        $this->module  = 'code';
        $res           = $this->_post('consume', $queryStr);

        return $res;
    }
68902
@Override
    public WxResp card_code_consume(String code, String cardId) {
    	NutMap body = NutMap.NEW().addv("code", code);
    	if (cardId != null) {
    		body.addv("card_id", cardId);
    	}

    	// 由于核销卡券API中没有“/cgi-bin”，所以uri不能只写“/card/code/consume”
    	return postJson("https://api.weixin.qq.com/card/code/consume", body);
    }
1342825
public function cardInfo($number, $expirationDate, $code)
    {
        $this->setArgument('card_number', $number);
        $this->setArgument('card_expiration_date', $expirationDate);
        return $this->setArgument('card_code', $code);
    }
899244
public function consume(string $code, string $cardId = null)
    {
        $params = [
            'code' => $code,
        ];

        if (!is_null($cardId)) {
            $params['card_id'] = $cardId;
        }

        return $this->httpPostJson('card/code/consume', $params);
    }