Linux SRV-16 6.18.44-paas #1 SMP PREEMPT_DYNAMIC Thu Aug 13 10:08:12 UTC 2026 x86_64
/
proc
/
212
/
root
/
proc
/
self
/
root
/
proc
/
212
/
task
/
212
/
root
/
proc
/
70528
/
cwd
/
src
/
Service
/
//proc/212/root/proc/self/root/proc/212/task/212/root/proc/70528/cwd/src/Service/StripeService.php
<?php namespace App\Service; use Stripe\Stripe; class StripeService { private $secret; public function __construct($secret) { $this->secret = $secret; } public function checkout(array $data) { // Set your secret key: remember to change this to your live secret key in production // See your keys here: https://dashboard.stripe.com/account/apikeys Stripe::setApiKey($this->secret); $session = \Stripe\Checkout\Session::create([ 'payment_method_types' => ['card'], 'line_items' => [[ 'name' => $data['name'], 'description' => $data['description'], // 'image' => $data['image'], 'amount' => (int) round($data['amount']), 'currency' => 'eur', 'quantity' => 1, ]], 'success_url' => $data['success_url'], 'cancel_url' => $data['cancel_url'], 'metadata' => [ 'cart_id' => $data['cart_id'] ?? 0, ], ]); return $session; } }