public function getTransactionReference()
{
return isset($this->data['TOKEN']) ? $this->data['TOKEN'] : null;
}
public function testExpressPurchaseFailure() { $httpResponse = $this->getMockHttpResponse('ExpressPurchaseFailure.txt'); $response = new ExpressAuthorizeResponse($this->getMockRequest(), $httpResponse->getBody()); $this->assertFalse($response->isSuccessful()); $this->assertNull($response->getTransactionReference()); $this->assertNull($response->getTransactionReference()); $this->assertSame('This transaction cannot be processed. The amount to be charged is zero.', $response->getMessage()); }