Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- include "../../../../cfg.php";
- include "../../../../inc/functions.php";
- $trio_use = isset( $conf['trioApi_use'] ) ? $conf['trioApi_use'] : false;
- $system = 'freekassa';
- $trioApi_shop_id = isset( $conf['trioApi_shop_id'] ) ? $conf['trioApi_shop_id'] : false;
- $trioApi_key = isset( $conf['trioApi_key'] ) ? $conf['trioApi_key'] : false;
- $money = isset( $_REQUEST['money'] ) ? $_REQUEST['money'] : '0';
- $psystem = isset( $_REQUEST['psystem'] ) ? $_REQUEST['psystem'] : false;
- $amount = isset( $_REQUEST['amount'] ) ? $_REQUEST['amount'] : '0';
- $currency = '643';
- if ( $trio_use && $money ) {
- if ( $system == 'freekassa' ) {
- save_stat_pay( $money, $login, '0', 'freekassa', $inv_code );
- if ( isset( $inv_code ) && $inv_code ) {
- $order_id = $inv_code;
- if ( isset( $_REQUEST['bonus_id'] ) && $_REQUEST['bonus_id'] ) {
- $db->run( "update bonus_user set enter_id='$order_id' where bonus_id=" .
- $_REQUEST['bonus_id'] .
- " and user_id=$user_id" );
- }
- // $sign = md5( implode( ':', array(
- // $trioApi_shop_id,
- // $amount,
- // $trioApi_key,
- // $inv_code,
- // )));
- $sposob = '16';
- $sign = md5( implode( ':', array(
- $trioApi_shop_id,
- $psystem,
- $inv_code,
- $amount,
- $trioApi_key,
- )));
- $request = [
- 'amount' => $amount,
- 'currency' => $currency,
- 'shop_id' => $trioApi_shop_id,
- 'shop_invoice_id' => $order_id,
- 'payway' => $psystem,
- ];
- save_log( print_r( $request, 1 ), 'freekassa.log' );
- $db->run( "update enter set status=1 where inv_code='$order_id'" );
- // header("Location: https://pay.maincash.money/ru/payment?shop_id=$trioApi_shop_id&paysystem_id=$sposob&amount=$amount&operation_id=$inv_code&hash=$sign");
- if($psystem == 'card_rub') {
- header("Location: https://pay.maincash.money/ru/payment?shop_id=$trioApi_shop_id&paysystem_id=$psystem&oa=$amount&o=$inv_code&s=$sign&i=160");
- } else if($psystem == 'qiwi_rub') {
- header("Location: http://www.free-kassa.ru/merchant/cash.php?m=$trioApi_shop_id&oa=$amount&o=$inv_code&s=$sign&i=63");
- } else if($psystem == 'yamoney_rub') {
- header("Location: http://www.free-kassa.ru/merchant/cash.php?m=$trioApi_shop_id&oa=$amount&o=$inv_code&s=$sign&i=45");
- } else if($psystem == 'perfectmoney_usd') {
- header("Location: http://www.free-kassa.ru/merchant/cash.php?m=$trioApi_shop_id&oa=$amount&o=$inv_code&s=$sign&i=64");
- } else if($psystem == 'payeer_rub') {
- header("Location: http://www.free-kassa.ru/merchant/cash.php?m=$trioApi_shop_id&oa=$amount&o=$inv_code&s=$sign&i=114");
- } else {
- header("Location: http://www.free-kassa.ru/merchant/cash.php?m=$trioApi_shop_id&oa=$amount&o=$inv_code&s=$sign");
- }
- } else {
- $err = "<p class=\"er\">" . $lang['pay']['nopay'] . "</p>";
- $smarty->assign( 'pay_err', $err );
- }
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement