=== Lupeno Tickets ===
Contributors: lupeno
Tags: tickets, events, ticketing, event registration, block
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Sell tickets to your Lupeno events on your own site: a block and a shortcode that embed the event’s ticket selector.

== Description ==

[Lupeno](https://lupeno.com) is a ticketing and event-registration service. Buyers pay the organizer directly — through the organizer’s own payment gateway or bank account — and Lupeno never holds the money.

This plugin puts an event’s ticket selector on any page of your WordPress site:

* **The “Lupeno tickets” block.** Pick the event from your organization’s upcoming events, choose the language and the theme, publish.
* **The shortcode** for sites without the block editor: `[lupeno_tickets event="my-event"]`.
* **Checkout stays on Lupeno.** Buyers choose their tickets on your page; paying happens in a Lupeno window, so card details and buyer data never pass through your site.
* **Read-only pairing.** The plugin needs an API key with the Read scope and only reads your organization’s name and its upcoming events.

The shortcode takes:

* `event` — the event’s web address on Lupeno, or just its last part (required);
* `lang` — `cs` or `en` (the event’s default when left out);
* `theme` — `auto`, `light` or `dark` (the event’s default when left out);
* `title` — the name screen readers announce for the ticket selector.

= Česky =

[Lupeno](https://lupeno.com) je služba pro prodej vstupenek a registrace na akce. Kupující platí přímo pořadateli — přes jeho vlastní platební bránu nebo na jeho bankovní účet — a Lupeno peníze nikdy nedrží.

Plugin vloží výběr vstupenek na libovolnou stránku vašeho webu ve WordPressu: blok „Lupeno tickets“ (akci vyberete ze seznamu nadcházejících akcí vaší organizace, zvolíte jazyk a vzhled) nebo krátký kód `[lupeno_tickets event="moje-akce"]`. Platba proběhne v okně Lupena, takže údaje o kartě ani o kupujících přes váš web nikdy neprocházejí. Plugin potřebuje API klíč s oprávněním Read a čte jen název vaší organizace a její nadcházející akce.

== External services ==

This plugin connects your site to Lupeno (lupeno.com), the ticketing service your events are sold on. It does nothing without it.

**From your server, in the WordPress admin only.** When an administrator opens Settings → Lupeno Tickets, and when someone editing a post opens the block’s event picker, your server calls Lupeno’s API at `https://api.lupeno.com` (`GET /v1/organization` and `GET /v1/events`) with the API key you saved. Lupeno receives the key, your server’s IP address and the plugin’s version; it answers with your organization’s name and its upcoming events. Nothing about your visitors or your WordPress users is sent. Answers are cached for five minutes.

**From your visitors’ browsers, on pages with the block or the shortcode.** The page loads `https://lupeno.com/widget.js`, which shows the event’s ticket selector in a frame from lupeno.com. The visitor’s browser then talks to lupeno.com directly: it sends what any browser sends to a website (IP address, browser details), the event’s slug, the address of your site (its origin, not the full page address), the site the visitor came from (its origin), and campaign parameters from the page’s address (`utm_*` and advertising click identifiers) so that the organizer can see where sales came from. Buying a ticket happens in a window on lupeno.com, where the buyer gives their details to Lupeno and to the event’s organizer — never to your WordPress site.

The plugin itself sets no cookies and adds no tracking to your site.

* Lupeno’s terms: https://lupeno.com/terms
* Lupeno’s privacy policy: https://lupeno.com/privacy

== Installation ==

1. Install and activate the plugin.
2. On Lupeno, open your organization’s **Integrations** tab and make an API key with the **Read** scope.
3. In WordPress, open **Settings → Lupeno Tickets**, paste the key and select **Connect**. The page shows the organization the key belongs to.
4. Add the **Lupeno tickets** block to a page and choose the event — or use the shortcode.

== Frequently Asked Questions ==

= Where do I get an API key? =

On lupeno.com, in your organization’s Integrations tab (or in an event’s Integrations tab, for that event alone). A key with the Read scope is all the plugin needs; it never changes anything on Lupeno. A key limited to one event works too — the block then lists that event only.

= Can I try it without selling real tickets? =

Yes. A test key (`lup_test_…`) lists your events in test mode, and orders made through them are test orders.

= The ticket selector does not appear =

If the event limits its widget to allowed websites (the event’s Integrations tab on Lupeno), your site’s domain must be on the list — Settings → Lupeno Tickets shows it. If your site sends a strict Content Security Policy, allow `https://lupeno.com` in `script-src` and `frame-src`.

= Is the API key safe? =

It is stored in your site’s database and used by your server only. It is never shown again after you save it, never put into your pages, never sent to the block editor, and sent nowhere but Lupeno’s API. Deleting the plugin deletes the key.

== Screenshots ==

1. The Lupeno tickets block with the event picker in the block editor.
2. The event’s ticket selector on a published page.
3. Settings → Lupeno Tickets, connected to an organization.

== Changelog ==

= 1.0.0 =
* First release: the Lupeno tickets block, the `[lupeno_tickets]` shortcode, and API-key pairing in Settings → Lupeno Tickets. English and Czech.
