-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
elanatar
committed
Jan 17, 2020
1 parent
7894a6b
commit 070d688
Showing
51 changed files
with
970 additions
and
185 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
C:\xampp\htdocs\worldpay\vendor\sapient\module-worldpay\Block\Challenge.php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
<?php | ||
namespace Sapient\Worldpay\Block; | ||
|
||
use Sapient\Worldpay\Helper\Data; | ||
|
||
class Challenge extends \Magento\Framework\View\Element\Template | ||
{ | ||
/** | ||
* @var Sapient\Worldpay\Helper\Data; | ||
*/ | ||
|
||
protected $helper; | ||
|
||
/** | ||
* @var \Magento\Checkout\Model\Session | ||
*/ | ||
protected $checkoutSession; | ||
|
||
/** | ||
* Jwt constructor. | ||
* @param \Magento\Backend\Block\Template\Context $context | ||
* @param \Magento\Checkout\Model\Session $checkoutSession | ||
* @param Data $helper | ||
* @param array $data | ||
*/ | ||
|
||
public function __construct( | ||
\Magento\Backend\Block\Template\Context $context, | ||
\Magento\Checkout\Model\Session $checkoutSession, | ||
Data $helper, | ||
array $data = [] | ||
) { | ||
$this->checkoutSession = $checkoutSession; | ||
$this->_helper = $helper; | ||
parent::__construct($context, $data); | ||
} | ||
|
||
public function getJwtIssuer() | ||
{ | ||
return $this->_helper->isJwtIssuer(); | ||
} | ||
|
||
public function getOrganisationalUnitId() | ||
{ | ||
return $this->_helper->isOrganisationalUnitId(); | ||
} | ||
|
||
public function getDdcUrl() | ||
{ | ||
$ddcurl = ''; | ||
$mode = $this->_helper->getEnvironmentMode(); | ||
if($mode == 'Test Mode'){ | ||
$ddcurl = $this->_helper->isTestDdcUrl(); | ||
} else { | ||
$ddcurl = $this->_helper->isProductionDdcUrl(); | ||
} | ||
return $ddcurl; | ||
} | ||
|
||
public function challengeConfigs(){ | ||
$data['threeDSecureChallengeConfig'] = $this->checkoutSession->get3DS2Config(); | ||
$data['threeDSecureChallengeParams'] = $this->checkoutSession->get3Ds2Params(); | ||
$data['orderId'] = $this->checkoutSession->getAuthOrderId(); | ||
$data['redirectUrl'] = $this->getUrl('worldpay/threedsecure/challengeredirectresponse', ['_secure' => true]); | ||
//$data['redirectUrl'] = $this->getUrl('worldpay/threedsecure/challengeauthresponse', ['_secure' => true]); | ||
return $data; | ||
} | ||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?php | ||
/** | ||
* @copyright 2017 Sapient | ||
*/ | ||
namespace Sapient\Worldpay\Block\Checkout\Hpp; | ||
|
||
class ChallengeIframe extends \Magento\Framework\View\Element\Template | ||
{ | ||
/** | ||
* Constructor | ||
* | ||
* @param \Magento\Backend\Block\Template\Context $context | ||
* @param array $data | ||
*/ | ||
public function __construct( | ||
\Magento\Backend\Block\Template\Context $context, | ||
\Sapient\Worldpay\Model\Checkout\Hpp\Json\Config\Factory $configfactory, | ||
array $data = [] | ||
) { | ||
$this->configfactory = $configfactory; | ||
parent::__construct($context, $data); | ||
|
||
} | ||
|
||
/** | ||
* | ||
* @return string | ||
*/ | ||
public function getRedirectUrl(){ | ||
return $this->getUrl('worldpay/threedsecure/challengeauthresponse', ['_secure' => true]); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
C:\xampp\htdocs\worldpay\vendor\sapient\module-worldpay\Controller\Hostedpaymentpage\Challenge.php |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?php | ||
namespace Sapient\Worldpay\Controller\Hostedpaymentpage; | ||
|
||
class Challenge extends \Magento\Framework\App\Action\Action | ||
{ | ||
protected $_pageFactory; | ||
public function __construct( | ||
\Magento\Framework\App\Action\Context $context, | ||
\Magento\Framework\View\Result\PageFactory $pageFactory) | ||
{ | ||
$this->_pageFactory = $pageFactory; | ||
return parent::__construct($context); | ||
} | ||
|
||
public function execute() | ||
{ | ||
return $this->_pageFactory->create(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.