uawdijnntqw1x1x1
IP : 216.73.216.93
Hostname : panel.codeskitter.com
Kernel : Linux panel.codeskitter.com 6.8.0-100-generic #100-Ubuntu SMP PREEMPT_DYNAMIC Tue Jan 13 16:40:06 UTC 2026 x86_64
Disable Function : apache_child_terminate, apache_note, apache_setenv, define_syslog_variables, dl, link, opcache_get_status, openlog, pcntl_exec, pcntl_fork, pcntl_setpriority, popen, posix_getpwuid, posix_kill, posix_mkfifo, posix_setpgid, posix_setsid, posix_setuid
OS : Linux
PATH:
/
home
/
users
/
unlimited
/
www
/
learnoid.codeskitter.site
/
app
/
Services
/
PaypalPayment.php
/
/
<?php namespace App\Services; use App\Interfaces\PaymentGatewayInterface; use Illuminate\Support\Facades\Session; use PayPalCheckoutSdk\Core\PayPalHttpClient; use PayPalCheckoutSdk\Core\ProductionEnvironment; use PayPalCheckoutSdk\Core\SandboxEnvironment; use PayPalCheckoutSdk\Orders\OrdersCreateRequest; class PaypalPayment implements PaymentGatewayInterface { public function processPayment($amount, array $data, array $configInput) { $environment = $configInput['mode'] === 'live' ? new ProductionEnvironment($configInput['client_id'], $configInput['client_secret']) : new SandboxEnvironment($configInput['client_id'], $configInput['client_secret']); $client = new PayPalHttpClient($environment); $request = new OrdersCreateRequest(); $request->prefer('return=representation'); $request->body = [ 'intent' => 'CAPTURE', 'purchase_units' => [[ 'amount' => [ 'currency_code' => 'USD', 'value' => $amount, ], ]], 'application_context' => [ 'return_url' => route('paypal.payment.success', $data['identifier'], $environment), 'cancel_url' => route('paypal.payment.cancel'), ], ]; try { $response = $client->execute($request); $url = $response->result->links[1]->href; // Redirect to PayPal for payment approval return redirect()->away($url); } catch (\Exception $e) { return response()->json(['message' => $e->getMessage()], 400); } } }
/home/users/unlimited/www/learnoid.codeskitter.site/app/Services/PaypalPayment.php