2022-02-23 09:20:32 +01:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* #PHPHEADER_OECAPTCHA_LICENSE_INFORMATION#
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Article detailed information widget.
|
|
|
|
*/
|
|
|
|
class oeUserComponent extends oeUserComponent_parent
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Class handling CAPTCHA image.
|
|
|
|
*
|
|
|
|
* @var object
|
|
|
|
*/
|
|
|
|
protected $captcha = null;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Template variable getter. Returns object of handling CAPTCHA image
|
|
|
|
*
|
|
|
|
* @return object
|
|
|
|
*/
|
|
|
|
public function getCaptcha()
|
|
|
|
{
|
|
|
|
if ($this->captcha === null) {
|
|
|
|
$this->captcha = oxNew('oeCaptcha');
|
|
|
|
}
|
|
|
|
return $this->captcha;
|
|
|
|
}
|
|
|
|
|
|
|
|
public function createUser()
|
|
|
|
{
|
2023-11-16 09:29:03 +01:00
|
|
|
/* START check for Amazon Pay - no Captcha */
|
2023-11-15 14:38:08 +01:00
|
|
|
ob_start();
|
|
|
|
debug_print_backtrace();
|
|
|
|
$trace = ob_get_contents();
|
|
|
|
ob_end_clean();
|
|
|
|
|
|
|
|
if(str_contains($trace, 'initAmazonPayExpress'))
|
|
|
|
{
|
|
|
|
return parent::createUser();
|
|
|
|
}
|
2023-11-16 09:29:03 +01:00
|
|
|
/* END check for Amazon Pay - no Captcha /
|
2023-11-15 14:38:08 +01:00
|
|
|
|
2023-11-16 09:29:03 +01:00
|
|
|
/* START check for PayPal Checkout - no Captcha */
|
2023-09-05 14:37:54 +02:00
|
|
|
if(\OxidEsales\Eshop\Core\Registry::getConfig()->getRequestParameter('fnc') == 'approveOrder')
|
|
|
|
{
|
|
|
|
return parent::createUser();
|
|
|
|
}
|
2023-11-16 09:29:03 +01:00
|
|
|
/* START check for PayPal Checkout - no Captcha */
|
2023-09-05 14:37:54 +02:00
|
|
|
|
2022-02-23 09:20:32 +01:00
|
|
|
if (!$this->getCaptcha()->passCaptcha()) {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
return parent::createUser();
|
|
|
|
}
|
|
|
|
}
|