コード例 #1
0
 /**
  * @param array $options
  * @return OldCompletePurchaseRequest
  */
 public function createRequest($options = [])
 {
     $stub = $this->stub;
     $httpRequest = new HttpRequest([], array_merge(['ik_shop_id' => $stub->purse, 'ik_payment_id' => $stub->payment_no, 'ik_payment_desc' => $stub->description, 'ik_payment_amount' => $stub->amount, 'ik_payment_timestamp' => $stub->time, 'ik_sign_hash' => $stub->sign, 'ik_payment_state' => $stub->state, 'ik_trans_id' => $stub->transactionId, 'ik_paysystem_alias' => $stub->payway], $options));
     $request = new OldCompletePurchaseRequest($this->getHttpClient(), $httpRequest);
     $request->initialize(['signAlgorithm' => $stub->signAlgorithm, 'signKey' => $stub->signKey]);
     return $request;
 }
コード例 #2
0
 public function testSendData()
 {
     $data = $this->request->getData();
     $response = $this->request->sendData($data);
     $this->assertSame('Omnipay\\InterKassa\\Message\\OldCompletePurchaseResponse', get_class($response));
 }