ребят помогите не могу понять в чем проблема, пополняю через ф-касу пополнил а зачисления нету (в бд запись идет но со статусом 0) { CONST CASE_FREE_LIMIT = 5; //Checks if 5 cases was opened before opening free case CONST FREE_CASE_MIN_DEPOSIT_ADD = 10; //Skolko nado deneg vvesti na sait chtobi poluchitj shanci na free keisi(FREE_ADD_COUNT) CONST FREE_ADD_COUNT = 5; //Skolko free keisov dobavitj pri popolnenii const merchant_id = '75943'; //free-kassa const merchant_secret_1 = 'xxxxxxxx'; //free-kassa const merchant_secret_2 = 'xxxxxxxx'; //free-kassa const REFERALL_ADD_PROCENT = 5; //Pri popolnenii skolko procentov poluchit referal //Pay function called after deposit public function pay(Request $request){ $amount = $request->ik_am; $type = $request->pm; if((int)$amount < 1){ $amount = 99; } $int_id = \DB::table('payments')->insertGetId([ 'amount' => (int)$amount, 'user' => $this->user->id, 'time' => time(), 'status' => 0, ]); $orderID = $int_id; $sign = md5(self::merchant_id.':'.$amount.':'.self::merchant_secret_1.':'.$orderID); if($type == 'qiwi'){ $url = 'http://www.free-kassa.ru/merchant/c....'&o='.$orderID.'&s='.$sign.'&lang=ru&i=155'; }else if($type == 'card'){ $url = 'http://www.free-kassa.ru/merchant/c...t.'&o='.$orderID.'&s='.$sign.'&lang=ru&i=94'; }else if($type == 'mts'){ $url = 'http://www.free-kassa.ru/merchant/c...t.'&o='.$orderID.'&s='.$sign.'&lang=ru&i=84'; }else if($type == 'biline'){ $url = 'http://www.free-kassa.ru/merchant/c...t.'&o='.$orderID.'&s='.$sign.'&lang=ru&i=83'; }else if($type == 'mega'){ $url = 'http://www.free-kassa.ru/merchant/c...t.'&o='.$orderID.'&s='.$sign.'&lang=ru&i=82'; }else if($type == 'tele2'){ $url = 'http://www.free-kassa.ru/merchant/c....'&o='.$orderID.'&s='.$sign.'&lang=ru&i=132'; }else if($type == 'dogecoin'){ $url = 'http://www.free-kassa.ru/merchant/c....'&o='.$orderID.'&s='.$sign.'&lang=ru&i=168'; }else if($type == 'payeer'){ $url = 'http://www.free-kassa.ru/merchant/c....'&o='.$orderID.'&s='.$sign.'&lang=ru&i=114'; }else if($type == 'yandex'){ $url = 'http://www.free-kassa.ru/merchant/c...t.'&o='.$orderID.'&s='.$sign.'&lang=ru&i=45'; }else if($type == 'exmo'){ $url = 'http://www.free-kassa.ru/merchant/c....'&o='.$orderID.'&s='.$sign.'&lang=ru&i=174'; }else if($type == 'litecoin'){ $url = 'http://www.free-kassa.ru/merchant/c....'&o='.$orderID.'&s='.$sign.'&lang=ru&i=147'; }else if($type == 'bitcoin'){ $url = 'http://www.free-kassa.ru/merchant/c....'&o='.$orderID.'&s='.$sign.'&lang=ru&i=116'; }else if($type == 'wmr'){ $url = 'http://www.free-kassa.ru/merchant/c....'&o='.$orderID.'&s='.$sign.'&lang=ru&i=121'; }else if($type == 'monero'){ $url = 'http://www.free-kassa.ru/merchant/c....'&o='.$orderID.'&s='.$sign.'&lang=ru&i=172'; }else if($type == 'ripple'){ $url = 'http://www.free-kassa.ru/merchant/c....'&o='.$orderID.'&s='.$sign.'&lang=ru&i=173'; }else if($type == 'ethereum'){ $url = 'http://www.free-kassa.ru/merchant/c....'&o='.$orderID.'&s='.$sign.'&lang=ru&i=163'; }else if($type == 'zec'){ $url = 'http://www.free-kassa.ru/merchant/c....'&o='.$orderID.'&s='.$sign.'&lang=ru&i=165'; }else if($type == 'dash'){ $url = 'http://www.free-kassa.ru/merchant/c....'&o='.$orderID.'&s='.$sign.'&lang=ru&i=164'; }else if($type == 'paypal'){ $url = 'http://www.free-kassa.ru/merchant/c...t.'&o='.$orderID.'&s='.$sign.'&lang=ru&i=70'; }else if($type == 'sbank'){ $url = 'http://www.free-kassa.ru/merchant/c...t.'&o='.$orderID.'&s='.$sign.'&lang=ru&i=80'; } //$url = 'http://www.free-kassa.ru/merchant/c...amount.'&o='.$orderID.'&s='.$sign.'&lang=ru'; return redirect($url); } function getIP() { if(isset($_SERVER['HTTP_X_REAL_IP'])) return $_SERVER['HTTP_X_REAL_IP']; return $_SERVER['REMOTE_ADDR']; } //Return function for free-kassa public function getPayment(Request $request){ if (!in_array($this->getIP(), array('136.243.38.147', '136.243.38.149', '136.243.38.150', '136.243.38.151', '136.243.38.189', '88.198.88.98'))) { return "Ip nneatbilst"; } $sign = md5(self::merchant_id.':'.$request->AMOUNT.':'.self::merchant_secret_2.':'.$request->MERCHANT_ORDER_ID); if($sign != $request->SIGN){ return "Signi neatbilst"; } $payment= \DB::table('payments') ->where('id', $request->MERCHANT_ORDER_ID)->first(); if(count($payment) == 0){ return "Neatrada bd"; }else{ if($payment->status != 0){ return "Status nav 0"; }else{ if($payment->amount != $request->AMOUNT){ return "Summa neatbilst"; }else{ $user = User::where('id', $payment->user)->first(); $user->money = $user->money + $payment->amount; if($payment->amount >= self::FREE_CASE_MIN_DEPOSIT_ADD){ $user->free_cases_left = $user->free_cases_left + self::FREE_ADD_COUNT; } $user->save(); $te = User::where('ref_code', $user->ref_use)->first(); if(count($te) == null ||count($te) == 0){ }else{ $bon = (self::REFERALL_ADD_PROCENT/100)*$payment->amount; $te->money = $te->money + $bon; $te->save(); } \DB::table('payments') ->where('id', $payment->id) ->update(['status' => 1]); return 'success'; } } } }