Add use MercadoPagoSettings and update $notificationId

now I noticed that the use of MercadoPagoSettings was missing, The notificationId was changed to the correct values to be expected
This commit is contained in:
Drylian 2024-05-23 00:26:18 -03:00
parent 1e1aad1aba
commit 924abc0b79

View file

@ -18,6 +18,7 @@ use Illuminate\Support\Facades\Redirect;
use Illuminate\Support\Facades\Log;
use Illuminate\Support\Facades\Http;
use App\Notifications\ConfirmPaymentNotification;
use App\Extensions\PaymentGateways\MercadoPago\MercadoPagoSettings;
/**
* Summary of MercadoPagoExtension
@ -104,7 +105,7 @@ class MercadoPagoExtension extends AbstractExtension
return response()->json(['success' => true]);
} else {
try {
$notificationId = $request->input('data.id') ?? $request->input('id') ?? $request->input('payment_id') ?? 'unknown';
$notificationId = $laravelRequest->input('data_id') || $laravelRequest->input('data.id') || "unknown";
if ($notificationId == 'unknown') {
return response()->json(['success' => false]);
} else if ($notificationId == '123456') {