PHPackages                             milzer/checkout - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Payment Processing](/categories/payments)
4. /
5. milzer/checkout

ActiveLibrary[Payment Processing](/categories/payments)

milzer/checkout
===============

the checkout package for the Nezasa checkout system

v1.0.58(1mo ago)02523[3 PRs](https://github.com/milzer-tech/checkout/pulls)MITPHPPHP ^8.3.0CI failing

Since Aug 24Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/milzer-tech/checkout)[ Packagist](https://packagist.org/packages/milzer/checkout)[ RSS](/packages/milzer-checkout/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (30)Versions (62)Used By (0)

Checkout Process for Nezasa Web Application
===========================================

[](#checkout-process-for-nezasa-web-application)

This Laravel package provides a **complete checkout process** for the Nezasa web application.
It integrates with **Nezasa’s APIs** to handle all the necessary steps for booking an itinerary, ensuring a smooth and reliable booking experience.

Requirements
------------

[](#requirements)

Make sure your environment meets the following requirements:

1. **PHP** 8.3 or higher
2. **MySQL** 8
3. **Laravel** 11 or higher
4. \*\*Redis \*\*

The package relies heavily on cache\*\* and **queues** to ensure better performance.
It is **highly recommended** to use **Redis** as both the queue driver and cache driver for optimal speed and reliability.

Installation &amp; Setup
------------------------

[](#installation--setup)

This package is already installed and pre-configured in the [checkout-main-app repository](https://github.com/milzer-tech/checkout-main-app).

The repository also includes useful configurations and dependencies to help you set up and run a Laravel application faster:

- **Vite configuration** for asset bundling and front-end builds
- **Laravel Horizon** for managing and monitoring queues

With these configurations in place, you can quickly get started with the Nezasa checkout.

Setup on Nezasa instance
------------------------

[](#setup-on-nezasa-instance)

After deploying the laravel application, you need to chanege the following settings on your Nezasa instance:

- Go to Nezasa cockpit
- Then to Settings
- Select your instance
- Click on the checkout tab
- Scroll down to custom checkout
- Change configuration to your laravel application url like

```
http://your-domain.com/checkout/details?checkoutId=${CHECKOUT_ID}&itineraryId=${ITINERARY_ID}&origin=${ORIGIN}

```

Features of the Package
-----------------------

[](#features-of-the-package)

Below is a list of the key features included in this package:

1. **Itinerary Summary** – Summarizes itinerary details such as travel dates, travelers, and pricing.
2. **Contact Form Handling** – Customizes the display and validation of contact input fields based on the Nezasa API.
3. **Traveler Form Handling** – Customizes the display and validation of traveler input fields according to the Nezasa API. The page dynamically adapts to the number of rooms and travelers.
4. **Country List Integration** – Displays the list of countries retrieved from the Nezasa API.
5. **Availability Check** – Automatically checks itinerary availability once the required data is provided, working seamlessly in the background.
6. **Promotional Codes** – Allows applying promotional codes to a booking through the Nezasa API.
7. **Additional Services** – Supports adding and removing extra services in a booking using the Nezasa API.
8. **Payment Provider Integration** – Provides a flexible design to integrate different payment providers into the project. (Currently, only **Oppwa** is supported.)
9. **Transaction Handling** – Initiates and stores transaction data via the Nezasa API.
10. **Booking Confirmation** – Manages booking confirmation and displays the booking reference.
11. **Error &amp; Exception Handling** – Handles errors gracefully, with user-friendly messages and fallback options.
12. **Save Booking State** – Preserves the current state of the booking process. For example, if a user leaves the page while entering traveler details, all entered data is stored and restored the next time they return.
13. **Multi-language Support** – Includes localization for English, German, French, and Spanish, with easy extensibility for additional languages.
14. **Configuration Options** – Offers flexible configuration to adapt the package to project needs, such as updating payment provider credentials.
15. **Best Practices** – Follows industry best practices for security, performance, and code quality, ensuring a robust and maintainable package.

---

### Setting up Configuration

[](#setting-up-configuration)

Add the following variables to the `.env` file of your Laravel application:

```
# Nezasa API
CHECKOUT_NEZASA_BASE_URL="nezasa trip builder api url"
CHECKOUT_NEZASA_USERNAME="username"
CHECKOUT_NEZASA_PASSWORD="password"
```

### Oppwaa payment provide

[](#oppwaa-payment-provide)

You need set up theses variables in the `.env` file of your Laravel application:

```
# Oppwa Payment Provider
CHECKOUT_WIDGET_OPPWA_ACTIVE=true
CHECKOUT_WIDGET_OPPWA_NAME='Oppwa'
CHECKOUT_WIDGET_OPPWA_ENTITY_ID="*******"
CHECKOUT_WIDGET_OPPWA_TOKEN="*******"
```

This a test card number:

```
4200000000000091
```

Enter the remaining data as you wish. You will find the other card number for different situations in this link:

### Stripe payment provide

[](#stripe-payment-provide)

You need set up theses variables in the `.env` file of your Laravel application:

```
# Strip Payment Provider
CHECKOUT_STRIPE_ACTIVE=true
CHECKOUT_STRIPE_NAME='Stripe'
CHECKOUT_STRIPE_SECRET_KEY="your stripe secret key"
```

This a test card number:

```
4242424242424242
```

Enter the remaining data as you wish. You will find the other card number for different situations in this link:

### Computop payment provide

[](#computop-payment-provide)

You need set up theses variables in the `.env` file of your Laravel application:

```
# Strip Payment Provider
CHECKOUT_COMPUTOP_ACTIVE=true

# false for production
CHECKOUT_COMPUTOP_TEST_MODE=true

CHECKOUT_COMPUTOP_NAME='Computop'
CHECKOUT_COMPUTOP_USERNAME='your username'
CHECKOUT_COMPUTOP_PASSWORD='your password'
```

This a test card number:

```
//Mastercard
5555555555554444
```

Enter the remaining data as you wish. You will find the other card number for different situations in this link:

New payment method
------------------

[](#new-payment-method)

One of the main goal of this package is to make it easy to add new payment methods. You need to create a class that implements the related interfaces for a new payment method. All payment classes must implement the `PaymentContract` interface.

```
