| @@ 290-298 (lines=9) @@ | ||
| 287 | * |
|
| 288 | * @return \EasyWeChat\Support\Collection |
|
| 289 | */ |
|
| 290 | public function deposit($cardId, $code) |
|
| 291 | { |
|
| 292 | $params = [ |
|
| 293 | 'card_id' => $cardId, |
|
| 294 | 'code' => $code, |
|
| 295 | ]; |
|
| 296 | ||
| 297 | return $this->parseJSON('json', [self::API_DEPOSIT_CODE, $params]); |
|
| 298 | } |
|
| 299 | ||
| 300 | /** |
|
| 301 | * 查询导入code数目. |
|
| @@ 307-314 (lines=8) @@ | ||
| 304 | * |
|
| 305 | * @return \EasyWeChat\Support\Collection |
|
| 306 | */ |
|
| 307 | public function getDepositedCount($cardId) |
|
| 308 | { |
|
| 309 | $params = [ |
|
| 310 | 'card_id' => $cardId, |
|
| 311 | ]; |
|
| 312 | ||
| 313 | return $this->parseJSON('json', [self::API_GET_DEPOSIT_COUNT, $params]); |
|
| 314 | } |
|
| 315 | ||
| 316 | /** |
|
| 317 | * 核查code接口. |
|
| @@ 324-332 (lines=9) @@ | ||
| 321 | * |
|
| 322 | * @return \EasyWeChat\Support\Collection |
|
| 323 | */ |
|
| 324 | public function checkCode($cardId, $code) |
|
| 325 | { |
|
| 326 | $params = [ |
|
| 327 | 'card_id' => $cardId, |
|
| 328 | 'code' => $code, |
|
| 329 | ]; |
|
| 330 | ||
| 331 | return $this->parseJSON('json', [self::API_CHECK_CODE, $params]); |
|
| 332 | } |
|
| 333 | ||
| 334 | /** |
|
| 335 | * 查询Code接口. |
|
| @@ 343-352 (lines=10) @@ | ||
| 340 | * |
|
| 341 | * @return \EasyWeChat\Support\Collection |
|
| 342 | */ |
|
| 343 | public function getCode($code, $checkConsume, $cardId) |
|
| 344 | { |
|
| 345 | $params = [ |
|
| 346 | 'code' => $code, |
|
| 347 | 'check_consume' => $checkConsume, |
|
| 348 | 'card_id' => $cardId, |
|
| 349 | ]; |
|
| 350 | ||
| 351 | return $this->parseJSON('json', [self::API_GET_CODE, $params]); |
|
| 352 | } |
|
| 353 | ||
| 354 | /** |
|
| 355 | * 核销Code接口. |
|
| @@ 402-409 (lines=8) @@ | ||
| 399 | * |
|
| 400 | * @return \EasyWeChat\Support\Collection |
|
| 401 | */ |
|
| 402 | public function getHtml($cardId) |
|
| 403 | { |
|
| 404 | $params = [ |
|
| 405 | 'card_id' => $cardId, |
|
| 406 | ]; |
|
| 407 | ||
| 408 | return $this->parseJSON('json', [self::API_GET_HTML, $params]); |
|
| 409 | } |
|
| 410 | ||
| 411 | /** |
|
| 412 | * 设置测试白名单. |
|
| @@ 451-459 (lines=9) @@ | ||
| 448 | * |
|
| 449 | * @return \EasyWeChat\Support\Collection |
|
| 450 | */ |
|
| 451 | public function getUserCards($openid, $cardId = '') |
|
| 452 | { |
|
| 453 | $params = [ |
|
| 454 | 'openid' => $openid, |
|
| 455 | 'card_id' => $cardId, |
|
| 456 | ]; |
|
| 457 | ||
| 458 | return $this->parseJSON('json', [self::API_GET_CARD_LIST, $params]); |
|
| 459 | } |
|
| 460 | ||
| 461 | /** |
|
| 462 | * 查看卡券详情. |
|
| @@ 468-475 (lines=8) @@ | ||
| 465 | * |
|
| 466 | * @return \EasyWeChat\Support\Collection |
|
| 467 | */ |
|
| 468 | public function getCard($cardId) |
|
| 469 | { |
|
| 470 | $params = [ |
|
| 471 | 'card_id' => $cardId, |
|
| 472 | ]; |
|
| 473 | ||
| 474 | return $this->parseJSON('json', [self::API_GET_CARD, $params]); |
|
| 475 | } |
|
| 476 | ||
| 477 | /** |
|
| 478 | * 批量查询卡列表. |
|
| @@ 532-540 (lines=9) @@ | ||
| 529 | * |
|
| 530 | * @return \EasyWeChat\Support\Collection |
|
| 531 | */ |
|
| 532 | public function setPayCell($cardId, $isOpen = true) |
|
| 533 | { |
|
| 534 | $params = [ |
|
| 535 | 'card_id' => $cardId, |
|
| 536 | 'is_open' => $isOpen, |
|
| 537 | ]; |
|
| 538 | ||
| 539 | return $this->parseJSON('json', [self::API_SET_PAY_CELL, $params]); |
|
| 540 | } |
|
| 541 | ||
| 542 | /** |
|
| 543 | * 增加库存. |
|
| @@ 597-606 (lines=10) @@ | ||
| 594 | * |
|
| 595 | * @return \EasyWeChat\Support\Collection |
|
| 596 | */ |
|
| 597 | public function updateCode($code, $newCode, $cardId = []) |
|
| 598 | { |
|
| 599 | $params = [ |
|
| 600 | 'code' => $code, |
|
| 601 | 'new_code' => $newCode, |
|
| 602 | 'card_id' => $cardId, |
|
| 603 | ]; |
|
| 604 | ||
| 605 | return $this->parseJSON('json', [self::API_UPDATE_CODE, $params]); |
|
| 606 | } |
|
| 607 | ||
| 608 | /** |
|
| 609 | * 删除卡券接口. |
|
| @@ 615-622 (lines=8) @@ | ||
| 612 | * |
|
| 613 | * @return \EasyWeChat\Support\Collection |
|
| 614 | */ |
|
| 615 | public function delete($cardId) |
|
| 616 | { |
|
| 617 | $params = [ |
|
| 618 | 'card_id' => $cardId, |
|
| 619 | ]; |
|
| 620 | ||
| 621 | return $this->parseJSON('json', [self::API_DELETE_CARD, $params]); |
|
| 622 | } |
|
| 623 | ||
| 624 | /** |
|
| 625 | * 设置卡券失效. |
|
| @@ 632-640 (lines=9) @@ | ||
| 629 | * |
|
| 630 | * @return \EasyWeChat\Support\Collection |
|
| 631 | */ |
|
| 632 | public function disable($code, $cardId = '') |
|
| 633 | { |
|
| 634 | $params = [ |
|
| 635 | 'code' => $code, |
|
| 636 | 'card_id' => $cardId, |
|
| 637 | ]; |
|
| 638 | ||
| 639 | return $this->parseJSON('json', [self::API_DISABLE_CARD, $params]); |
|
| 640 | } |
|
| 641 | ||
| 642 | /** |
|
| 643 | * 会员卡接口激活. |
|
| @@ 682-690 (lines=9) @@ | ||
| 679 | * |
|
| 680 | * @return \EasyWeChat\Support\Collection |
|
| 681 | */ |
|
| 682 | public function getMemberCardUser($cardId, $code) |
|
| 683 | { |
|
| 684 | $params = [ |
|
| 685 | 'card_id' => $cardId, |
|
| 686 | 'code' => $code, |
|
| 687 | ]; |
|
| 688 | ||
| 689 | return $this->parseJSON('json', [self::API_GET_MEMBER_USER_INFO, $params]); |
|
| 690 | } |
|
| 691 | ||
| 692 | /** |
|
| 693 | * 更新会员信息. |
|