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