From 23562c32ad355f6e9ff584fda945ab407345edab Mon Sep 17 00:00:00 2001 From: Drylian <109999325+drylian@users.noreply.github.com> Date: Sat, 8 Jul 2023 01:18:01 -0300 Subject: [PATCH] =?UTF-8?q?rEVIS=C3=83O?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Api/Client/Store/MercadoPagoController.php | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/app/Http/Controllers/Api/Client/Store/MercadoPagoController.php b/app/Http/Controllers/Api/Client/Store/MercadoPagoController.php index d4ff3a775..da6d8a30c 100644 --- a/app/Http/Controllers/Api/Client/Store/MercadoPagoController.php +++ b/app/Http/Controllers/Api/Client/Store/MercadoPagoController.php @@ -7,7 +7,6 @@ use MercadoPago\Preference; use Illuminate\Http\Request; use Illuminate\Http\JsonResponse; -use Illuminate\Support\Facades\DB; use Illuminate\Http\RedirectResponse; use Pterodactyl\Exceptions\DisplayException; use Pterodactyl\Http\Controllers\Api\Client\ClientApiController; @@ -50,17 +49,12 @@ public function purchase(MercadoPagoRequest $request): JsonResponse $token = $this->generateToken(); - DB::table('mpago')->insert([ - 'internal_status' => 'Criado', - 'internal_token' => $token, - ]); - SDK::setAccessToken(config('gateways.mpago.access_token')); $preference = new Preference(); $preference->back_urls = [ 'success' => route('api:client:store.mercadopago.callback'), - 'failure' => config('app.url') . '/store/credits', + 'failure' => route('api:client:store.mercadopago.callback'), 'pending' => route('api:client:store.mercadopago.callback'), ]; $preference->notification_url = config('app.url') . '/mercadopago/listen';