sdk_tools = SDKTools::getInstance(); } //=============退款对象 /** * 创建退款对象 * @Author Kelly * @DateTime 2020-10-22 * @version V1.1.4 * @param array * @return array */ public function create($params,$key){ $request_params = $params; $charge_id = isset($params['id']) ? $params['id'] : ''; $request_params = $this->do_empty_data($request_params); $this->setApiKey($key); $req_url = self::$gateWayUrl .$this->endpoint."/". $charge_id. "/refunds"; $this->__init_params(); $header = $this->get_request_header($req_url, $request_params, self::$header); $this->result = $this->ada_request->curl_request($req_url, $request_params, $header, $is_json=true); // $this->result = $this->sdk_tools->post($params, $this->endpoint."/". $charge_id. "/refunds"); } /** * 查询退款对象 * @Author Kelly * @DateTime 2020-10-22 * @version V1.1.4 * @param array * @return array */ public function query($params=array()){ $request_params = $params; $request_params = $this->do_empty_data($request_params); $req_url = self::$gateWayUrl .$this->endpoint."/refunds"; $this->setRsaPrivateKey('MIICdQIBADANBgkqhkiG9w0BAQEFAASCAl8wggJbAgEAAoGBALFOkwRKx2HKMpAL7LUb755cIS7mleort++Rkl25tJMJCf9Ezeyg4xwLBN6RQsLERTAzRKc/EUtxm4/9rzDzvNZ4BegEI8mXWBUrgpn7e1ar8Ek8IRPdXLrozuld9cv56R3yB/Yta0R+kmgCfn2C5V+xtM6njimkOStvdK5cNwqFAgMBAAECgYA5pn+87IeJr1Hjbk0n0g6GYhRUCJuECXUEC0QY/3HMQSsj+f4uy10s2BRcPcUESQbqFjFjY+k+q5DWL7kP5KBoXGnFyflAyRhWGTkSC3VhGixh6ro3EcUJSrFDjGaThGaPrc8Zfcp5JhL5Thi0GaBXSnRH1Cmn4h8gkAEJxIM7PQJBAOq2+oVPtqkj99YRs0eewkZAM7bKRzSwI7OFU6YWsCYVkqNE7Lr3KKGekehuWwkOvrCBR+NEGQfAb557g2CHmzMCQQDBYtgQ5wvl9fD8BWAVKuPoxoleH+9wUQ65Rnt/Ebkx+g8kP37JRun81duLDULTKr/3ak42goE00TfnfeXl0gNnAkA0wuUVypF4/AjeKiRu2RU6zXvSfy36fg3IcRQYpcj7BqZr5TaB4MVVb1vFL+lu482hx63tPIWT5IIy0fj6XgFZAkBinlKLRBgIPISZMPCPuuCg22ZADs8fGucEStI9ub8Uom3IUW0JndVDb5fW8HtMjrd4p8ic+a6ETdFRhx2PNqsvAkAzDvlve56sZnLYx9t/MPkJTK3ZhgVETS0H2FUyJGVOSfjv68bNsUshyPfzJrdbCeLzjMLq8TpyOmiIUAeQ5YCX'); $this->__init_params(); $header = $this->get_request_header($req_url, http_build_query($request_params), self::$headerText); $this->result = $this->ada_request->curl_request($req_url."?".http_build_query($request_params), "", $header, false); // $this->result = $this->sdk_tools->get($params, $this->endpoint."/refunds"); } }