Ejemplo n.º 1
0
 public function testCreateGetPaymentRequest()
 {
     $res = $this->client->createPaymentRequest($this->paymentRequest);
     codecept_debug($res->getStatusCode());
     codecept_debug($res->getHeaders());
     $this->assertEquals(201, $res->getStatusCode());
     $id = Util::getPaymentRequestIdFromResponse($res);
     $res = $this->client->getPaymentRequest($id);
     $body = Util::decodeResponse($res);
     codecept_debug($body);
     $this->assertEquals($id, $body['id']);
 }
Ejemplo n.º 2
0
 /**
  * @param $handler
  * @return Client
  */
 public function makeClient($handler)
 {
     $rootCert = __DIR__ . '/../_data/ca.crt';
     $clientCert = [__DIR__ . '/../_data/cl.pem', 'swish'];
     return Client::make($rootCert, $clientCert, Client::SWISH_TEST_URL, $handler);
 }