for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Omnipay\Worldline\Message;
use Omnipay\Common\Message\AbstractResponse;
/**
* Worldline Refund Response
*/
class RefundResponse extends AbstractResponse
{
* Is the response successful?
*
* @return boolean
public function isSuccessful()
if (empty($this->data)) {
return false;
}
return !isset($this->data->errorId) && $this->data->status == 'REFUNDED';
* Numeric status code (also in back office / report files)
* @return null|string
public function getCode()
return $this->data->statusOutput->statusCode
?? $this->data->refundResult->statusOutput->statusCode
?? $this->data->errors[0]->errorCode
?? null;
* Get the authorisation code if available.
public function getTransactionReference()
return $this->data->id ?? null;
* Get the merchant response message if available.
public function getMessage()
return $this->data->status ?? $this->data->errorId ?? null;