| 1 | <?php |
||
| 8 | class PreAuthorization extends AbstractSuite |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * Get pre auth code url. |
||
| 12 | */ |
||
| 13 | const GET_PRE_AUTH_CODE = 'https://qyapi.weixin.qq.com/cgi-bin/service/get_pre_auth_code'; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * Pre auth link. |
||
| 17 | */ |
||
| 18 | const PRE_AUTH_LINK = 'https://qy.weixin.qq.com/cgi-bin/loginpage?suite_id=%s$&pre_auth_code=%s$&redirect_uri=%s'; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * Redirect to WeChat PreAuthorization page. |
||
| 22 | * |
||
| 23 | * @param string $url |
||
| 24 | * |
||
| 25 | * @return \Symfony\Component\HttpFoundation\RedirectResponse |
||
| 26 | */ |
||
| 27 | public function redirect($url) |
||
| 33 | |||
| 34 | /** |
||
| 35 | * Get pre auth code. |
||
| 36 | * |
||
| 37 | * @throws \EntWeChat\Core\Exceptions\InvalidArgumentException |
||
| 38 | * |
||
| 39 | * @return string |
||
| 40 | */ |
||
| 41 | public function getCode() |
||
| 55 | } |
||
| 56 |