Basic authentication in payment

11.02.2017 10:42
#1
alex_buinskiy
Joomshopping forum user no avatar
Name: Alex
11.02.2017
Сообщения: 1
Quote
Basic authentication in payment

Good afternoon!
A question about payment.
After forming the url step 6, the bank sends a get request. Back from the bank returns to get an answer to basic authentication.
The function checkTransaction prescribed entering login and password basic authentication:
function checkTransaction {
$ Basic_login = $ pmconfigs [ 'basic_login'];
$ Basic_pass = $ pmconfigs [ 'basic_password'];
if (isset ($ _ SERVER [ 'REDIRECT_HTTP_AUTHORIZATION'])) {
$ _SERVER [ 'HTTP_AUTHORIZATION'] = $ _SERVER [ 'REDIRECT_HTTP_AUTHORIZATION'];
}

if (preg_match ( '/ Basic \ s + (. *) $ / i', $ _SERVER [ 'HTTP_AUTHORIZATION'], $ matches))
        {
            list ($ name, $ password) = explode ( ':', base64_decode ($ matches [1]));
            $ _SERVER [ 'PHP_AUTH_USER'] = strip_tags ($ name);
$ _SERVER [ 'PHP_AUTH_PW'] = strip_tags ($ password);
}
        
      else if (! isset ($ _ SERVER [ 'PHP_AUTH_USER'])) {
            header ( 'WWW-Authenticate: Basic realm = "elitinstrument"');
            header ( 'HTTP / 1.0 401 Unauthorized');
            echo 'Cancel';
            exit;
        } else
            if ($ _ SERVER [ 'PHP_AUTH_USER']! = $ basic_login && $ _SERVER [ 'PHP_AUTH_PW']! = $ basic_pass)
{
                header ( 'WWW-Authenticate: Basic realm = "Authorize"');
                header ( 'HTTP / 1.0 401 Unauthorized');
                exit;
                }
else
{

The problem is that the server logs an error 403 Access:
elitinstrument.ru 195.225.38.65 - powmab06 [11 / Feb / 2017: 00: 52: 54 +0300] "GET /index.php?option=com_jshopping&controller=checkout&task=step7&act=check&js_paymentclass=pm_gpb&trx_id=31D8DCED17F819F407BEBE78482D8EBF&lang_code=RU&merch_id=FD164EF79F423A61B6402F92E6A065FA&o.email= res% 2540res.ru & o.total_end = 2750.0 & o.order_id = 169 & ts = 20,170,211 + 00% 253A55% 253A04 HTTP / 1.1 "403 676" - "" Java / 1.8.0_121 "0

Question: where you must register Basic authentication, basic authentication is passed to and reach the 7 Steps?[


Joomla: Joomla! 3.6.5 Stable
JoomShopping: Version 4.11.4
PHP: 5.6.18-pl0-gentoo
MySQL: 5.6.33-79.0-log
Website Url: https://elitinstrument.ru
 


Copyrights MAXXmarketing GmbH. Alle Rechte vorbehalten
Durch die Nutzung dieser Website stimme ich zu, dass Cookies zur optimalen Gestaltung der Website sowie zur Analyse der Nutzung der Website verwendet werden. Weiterführende Informationen finden Sie hier. OK, einverstanden.