public function testFailedPayRequest() { $response = new Ulink_PaymentResponse(); $response->setAmount(new Ulink_Money("23.50")); $response->setCurrency("EUR"); $response->setTimestamp(123); $response->setClientTransactionId(456); $response->setSuccess(false); $response->setTest(false); $response->addError("Wrong signature"); $response->addErrorCode(17987); $this->assertEquals("{\"type\":\"pay-response\",\"timestamp\":123,\"response-url\":null,\"back-url\":null,\"id\":456,\"data\":{\"amount\":\"23.50\",\"currency\":\"EUR\"},\"success\":false,\"test\":false,\"errors\":[\"Wrong signature\"],\"errorCodes\":[17987]}", $response->toJson()); }