За последние 24 часа нас посетили 91812 программистов и 6194 робота. Сейчас ищут 1207 программистов ...

Помогите раскоментировать строчки

Тема в разделе "PHP для новичков", создана пользователем bigmir, 17 окт 2018.

  1. bigmir

    bigmir Новичок

    С нами с:
    17 окт 2018
    Сообщения:
    4
    Симпатии:
    0
    Привет всем тестирую одну кмс и нужна Ваша помощь документе cms сказано:
    After successful moderation, check the form of the deposit. If the form does not work and you get the error of generating a digital signature Your project was announced as an intermediary for financial transactions. You need to uncomment out the code line 209, 234, 235, 238, 241 on the page application/views/account/deposit/confirm.php. This code will allow you to send encrypted additional parameters to the server Payeer.
    Мой сайт прошел модерацию и дали ему статус платежный шлюз а вот сам код помогите раскоментировать

    PHP:
    1. <?php /*
    2.               <input type="hidden" name="form[ps]" value="2609">
    3.               <input type="hidden" name="form[curr[2609]]" value="USD">
    4.               */ ?>
    5.               <?php /* Enable submerchant
    6.               <input type="text" name="m_params" value="<?php echo $m_params?>">
    7.               */ ?>
    8.                <?php /*
    9.               <input type="hidden" name="m_cipher_method" value="AES-256-CBC">
    10.               */ ?>
    --- Добавлено ---
    если убираю эти /* знаки появляется синтетическая ошибка <
     
    #1 bigmir, 17 окт 2018
    Последнее редактирование: 17 окт 2018
  2. ADSoft

    ADSoft Старожил

    С нами с:
    12 мар 2007
    Сообщения:
    3.874
    Симпатии:
    753
    Адрес:
    Татарстан
    Синтетическая? Дык вы и по русски то читать не умеете... Куда вам в прграммирование

    Надо ещё убирать и те */
     
  3. MouseZver

    MouseZver Суперстар

    С нами с:
    1 апр 2013
    Сообщения:
    7.840
    Симпатии:
    1.338
    Адрес:
    Лень
    Не поможет
     
    SamyRed нравится это.
  4. bigmir

    bigmir Новичок

    С нами с:
    17 окт 2018
    Сообщения:
    4
    Симпатии:
    0
    если убераю эти /* знаки появ
    Я писал что я хочу стать программистом?
     
  5. Artur_hopf

    Artur_hopf Старожил

    С нами с:
    7 май 2018
    Сообщения:
    2.264
    Симпатии:
    405
    Предполагалось наверное что вы удалите строки содержащие /* если это не php фаил, то так:
    HTML:
    1.  
    2. <input type="hidden" name="form[ps]" value="2609">
    3. <input type="hidden" name="form[curr[2609]]" value="USD">
    4. <input type="text" name="m_params" value="<?php echo $m_params?>">
    5. <input type="hidden" name="m_cipher_method" value="AES-256-CBC">
    6.  
    И у вас где то в этом файле должен указывается $m_params.
     
  6. bigmir

    bigmir Новичок

    С нами с:
    17 окт 2018
    Сообщения:
    4
    Симпатии:
    0
    PHP:
    1.           <?php // Start Payeer form ?>
    2.           <?if($code_method == "payeer"){?>
    3.        
    4.             <?php
    5.               $m_shop = $merchant_account; // merchant ID
    6.               $m_orderid = rand(100000000000, 900000000000); // invoice number in the merchant's invoicing system
    7.               $m_amount = $total_amount; // invoice amount with two decimal places
    8.               $m_curr = $symbol; // invoice currency
    9.               $m_desc = base64_encode($user['username']); // invoice description encoded using a base64
    10.               $m_key = $payeer['api_value1'];
    11.                                      
    12.               // Forming an array for signature generation
    13.               $arHash = array(
    14.                 $m_shop,
    15.                 $m_orderid,
    16.                 $m_amount,
    17.                 $m_curr,
    18.                 $m_desc
    19.               );
    20.  
    21.               // Forming an array for additional parameters
    22.               /*$arParams = array(
    23.                 'submerchant' => $this->settings->site_name,
    24.               );
    25.               // Forming a key for encryption
    26.               $key = md5('0000'.$m_orderid);
    27.               // Encrypting additional parameters
    28.               $m_params = urlencode(base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, $key, json_encode($arParams), MCRYPT_MODE_ECB)));
    29.  
    30.               // Adding parameters to the signature-formation array
    31.               $arHash[] = $m_params;
    32.               */
    33.               // Adding the secret key to the signature-formation array
    34.               $arHash[] = $m_key;
    35.               // Forming a signature
    36.               $sign = strtoupper(hash('sha256', implode(':', $arHash)));
    37.               ?>
    38.    
    39.               <form method="post" action="https://payeer.com/merchant/">
    40.               <input type="hidden" name="m_shop" value="<?php echo $m_shop?>">
    41.               <input type="hidden" name="m_orderid" value="<?php echo $m_orderid?>">
    42.               <input type="hidden" name="m_amount" value="<?php echo $m_amount?>">
    43.               <input type="hidden" name="m_curr" value="<?php echo $m_curr?>">
    44.               <input type="hidden" name="m_desc" value="<?php echo $m_desc?>">
    45.               <input type="hidden" name="m_sign" value="<?php echo $sign?>">
    46.               <?php /*
    47.               <input type="hidden" name="form[ps]" value="2609">
    48.               <input type="hidden" name="form[curr[2609]]" value="USD">
    49.               */ ?>
    50.               <?php /* Enable submerchant
    51.               <input type="text" name="m_params" value="<?php echo $m_params?>">
    52.               */ ?>
    53.                <?php /*
    54.               <input type="hidden" name="m_cipher_method" value="AES-256-CBC">
    55.               */ ?>
    56.               <button type="submit" class="btn btn-success"><?php echo lang('users transfer protect_confirm'); ?></button>
    57.               </form>
    58.    
    59.           <?}else{?>
    60.           <?}?>
    61.           <?php // End Payeer form ?>
    опишу проблему у меня есть сайт платёжный агрегатор как пайеер в данный код надо раскоментировать все закоментированные строки. и обязательно нужен чтоб работал submerchant вот файл на пдф документацию https://www.payeer.com/upload/pdf/PayeerMerchantru.pdf

    Вот что пишет саппорт пайер: Уважаемый пользователь,

    Вам нужно передавать параметр submerchant как указано в документации https://docs.google.com/viewer?url=https://www.payeer.com/upload/pdf/PayeerMerchantru.pdf

    С уважением,
    Служба поддержки.

    P.s Если кто-то хочет помочь через TeamViewer 13.2.26558 буду очень благодарен. Вот логин теамвиевер 1 083 418 678 вот пароль 548ixi Я всегда за компом жду вашей помощи спасибо
     
    #6 bigmir, 18 окт 2018
    Последнее редактирование: 18 окт 2018
  7. Artur_hopf

    Artur_hopf Старожил

    С нами с:
    7 май 2018
    Сообщения:
    2.264
    Симпатии:
    405
    PHP:
    1. <?php // Start Payeer form ?>
    2.           <?if($code_method == "payeer"){?>
    3.          
    4.             <?php
    5.               $m_shop = $merchant_account; // merchant ID
    6.               $m_orderid = rand(100000000000, 900000000000); // invoice number in the merchant's invoicing system
    7.               $m_amount = $total_amount; // invoice amount with two decimal places
    8.               $m_curr = $symbol; // invoice currency
    9.               $m_desc = base64_encode($user['username']); // invoice description encoded using a base64
    10.               $m_key = $payeer['api_value1'];
    11.                                        
    12.               // Forming an array for signature generation
    13.               $arHash = array(
    14.                 $m_shop,
    15.                 $m_orderid,
    16.                 $m_amount,
    17.                 $m_curr,
    18.                 $m_desc
    19.               );
    20.  
    21.               // Forming an array for additional parameters
    22.               $arParams = array(
    23.                 'submerchant' => $this->settings->site_name,
    24.               );
    25.               // Forming a key for encryption
    26.               $key = md5('0000'.$m_orderid);
    27.               // Encrypting additional parameters
    28.               $m_params = urlencode(base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, $key, json_encode($arParams), MCRYPT_MODE_ECB)));
    29.  
    30.               // Adding parameters to the signature-formation array
    31.               $arHash[] = $m_params;
    32.              
    33.               // Adding the secret key to the signature-formation array
    34.               $arHash[] = $m_key;
    35.               // Forming a signature
    36.               $sign = strtoupper(hash('sha256', implode(':', $arHash)));
    37.               ?>
    38.      
    39.               <form method="post" action="https://payeer.com/merchant/">
    40.               <input type="hidden" name="m_shop" value="<?php echo $m_shop?>">
    41.               <input type="hidden" name="m_orderid" value="<?php echo $m_orderid?>">
    42.               <input type="hidden" name="m_amount" value="<?php echo $m_amount?>">
    43.               <input type="hidden" name="m_curr" value="<?php echo $m_curr?>">
    44.               <input type="hidden" name="m_desc" value="<?php echo $m_desc?>">
    45.               <input type="hidden" name="m_sign" value="<?php echo $sign?>">
    46.               <?php /*
    47.               <input type="hidden" name="form[ps]" value="2609">
    48.               <input type="hidden" name="form[curr[2609]]" value="USD">
    49.               */ ?>
    50.               <?php /* Enable submerchant
    51.               <input type="text" name="m_params" value="<?php echo $m_params?>">
    52.               */ ?>
    53.                <?php /*
    54.               <input type="hidden" name="m_cipher_method" value="AES-256-CBC">
    55.               */ ?>
    56.               <button type="submit" class="btn btn-success"><?php echo lang('users transfer protect_confirm'); ?></button>
    57.               </form>
    58.      
    59.           <?}else{?>
    60.           <?}?>
    61.           <?php // End Payeer form ?>
     
  8. bigmir

    bigmir Новичок

    С нами с:
    17 окт 2018
    Сообщения:
    4
    Симпатии:
    0
    Спасибо конечно но эти тоже надо раскоментировать
    PHP:
    1.   <?php /*
    2.               <input type="hidden" name="form[ps]" value="2609">
    3.               <input type="hidden" name="form[curr[2609]]" value="USD">
    4.               */ ?>
    5.               <?php /* Enable submerchant
    6.               <input type="text" name="m_params" value="<?php echo $m_params?>">
    7.               */ ?>
    8.                <?php /*
    9.               <input type="hidden" name="m_cipher_method" value="AES-256-CBC">
    10.               */ ?>
     
  9. Artur_hopf

    Artur_hopf Старожил

    С нами с:
    7 май 2018
    Сообщения:
    2.264
    Симпатии:
    405
    o_O
    PHP:
    1. <?php // Start Payeer form ?>
    2.           <?if($code_method == "payeer"){?>
    3.          
    4.             <?php
    5.               $m_shop = $merchant_account; // merchant ID
    6.               $m_orderid = rand(100000000000, 900000000000); // invoice number in the merchant's invoicing system
    7.               $m_amount = $total_amount; // invoice amount with two decimal places
    8.               $m_curr = $symbol; // invoice currency
    9.               $m_desc = base64_encode($user['username']); // invoice description encoded using a base64
    10.               $m_key = $payeer['api_value1'];
    11.                                        
    12.               // Forming an array for signature generation
    13.               $arHash = array(
    14.                 $m_shop,
    15.                 $m_orderid,
    16.                 $m_amount,
    17.                 $m_curr,
    18.                 $m_desc
    19.               );
    20.  
    21.               // Forming an array for additional parameters
    22.               $arParams = array(
    23.                 'submerchant' => $this->settings->site_name,
    24.               );
    25.               // Forming a key for encryption
    26.               $key = md5('0000'.$m_orderid);
    27.               // Encrypting additional parameters
    28.               $m_params = urlencode(base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, $key, json_encode($arParams), MCRYPT_MODE_ECB)));
    29.  
    30.               // Adding parameters to the signature-formation array
    31.               $arHash[] = $m_params;
    32.              
    33.               // Adding the secret key to the signature-formation array
    34.               $arHash[] = $m_key;
    35.               // Forming a signature
    36.               $sign = strtoupper(hash('sha256', implode(':', $arHash)));
    37.               ?>
    38.      
    39.               <form method="post" action="https://payeer.com/merchant/">
    40.               <input type="hidden" name="m_shop" value="<?php echo $m_shop?>">
    41.               <input type="hidden" name="m_orderid" value="<?php echo $m_orderid?>">
    42.               <input type="hidden" name="m_amount" value="<?php echo $m_amount?>">
    43.               <input type="hidden" name="m_curr" value="<?php echo $m_curr?>">
    44.               <input type="hidden" name="m_desc" value="<?php echo $m_desc?>">
    45.               <input type="hidden" name="m_sign" value="<?php echo $sign?>">
    46.               <input type="hidden" name="form[ps]" value="2609">
    47.               <input type="hidden" name="form[curr[2609]]" value="USD">
    48.               <input type="text" name="m_params" value="<?php echo $m_params?>">
    49.               <input type="hidden" name="m_cipher_method" value="AES-256-CBC">
    50.               <button type="submit" class="btn btn-success"><?php echo lang('users transfer protect_confirm'); ?></button>
    51.               </form>
    52.      
    53.           <?}else{?>
    54.           <?}?>
    55.           <?php // End Payeer form ?>
    Ну как, все устраивает?)