Files
mier-php/application/api/wxapi/request/AccessTokenCodeRequest.php
2025-08-11 10:22:05 +08:00

62 lines
1.1 KiB
PHP

<?php
namespace app\api\wxapi\request;
use app\api\wxapi\Base;
/*
* */
class AccessTokenCodeRequest extends Base
{
private $apiParas = array();
private $appid;
private $secret;
private $code;
public function init(){
$this->setAppId('');
$this->setSecret('');
$this->setCode('');
$this->apiParas['grant_type'] = 'authorization_code';
}
public function getApiMethodName(){
return "sns/oauth2/access_token";
}
public function getApiParas(){
return $this->apiParas;
}
public function putOtherTextParam($key, $value){
$this->apiParas[$key] = $value;
$this->$key = $value;
}
public function setAppId($appid){
$this->appid = $appid;
$this->apiParas["appid"] = $appid;
}
public function getAppId(){
return $this->appid;
}
public function setSecret($secret){
$this->secret = $secret;
$this->apiParas["secret"] = $secret;
}
public function getSecret(){
return $this->secret;
}
public function setCode($code){
$this->code = $code;
$this->apiParas["code"] = $code;
}
public function getCode(){
return $this->code;
}
}