Ejemplo n.º 1
0
 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', '确认');
 }
Ejemplo n.º 2
0
 public function testSetInputCharsetThrowException()
 {
     $this->setExpectedException(InvalidParamException::class);
     $this->pay_param->setInputCharset('test');
 }