agent; } /** * @param string $agent * @return Config */ public function setAgent(string $agent): Config { $this->agent = $agent; return $this; } /** * @return mixed */ public function getToken() { return $this->token; } /** * @param mixed $token * @return Config */ public function setToken($token) { $this->token = $token; return $this; } /** * @return mixed */ public function getEncodingAesKey() { return $this->encodingAesKey; } /** * @param mixed $encodingAesKey * @return Config */ public function setEncodingAesKey($encodingAesKey) { $this->encodingAesKey = $encodingAesKey; return $this; } /** * @return string */ public function getAccessToken(): string { return $this->access_token; } /** * @param string $access_token */ public function setAccessToken(string $access_token) { $this->access_token = $access_token; } /** * @param string $remote_addr */ public function setRemoteAddr(string $remote_addr) { $this->remote_addr = $remote_addr; } /** * @param string $appid */ public function setAppid(string $appid) { $this->appid = $appid; } /** * @param string $mch_id */ public function setMchId(string $mch_id) { $this->mch_id = $mch_id; } /** * @param string $device_info */ public function setDeviceInfo(string $device_info) { $this->device_info = $device_info; } /** * @param string $nonce_str */ public function setNonceStr(string $nonce_str) { $this->nonce_str = $nonce_str; } /** * @param string $body */ public function setBody(string $body) { $this->body = $body; } /** * @param string $out_trade_no */ public function setOutTradeNo(string $out_trade_no) { $this->out_trade_no = $out_trade_no; } /** * @param int $total_fee */ public function setTotalFee(int $total_fee) { $this->total_fee = $total_fee; } /** * @param string $spbill_create_ip */ public function setSpbillCreateIp(string $spbill_create_ip) { $this->spbill_create_ip = $spbill_create_ip; } /** * @param string $notify_url */ public function setNotifyUrl(string $notify_url) { $this->notify_url = $notify_url; } /** * @param string $trade_type */ public function setTradeType(string $trade_type) { $this->trade_type = $trade_type; } /** * @param string $sign_type */ public function setSignType(string $sign_type) { $this->sign_type = $sign_type; } /** * @param string $mch_host */ public function setMchHost(string $mch_host) { $this->mch_host = $mch_host; } /** * @param string $appsecret */ public function setAppsecret(string $appsecret) { $this->appsecret = $appsecret; } /** * @param string $ssl_cert */ public function setSslCert(string $ssl_cert) { $this->ssl_cert = $ssl_cert; } /** * @param string $ssl_key */ public function setSslKey(string $ssl_key) { $this->ssl_key = $ssl_key; } /** * @param string $key */ public function setKey(string $key) { $this->key = $key; } /** * @return string */ public function getAppid(): string { return $this->appid; } /** * @return string */ public function getMchId(): string { return $this->mch_id; } /** * @return string */ public function getDeviceInfo(): string { return $this->device_info; } /** * @return string */ public function getNonceStr(): string { return $this->nonce_str; } /** * @return string */ public function getBody(): string { return $this->body; } /** * @return string */ public function getOutTradeNo(): string { return $this->out_trade_no; } /** * @return int */ public function getTotalFee(): int { return $this->total_fee; } /** * @return string */ public function getSpbillCreateIp(): string { return $this->spbill_create_ip; } /** * @return string */ public function getNotifyUrl(): string { return $this->notify_url; } /** * @return string */ public function getTradeType(): string { return $this->trade_type; } /** * @return string */ public function getSignType(): string { return $this->sign_type; } /** * @return string */ public function getMchHost(): string { return $this->mch_host; } /** * @return string */ public function getAppsecret(): string { return $this->appsecret; } /** * @return string */ public function getRemoteAddr(): string { return $this->remote_addr; } /** * @return string */ public function getSslCert(): string { return $this->ssl_cert; } /** * @return string */ public function getSslKey(): string { return $this->ssl_key; } /** * @return string */ public function getKey(): string { return $this->key; } /** * @param array $configs * @return $this */ public function setConfigs(array $configs) { if (empty($configs)) { return $this; } foreach ($configs as $key => $val) { if (empty($val) || is_array($val)) { continue; } if (!property_exists($this, $key)) { continue; } $this->$key = $val; } return $this; } }