for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* @link https://github.com/phpviet/omnipay-vnpay
*
* @copyright (c) PHP Viet
* @license [MIT](https://opensource.org/licenses/MIT)
*/
namespace Omnipay\VNPay\Message;
use Omnipay\Common\Message\AbstractResponse;
* @author Vuong Minh <[email protected]>
* @since 1.0.0
class Response extends AbstractResponse
{
use Concerns\ResponseProperties;
* {@inheritdoc}
public function isSuccessful(): bool
return '00' === $this->getCode();
}
public function isCancelled(): bool
return '24' === $this->getCode();
public function getCode(): ?string
return $this->data['vnp_ResponseCode'] ?? null;
public function getTransactionId(): ?string
return $this->data['vnp_TxnRef'] ?? null;
public function getTransactionReference(): ?string
return $this->data['vnp_TransactionNo'] ?? null;
public function getMessage(): ?string
return $this->data['vnp_Message'] ?? null;