Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

卡券类批量获取卡券ID方法支持仅获取指定状态卡券 #132

Merged
merged 1 commit into from
Oct 21, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion src/Wechat/Card.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,12 @@ class Card
const TYPE_LUCKY_MONEY = 'LUCKY_MONEY'; // 红包
const TYPE_MEETING_TICKET = 'MEETING_TICKET'; // 会议门票

const CARD_STATUS_NOT_VERIFY = 'CARD_STATUS_NOT_VERIFY' ; // 待审核
const CARD_STATUS_VERIFY_FAIL = 'CARD_STATUS_VERIFY_FAIL'; //审核失败
const CARD_STATUS_VERIFY_OK = 'CARD_STATUS_VERIFY_OK'; //通过审核
const CARD_STATUS_USER_DELETE = 'CARD_STATUS_USER_DELETE'; //卡券被商户删除
const CARD_STATUS_USER_DISPATCH = 'CARD_STATUS_USER_DISPATCH'; //在公众平台投放过的卡券

const API_CREATE = 'https://api.weixin.qq.com/card/create';
const API_DELETE = 'https://api.weixin.qq.com/card/delete';
const API_GET = 'https://api.weixin.qq.com/card/get';
Expand Down Expand Up @@ -226,14 +232,16 @@ public function update($cardId, $type, array $base = array(), array $data = arra
*
* @param int $offset
* @param int $count
* @param array $statusList
*
* @return array
*/
public function lists($offset = 0, $count = 10)
public function lists($offset = 0, $count = 10, $statusList = array())
{
$params = array(
'offset' => $offset,
'count' => $count,
'status_list' => $statusList
);

$result = $this->http->jsonPost(self::API_LIST, $params);
Expand Down