=== Croatrip Booking ===
Contributors: digitalnipuls
Tags: booking, reservations, tours, excursions, hub3
Requires at least: 5.8
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.2.2
License: GPLv3 or later
License URI: https://www.gnu.org/licenses/gpl-3.0.html

Tour and excursion booking with a catalog, schedules and capacities. Pay by bank transfer with a HUB-3 2D barcode, or by card via Stripe.

== Description ==

Croatrip Booking is a simple booking system for tours and excursions, made for travel agencies, boat operators and excursion organizers.

Features:

* Tour catalog with description, image, prices (adult and child), duration and departure point
* Departure schedules with seat counts and automatic counting of free seats
* A booking form that is shown automatically on the single tour page
* Payment by bank transfer with a generated HUB-3 2D barcode (scannable in mobile banking)
* Card payment through Stripe Checkout (Visa, Mastercard, Maestro, Apple/Google Pay)
* Reservations overview in the admin with statuses and CSV export
* Automatic email to the customer and the organizer

Shortcodes:

* [crtb_izleti] displays the tour catalog
* [crtb_rezervacija id="123"] displays the booking form for a specific tour (it also appears automatically on the single tour page)

This plugin sends data to Stripe (https://stripe.com) only when the visitor chooses to pay by card. See Stripe's Terms (https://stripe.com/legal) and Privacy Policy (https://stripe.com/privacy).

== Installation ==

1. In the WordPress admin, go to Plugins > Add New > Upload Plugin.
2. Choose croatrip-booking.zip, click Install Now, then Activate.
3. Open Tours > Payment settings and enter your data (IBAN, recipient, and optionally Stripe keys).
4. Add tours (Tours > Add tour) and their schedules.
5. Place the catalog on a page with the shortcode [crtb_izleti].

== Frequently Asked Questions ==

= Is card payment required? =
No. If you leave the Stripe keys empty, the plugin works with bank transfer and the HUB-3 barcode only.

= How is the 2D barcode generated? =
The barcode is generated according to the Croatian HUB-3 standard (PDF417) from the reservation data and the recipient data in the settings. The GD extension is required on the server to render the barcode image.

= What do I need for Stripe? =
The Secret and Publishable keys from your Stripe Dashboard (Developers > API keys). Use test keys for testing. To confirm card payments reliably, add the webhook URL shown on the settings page to your Stripe Dashboard (event: checkout.session.completed) and paste the webhook signing secret into the settings.

== Screenshots ==

1. Tour catalog
2. Booking form with a payment method choice
3. Payment slip with the HUB-3 2D barcode
4. Reservations overview in the admin

== Changelog ==

= 1.2.2 =
* Coding standards and security hardening (output escaping, input unslashing) for WordPress.org guidelines
* English readme

= 1.2.1 =
* Unique prefix (crtb_) for all functions, settings and data

= 1.2.0 =
* Added Stripe webhook (checkout.session.completed) with signature verification

= 1.1.1 =
* The booking form now appears automatically on the single tour page

= 1.1.0 =
* Added HUB-3 2D barcode (PDF417) on the payment slip and in the email
* Added card payment through Stripe Checkout

= 1.0.0 =
* First version: tour catalog, schedules and capacities, reservations, bank transfer, CSV export

== Upgrade Notice ==

= 1.2.2 =
Compliance and security improvements for WordPress.org submission.

== Third party / bundled libraries ==

This plugin bundles the PDF417 encoder from the TCPDF library (file lib/pdf417.php),
by Nicola Asuni (Tecnick.com), licensed under GNU LGPL v3.
Source: https://github.com/tecnickcom/TCPDF
