public function pay(PayParam $pay_param) { $submit = new Submit($this->config); //将配置中的关键参数加入到这边 $pay_param->setSellerId($this->config->seller_id); $pay_param->setPartner($this->config->partner); $pay_param->setInputCharset($this->config->input_charset); $pay_param->setSignType($this->config->sign_type); return $submit->buildRequestForm($pay_param, 'get', '确认'); }
/** * @param $subject * * @dataProvider subjectExceptionProvider */ public function testSetSubjectThrowException($subject) { $this->setExpectedException(InvalidParamException::class); $this->pay_param->setSubject($subject); }