* * @return string [description] */ protected function getTradeType() { return 'JSAPI'; } /** * pay a order. * * @author yansongda * * @param array $config_biz * * @return array */ public function pay(array $config_biz = []) { if (is_null($this->user_config->get('miniapp_id'))) { throw new InvalidArgumentException('Missing Config -- [miniapp_id]'); } $this->config['appid'] = $this->user_config->get('miniapp_id'); $payRequest = [ 'appId' => $this->user_config->get('miniapp_id'), 'timeStamp' => strval(time()), 'nonceStr' => $this->createNonceStr(), 'package' => 'prepay_id='.$this->preOrder($config_biz)['prepay_id'], 'signType' => 'MD5', ]; $payRequest['paySign'] = $this->getSign($payRequest); return $payRequest; } }