<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/6/21
 * Time: 16:09
 */

define('IN_WEB', true);
$sid = (isset($_REQUEST['sid']) == false) ? 19 : $_REQUEST['sid'];
$lid = (isset($_REQUEST['lid']) == false) ? 6 : $_REQUEST['lid'];


if ($sid <= 0) {
    die('no sid. in login.');
}

include_once dirname(__FILE__) . "/../com.php";


//$urlParam = $_SERVER['QUERY_STRING'] ?? $_POST;
////        oo::logs()->debug3('俄语传过来的url参数:'.$urlParam , 'ru_verify.php');
//
//$param = explode('&',$urlParam);
//$data = [];
//foreach ($param as $v) {
//    $arr = explode('=', $v);
//    $data[$arr[0]] = $arr[1] ?? '';
//}
//进行俄语支付参数处理，取$_REQUEST中的，因为可能会有GET或者POST
$param['cp_order_id'] = $_REQUEST['cp_order_id'];
$param['order_id'] = $_REQUEST['order_id'];
$param['goods_id'] = $_REQUEST['goods_id'];
$param['pay_amount'] = $_REQUEST['pay_amount'];
$param['game_id'] = $_REQUEST['game_id'];
$param['user_id'] = $_REQUEST['user_id'];
$param['sign'] = $_REQUEST['sign'];

$data = oo::commonOprModel('paymentru')->deliveryRussianPay($param);
die(json_encode($data));
