input(); if(!$this->input['mid']){ $this->no(-1); } $this->mid = $this->input['mid']; $this->product = $this->input['product_key']; $this->getMerchant(); $param['cash'] = $this->input['cash']; $param['mobile'] = $this->input['account']; $param['product'] = $this->input['product_key']; $param['order'] = $this->input['order_no']; $data = ChannelService::instance()->use($this->mid, $this->product, $param, true); $this->yes($data); } protected function maketime($v): float|false|int|string { if (!$v) { return ''; } if (is_numeric($v)) { return $v; } if (is_array($v)) { $v = $v[1]; } if (strstr($v, ' ')) { $t = explode(' ', $v); $v = $t[0]; $s = explode(':', $t[1]); } else { $s = array(0, 0, 0); } if (!isset($s[1])) { $s[1] = 0; } if (!isset($s[2])) { $s[2] = 0; } if (strstr($v, '-')) { $t = explode('-', $v); } elseif (strstr($v, '/')) { $u = explode('/', $v); $t[0] = $u[2]; $t[1] = $u[0]; $t[2] = $u[1]; } if (!isset($t)) { $t = array(0, 0, 0); } if (!isset($t[1])) { $t[1] = 0; } if (!isset($t[2])) { $t[2] = 0; } $v = mktime($s[0], $s[1], $s[2], $t[1], $t[2], $t[0]); return $v; } }