for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* @link https://github.com/phpviet/omnipay-onepay
*
* @copyright (c) PHP Viet
* @license [MIT](https://opensource.org/licenses/MIT)
*/
namespace Omnipay\OnePay\Message;
use Omnipay\Common\Message\RedirectResponseInterface;
use Omnipay\Common\Message\RequestInterface;
* @author Vuong Minh <[email protected]>
* @since 1.0.0
class PurchaseResponse extends Response implements RedirectResponseInterface
{
* @var string
private $redirectUrl;
* Khởi tạo đối tượng PurchaseResponse.
* @param \Omnipay\Common\Message\RequestInterface $request
* @param $data
* @param $redirectUrl
public function __construct(RequestInterface $request, $data, $redirectUrl)
parent::__construct($request, $data);
$this->redirectUrl = $redirectUrl;
}
* {@inheritdoc}
public function isSuccessful(): bool
return false;
public function getRedirectUrl(): string
return $this->redirectUrl;
public function isRedirect(): bool
return true;