Skip to content

Commit

Permalink
fix: qrcode create expire_seconds
Browse files Browse the repository at this point in the history
  • Loading branch information
Player626 authored and RunsTp committed Nov 25, 2020
1 parent 1a9044f commit eaab707
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/Bean/OfficialAccount/QrCodeRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,15 @@ public function buildRequest(): array
$this->action_info = [
'scene' => $scene
];
return parent::toArray(['action_name', 'action_info']);


$columns = ['action_name', 'action_info'];

if (!is_null($this->expire_seconds) && is_numeric($this->expire_seconds)) {
$this->expire_seconds = min($this->expire_seconds, 30 * 86400);
array_push($columns,'expire_seconds');
}

return parent::toArray($columns);
}
}

0 comments on commit eaab707

Please sign in to comment.