Kaynağa Gözat

Check client's IP in payeer's handler

master
Immanuel Onyeka 3 yıl önce
ebeveyn
işleme
b3315791f0
1 değiştirilmiş dosya ile 8 ekleme ve 0 silme
  1. +8
    -0
      app/Http/Controllers/BillingController.php

+ 8
- 0
app/Http/Controllers/BillingController.php Dosyayı Görüntüle

@@ -155,6 +155,13 @@ class BillingController extends Controller

//This needs to check the ip of the sender
public function processPayeer(Request $request) {
$allowed = ['185.71.65.92', '185.71.65.189', '149.202.17.210'];
$ipAddress = $request->ip();

if ($ipAddress !in_array($allowed)){
abort(401);
}

$secret = config('services.payeer.secret');
$arHash = [$request->m_operation_id,
$request->m_operation_ps,
@@ -167,6 +174,7 @@ class BillingController extends Controller
$request->m_desc,
$request->m_status
];

if (isset($request->m_params)) {
$arHash[] = $request->m_params;
}


Yükleniyor…
İptal
Kaydet