예제 #1
0
															<div>
                                <input type="hidden" name="LMI_MERCHANT_ID" value="<?php 
        echo $pm->merchants[pmpay::MERCHANT_SBR];
        ?>
" />
                                <input type="hidden" name="LMI_PAYMENT_AMOUNT" value="<?php 
        echo round($sbr->reserve_sum, 2);
        ?>
" />
                                <input type="hidden" name="LMI_CURRENCY" value="RUB" />
                                <input type="hidden" name="LMI_PAYMENT_DESC_BASE64" value="<?php 
        echo base64_encode(iconv('CP1251', 'UTF-8', 'Оплата по договору-оферте ' . $sbr->getContractNum() . '. ' . $ndss . '. Счет #' . $account->id . ', логин ' . $sbr->getLogin()));
        ?>
" />
                                <input type="hidden" name="LMI_PAYMENT_NO" value="<?php 
        echo $pm->genPaymentNo();
        ?>
" />
                                <input type="hidden" name="LMI_SIM_MODE" value="0" />
                                <input type="hidden" name="PAYMENT_BILL_NO" value="<?php 
        echo $account->id;
        ?>
" />
                                <input type="hidden" name="OPERATION_TYPE" value="<?php 
        echo sbr::OP_RESERVE;
        ?>
" />
                                <input type="hidden" name="OPERATION_ID" value="<?php 
        echo $sbr->id;
        ?>
" />
예제 #2
0
 /**
  * Вывод страницы по платежным системам WebMoney /bill/webmoney/.
  */
 public function webmoneyAction()
 {
     front::og('tpl')->page = 'index';
     front::og('tpl')->type = 'webmoney';
     front::og('tpl')->script = array('/scripts/bill2.js', 'md5.js');
     require_once $_SERVER['DOCUMENT_ROOT'] . '/classes/pmpay.php';
     $wmpay = new wmpay();
     $pmpay = new pmpay();
     mt_srand();
     $user = new users();
     $user->GetUserByUID(get_uid(0));
     if (date('Ymd') >= 20130301) {
         // #0022399
         $wm_paymaster = 2;
     } else {
         $wm_paymaster = $user->wm_paymaster;
         $is_weekend = in_array(date('w'), array(0, 6));
         if ($wm_paymaster === null || $wm_paymaster == 2 && $is_weekend) {
             // 1:wmr, 2:paymaster
             $wm_paymaster = 1;
             if (!$is_weekend) {
                 $wm_paymaster += mt_rand(1, 100) > 50;
             }
             $user->setWmPaymaster($user->uid, $wm_paymaster);
         }
     }
     front::og('tpl')->_user = $user;
     front::og('tpl')->payment_number = mt_rand(1, 500000);
     front::og('tpl')->wmr_purse = $wmpay->wmzr[1];
     if ($is_paymaster = $wm_paymaster == 2) {
         front::og('tpl')->payment_number = $pmpay->genPaymentNo();
         front::og('tpl')->wmr_purse = $pmpay->merchants[pmpay::MERCHANT_BILL];
     }
     front::og('tpl')->is_paymaster = $is_paymaster;
     front::og('tpl')->display('bill/bill_paysys.tpl');
 }