1. Go to this page and download the library: Download webcraft/lunar-mollie library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
//app/Http/Livewire/CheckoutSuccessPage.php
namespace App\Http\Livewire;
use Livewire\Component;
use Lunar\Facades\CartSession;
use Lunar\Models\Cart;
use Lunar\Models\Order;
class CheckoutSuccessPage extends Component
{
public ?Cart $cart;
public Order $order;
public function mount()
{
$this->cart = CartSession::current();
if (! $this->cart || ! $this->cart->completedOrder) {
$this->redirect('/');
return;
}
$this->order = $this->cart->completedOrder;
CartSession::forget();
}
public function render()
{
return view('livewire.checkout-success-page');
}
}