=== Paytium: Mollie payment forms & donations ===
Contributors: davdebcom
Requires at least: 3.6.1
Tested up to: 6.0.2
Stable tag: 4.3.6
Requires PHP: 7.1
Tags: ideal, mollie, payments, donation, credit card, payment, wordpress payments, payment form, wordpress donation plugin, mollie donations, doneren met mollie, mollie forms
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Mollie forms for payments and donations. With iDEAL, PayPal, Credit cards and recurring payments!

== Description ==

You don't need complex plugins or integrations to start accepting payments with iDEAL (and other payment methods) in WordPress! Get (test) payments running on your site within 15 minutes!

> Use Paytium to create a simple payment form for a product or service. Accept donations or create a small webshop. Paytium supports one-time payments and subscriptions/recurring payments.

= Accept popular payment methods =
Besides iDEAL you can also accept payments with credit cards, PayPal Bancontact/Mister Cash, SOFORT, Bitcoin, Belfius and other payment methods! View a full list at [Mollie](https://www.mollie.com/).

After completing a short and guided setup, you can start adding payment forms with iDEAL (and other payment methods) to your posts or pages. Shortcodes can be inserted with a few clicks directly from the iDEAL button in the WordPress editor.

> Paytium forms can be added in the Classic editor as shown in the below video, and as a block in the new Block editor. In the block editor, add the new "Paytium Code" block by typing /Paytium.

[vimeo https://vimeo.com/318483290]

= Flexible: get creative with iDEAL payments =
There is no limit to the amount of Mollie iDEAL forms you can create in your posts and pages. You can use different amount types.

* static, users just click the "Pay € 20" button
* dynamic, users select an amount in a dropdown
* custom, users enter an amount in a text field

= Pro versions: when you need to grow =
When your payment form really starts to bring in some money, and you need to grow, or want to automate things, consider the Pro versions!

* [Custom text after payment](https://www.paytium.nl/handleiding/eigen-tekst-na-betaling/)
* [Automatic emails](https://www.paytium.nl/handleiding/emails/)
* [MailChimp](https://www.paytium.nl/handleiding/mailchimp/)
* [ActiveCampaign](https://www.paytium.nl/handleiding/activecampaign/)
* [MailPoet](https://www.paytium.nl/handleiding/mailpoet/)
* [Invoices](https://www.paytium.nl/handleiding/facturen/)
* [Export payments](https://www.paytium.nl/handleiding/betalingen-exporteren/)
* [Zapier](https://www.paytium.nl/handleiding/zapier/)

= Examples of what you can do =
* Collect donations for charity, allow people to enter their own amounts
* Add a link to your site on your invoices and ask customers to pay online
* Sell simple products, with registration of customer address details
* Accept online payments for services such as a workshop or coaching sessions
* And more!

= Custom fields: collect all the information you need =
Need more information from your customers, or want to ship something? Add your own fields and view the collected information in the WordPress admin. You can create an email field, text fields, radio buttons and more! Read more in the [manual](https://www.paytium.nl/handleiding/extra-velden/).

> Yes, this is the Gravity Forms & iDEAL alternative you have been waiting for!

[vimeo https://vimeo.com/318483313]

> #### Why payments via Mollie?
>
> Why does Paytium only support Mollie as payment service provider?
>
> * Mollie is the cheapest iDEAL payment provider with 29 cents per iDEAL transaction
> * Besides iDEAL, Mollie also supports many other payment methods, and you just need one Mollie account
> * Your money can be automatically wired to your bank account daily, and for free
> * No hidden, setup or monthly costs, only pay for actual transactions
> * Fully certified by "De Nederlandsche Bank" (DNB), just like the big banks
> * Mollie is the very best in payments, based on my experience with iDEAL since 2008
> * Super fast and friendly helpdesk (via email and telephone)
>
> Read more about [Mollie](https://www.mollie.com/)

= Automatically process recurring payments =
Paytium also supports recurring payments, even for iDEAL payments. Setup a simple subscription, ask customers to pay once to confirm, and see how the next payments come into your bank account automatically.

Yes, recurring payments also work with iDEAL payments! When iDEAL is used for the first payment, the next (automatic) payments are processed with SEPA direct debit (automatische incasso). Read more in the [recurring payments for WordPress](https://www.paytium.nl/handleiding/recurring-payments/) manual.

= What's the big deal about iDEAL? =
Paytium supports almost all Mollie payment methods, including iDEAL but excluding Klarna. But iDEAL is a little special to Paytium, because it's Dutch (and so is Paytium's developer).

The payment method iDEAL is a Dutch payment method supported by almost all Dutch banks. It allow's Dutch consumers to pay easily via the online banking app or the banks website. iDEAL is the most popular payment method in the Netherlands, and 60% of Dutch consumers prefer iDEAL over other payment methods like PayPal. iDEAL is a semi-automated direct online transfer from the consumers bank account to your Mollie account/bank account.

Even though iDEAL is the most popular payment method in the Netherlands, other payment methods like PayPal are becoming more popular. Our advice is to always accept at least iDEAL as payment method in your payment forms, but also enable all other payment methods that are available via Mollie. Consumers like to make payments in their favourite payment method, so it's best to just allow them to make the payments in anyway they like.

A nice thing to know about iDEAL, is that iDEAL payments can not be refunded by consumers. This is of course possible with PayPal or credit card payments. Some businesses see this a big benefit for iDEAL, but consumers off course see this as a limitation. But with good communication between you and your consumers/customers, this shouldn't be a problem for iDEAL payments. You, as a Mollie user, can refund iDEAL payments via the Mollie dashboard. It's just that consumers can't initiate the refund.

= Built by iDEAL expert =
This plugin was created by payments expert and Dutch developer [David de Boer](https://www.paytium.nl/contact/). He spoke about ["iDEAL in WordPress"](http://wordpress.tv/2015/10/22/david-de-boer-ideal-in-wordpress-van-aanvraag-tot-productie/) and ["Trends In Online Payments"](http://wordpress.tv/2016/11/09/david-de-boer-trends-in-online-payments-from-donations-to-recurring-payments/) during WordCamp Netherlands 2015 and 2016 and WordPress Meetup Nijmegen. 
The plugin is in continuous development and is adapted to the latest financial market standards.

= Advice, support or feedback =
You can always [ask us anything](https://www.paytium.nl/contact/) about online payments and iDEAL. Just email us at support@paytium.nl.

= More information =

* Visit the [Paytium website](https://www.paytium.nl/)
* WordCamp 2015 presentation: ["iDEAL in WordPress"](http://wordpress.tv/2015/10/22/david-de-boer-ideal-in-wordpress-van-aanvraag-tot-productie/)
* WordCamp 2016 presentation: ["Trends In Online Payments"](http://wordpress.tv/2016/11/09/david-de-boer-trends-in-online-payments-from-donations-to-recurring-payments/)

== Installation ==

= Plugin installation =
The easiest way to install Paytium is to login to WordPress and go to Plugins > New Plugin. Search for "Paytium" and open the detail view. Click "Install now".

For a manual installation download the plugin from the WordPress repository, and after unzipping it, upload the folder "paytium" to the "wp-content/plugins" directory of your WordPress site.

> Read more about the various options in the [manual](https://www.paytium.nl/handleiding/).

= Setup your Mollie account =
You can create a new Mollie account or connect an existing account via the Setup Wizard ("Installatie hulp" in Dutch) in Paytium itself under Paytium > Setup Wizard. The Setup Wizard helps you configure your Mollie account, so you can start accepting payments as soon as possible.

> [Mollie](https://www.mollie.com/) is a Dutch payment service provider (PSP) which will process your payments and wire your payments to your bank account daily. They are certified by the Dutch national bank (DNB) and are checked just as strict as normal Dutch banks.

= Add payment forms with shortcodes =
After having set up your Mollie account, you can navigate to Posts or Pages in WordPress and open an existing or new page/post. In the page/post edit view you will now see an iDEAL icon in the WordPress editor. Use that iDEAL icon to add default Paytium shortcodes. Feel free to edit texts or amounts. These shortcodes will be transformed to actual iDEAL payment forms and buttons on your site.

> Read more about the various options in the [manual](https://www.paytium.nl/handleiding/).

== Frequently Asked Questions ==

= Where can I find the documentation? =
Paytium is a relatively simple plugin but... we have documentation anyway! To learn more please read the [manual](https://www.paytium.nl/handleiding/). If you still have questions, feel free to email support@paytium.nl.

= Can I get advice about iDEAL and this plugin? =

Yes, it would be our pleasure to advice you on the best way to implement iDEAL payments, email support@paytium.nl.

= Can I accept recurring payments? =

Yes, you can! Learn more about recurring payments in the [recurring payments for WordPress](https://www.paytium.nl/handleiding/recurring-payments/) manual!

= Can I use my own (custom) form fields? =

You can create your own payment forms by using custom fields in Paytium. Read more in the custom fields [manual](https://www.paytium.nl/handleiding/extra-velden/).

= Does Paytium work on local WordPress installations?  =

No, it does not unless you use a service like [ngrok](https://ngrok.com/). Payments can not be processed when originating from a desktop or localhost WP installation. We advice installing and using Paytium on live sites only, maybe in a sub directory, for example yourdomain.nl/test.

= Do I need a chamber of commerce (KVK) number? =

Yes, according to law you really need to be a company, and have a "Kamer van Koophandel" number to accept iDEAL payments.

= What if the Setup Wizard doesn't work? =

Go directly to [Mollie](https://www.mollie.com/) (create an account if you haven't already), login to your account and copy the API Keys to Paytium > Settings.

= Can I redirect users to another page after the payment? =

Yes, you can with the commercial version [Paytium Plus, Pro, Premium](https://www.paytium.nl/prijzen/) or code it yourself. View [code examples](https://www.paytium.nl/handleiding/veelgestelde-vragen/#kan-ik-gebruikers-na-een-betaling-redirecten) in our manual.

= Can I just change the text after payment (without redirect)? =

Yes, you can! You can use the free plugin Say What, or consider using the commercial version [Paytium Plus, Pro, Premium](https://www.paytium.nl/prijzen/). For [Say What](https://wordpress.org/plugins/say-what/), when installed go to Extra > Text changes. Make a new text change with [these details](http://take.ms/IUEJE). Replace "Replacement string" with your text.

== Screenshots ==

1. **Easy to get started with accepting payments** - The built-in wizard helps you to quickly connect your WordPress website to your new or existing Mollie.com account. You can be accepting real payments within one business day (often faster)! The entire process is explained in detail in the wizard itself.
2. **Add payment buttons to posts or pages** - Click on the iDEAL icon in the WordPress editor to quickly add shortcodes in your posts or pages. These shortcodes will be converted to payment buttons and your visitors can use iDEAL or other payment methods to pay for your products or services.
3. **Payment buttons are flexible** - Set a static amount to be paid, ask for donations (custom amounts!) or allow visitors to select an amount for a specific product/service via a dropdown.
4. **Collect customer details** - Need more information, or want to ship something to your visitors? Add your own custom fields and new fields will be added to the payment button!
5. **Payments processed via Mollie.com** - After clicking "Pay" visitors will immediately be redirected to secure payment provider Mollie, which will process the payments and wire the funds to your own bank account. Mollie is certified by the Dutch national bank 'De Nederlandsche Bank (DNB)'.
6. **Review all payments and their status** - Check the status of all payments directly in the WordPress admin. Use the built-in "Order Status" to keep track of your own processing directly in WordPress.

== Changelog ==

= 4.3.6 – September 19, 2022 =
### Plus,Pro, Premium
NEW:
* Zapier code: with a webhook URL to apply second webhook URL to a certain form in payment form.
* Discount Codes: Applying discount code only to First payment of a Recurring Payment subscription.
* Discount Codes : Applying discount to all payments excluding First payment of a Recurring Payment subscription
* Discount Codes: Setting 1 discount code for a particular item in 1 form for different members to use.

### All Paytium Versions
NEW:
* Extra Field : Add Paytium check to submit contact data with payment status when checkbox not checked
* Quantity Field input : Select quantity input to get value selected when minimum quantity is set for Mobile & Tablet
FIX:
* Extra Field:Checkbox notice on non existing array indexes in debug log
* My Profile/User Profile: User created via user_data shortcode payment assigned to subscription.

= 4.3.5 - June 24, 2022 =  
### All Paytium Versions
FIX:
*Conflict with Mollie Libs - GF Mollie by Indigo plugin
NEW:
*Maximum File size upload
*Validation by file type update WP MIME types
*Extra Field - non mandatory  / default / no value - empty space instead of
TAG

Most awesome new features: [memberships](https://www.paytium.nl/handleiding/membership-sites-wordpress/), [crowdfunding](https://www.paytium.nl/handleiding/crowdfunding-wordpress/), [limits](https://www.paytium.nl/handleiding/limieten/), [field quantities](https://www.paytium.nl/handleiding/flexibele-bedragen/), [file uploads](https://www.paytium.nl/handleiding/extra-velden/).
= 4.3.4 = April 21, 2022
### All versions
    FIX - move optional parameters after required PHP8 
### Plus,Pro, Premium    
    FIX - replace email tag with empty string if not filled 


= 4.3.3 = March 8, 2022 
### Plus, Pro, Premium versions

    FIX - Conflict between combining Discount codes with Limits & Stocks          
    FIX - To add shortcodes processing into Invoice template -> to add a       do_shortcode() option for shortcode processing to invoice template for  retrieving extra additional external info of user data on invoice template

### All versions

    FIX - Relevant optional extra data customs fields for detailed viewing in     Payments & no Payments form when showing payment details.

= 4.3.2 February 2, 2022
### Plus, Pro, Premium
FIX
* Updated CSV Files encoding for newer Microsoft Excel compatibility.

= 4.3.1 December 15th, 2021 

# All Paytium versions

NEW
    ‘Submission without payment’ will not send an email when/if status is paid. 
= 4.3.0 - November 21st, 2021 (A11HB) =

FIX
* Canceled /cancelled Status fix 

= 4.1.5 - October 19th, 2021 = 

FIX
* Fix bug where new version updates would keep showing even after installing latest version

= 4.1.4 - October 12th, 2021 = 

NEW
* Attribute minimum amount “[paytium_total]” field

FIX
* Conflict between Dynamic Content for Elementor Pro conditional fields plugin and Molliev2 library 

= 4.1.3 - June 9th, 2021 = 

* Fix bug where library ID's would conflict

= 4.1.2 - May 3rd, 2021 = 

* Recurring Payments: Paypal Recurring payments in Mollie library

= 4.1.1 - April 11th, 2020 =

* IMPORTANT: Subscriptions: Update interval amounts to use slash / as separator, see https://www.paytium.nl/handleiding/recurring-payments/#bezoeker-zelf-interval-laten-kiezen
* Subscription interval amounts: disabled this, so users can also allow customers to select an own interval with custom amount
* Add -appearance: radio (webkit, moz, ms, o) to radio buttons for themes that remove it
* Messages after payment: Check that current page/post is not equal to source page/post, if it isn't - don't replace payment form with message after payment. This allows users to show a new form after a payment redirect.
* Label fields: add more options like step
* Improve validation for open amounts to accept more versions with and without decimals
* Memberships/Content: Fix issue where subscriptions weren't checked properly
* Dropdowns: update &quot;Select an amount&quot; to &quot;Select an option&quot;
* Correct placeholder in First Name field
* Subscriptions: also allow creating subscriptions with mandates that are pending (for Belfius, ING Home'Pay and KBC)
* Add &quot;width: 100%&quot; for textarea's too
* Switch jquery-ui.css UI CSS to be inline (don't load from code.jquery.com)

= 4.1.0 - February 20th, 2020 =

NEW
* Subscriptions first payment: If user set a First Payment Label, override the default translation with that
* Subscriptions: add option for customers to select if they want a recurring payment (yes/no) and update interval options to support &quot;once&quot;
* Subscriptions: add option to allow users to select the interval themselves with radio buttons
* Form design: small improvements to default form design; border-radius for form and button, improved colours
* Fields: add &quot;class&quot; option so you can set a custom class for form field groups
* Added new hook &quot;paytium_after_paytium_user_data_processing&quot; after users are created when a payment is paid
* Quantity with label fields: add option to show amount besides the quantity/number box (for order forms)

FIX
* Postcode field: remove default &quot;1234 ABC&quot; postcode
* Date field validation: parse the date entered by customers in a different way to also support leading zeroes
* Message after (subscription) payment: remove Mollie subscription ID as it's not useful to communicate this to customers
* Terms &amp; Conditions field: add label tags around text
* Label field: move some data (hidden fields) higher in the process so quantity without amounts also works
* Add custom validator for open amount fields with a minimum amount that supports comma's and dots as decimal separator
* Dropdowns: also add first option text support to dropdowns without amounts
* Creating users after payment: convert user role to lowercase, because many users don't use the lowercase slug, but the user role name, even though this is explained in the manual
* Add check that public.js is really loaded and otherwise add notification for admin with link to FAQ 'JavaScript problemen'
* Better CSS formatting for quantity box
* Fix PHP error by checking array is not empty

= 4.0.2 - December 20th, 2019 =

FIX
* Server side validation: store and check if a field is required and filled, before checking structure of entered data
* Add support for minlenght and validation to fields

= 4.0.1 - December 17th, 2019 =

FIX
* Terms checkbox: make it possible to set required to false, Terms are required by default
* After payment message: improve code flow so it better supports custom post types (like Events)
* Form validation: exclude fields for user-data from validation
* Setup Wizard: improve instructions in &quot;Connect a Mollie account&quot;

= 4.0.0 - December 11th, 2019 =

NEW
* Implement basic amount validation after forms are submitted (if you are using custom javascript in your form to manipulate amounts, test this before updating!)
* Date validation: make sure a year contains a maximum of 4 characters
* Add server side validation for some fields (postcode, email, date)
* Add dedicated birthday field, allows selecting a date up to 85 years in the past in the datepicker
* Date field: add default placeholder and validation for correct format (DD-MM-YYY), allow dropdown for month and year in datepicker
* Add dedicated postcode field, with validation for Dutch postcodes
* Add cookie with payment key after payment that can be used later (for Paytium Content)
* Fields: add maxlength and placeholder support
* Add new [paytium_show /] shortcode that allows showing total number and amount of payments
* Crowdfunding: allow showing only the progress bar anywhere on the website, without a full Paytium form
* Crowdfunding: add option to not show decimals in amounts in progress bar
* Setup Wizard: add explanations for Paytium shortcodes with Block editor, Divi, Elementor and other page builders/editors

FIX
* Subscriptions: First Payment gets a new and improved implementation to fix multiple issues with displaying incorrect amounts
* Correct autocomplete value for email fields to email (was name)
* Update item limits &quot;Only %s left&quot; so it's easier to translate
* Limits: also apply limits to max attribute for number/quantity option in fields
* Item limits: update when message &quot;Only x left!&quot; is shown to 10 left instead of 15
* Fix PHP error in Statistics and Item Limits
* Fix issues with &quot;Administrator test-mode&quot; where incorrect mode was used for cancelling subscriptions etc.
* Fix issue with dropdowns and user data (for user registration), where data in dropdowns wasn't registered
* Redirect to Mollie with a GET redirect by forcing a 303 in wp_redirect(), to fix &acirc;€œThe form times out, please try again&acirc;€
* Fix two PHP errors by checking that variable is an array
* Move currency conversion for amounts to better location in code flow
* In public.js update_checkbox_field() make sure function only runs when object is an event
* Changes to handling of API keys, making it more logical and &quot;Administrator test mode&quot; more stable
* Paytium Content/Memberships: optimize usage of undocumented feature &quot;period&quot;
* Add a link to FAQ for warning &quot;No suitable payment methods found&quot;
* More flexible max setting for quantity (use items left or quantity max depending on situation)
* Remove duplicate email validation (now use only Parsley)

= 3.1.2 - October 1st, 2019 =

* Fix - Tested up to WordPress 5.3
* Fix - Paytium Block: update for WordPress 5.3, add new quantity example, further UI improvements
* Fix - Shortcode inserter (WordPress Classic editor): add new example with quantity option and minor improvements

Subscriptions
* Fix - Also store user/author ID (of customer) with renewal payments
* Fix - Add extra warning message after payment for end-users when payment is paid but creating the subscription failed
* Fix - Update first payment date to be correct
* Fix - Add a note explaining that SEPA Direct Debit payments that were already pending before cancelling a subscription, can not be cancelled (also added to manual)
* Fix - When no &quot;times&quot; is set for subscriptions, show &quot;Unlimited&quot; in interface instead of nothing
* Fix - Improve format/design of link to Subscription in Edit &gt; Payment &gt; Subscription information
* Fix - Change date format of subscription cancelled date
* Fix - Show both first payment date and start of renewal payment date in interface
* Fix - Update the error shown when a subscription's first payment is not paid, so it's clearer what happened
* Fix - Add first payment tax and label option for subscription shortcode

* Fix - Remove pt_float_amount_to_currency() from get_item_data(), it's to early, causes issues later in the process
* Fix - Revert &quot;Remove id attribute from individual radio fields (to get HTML validation)&quot;

= 3.1.1 - September 6th, 2019 =

* Fix - Crowdfunding: add option &quot;add_amount&quot; to flexibly add a starting amount to a project

= 3.1.0 - September 5th, 2019 =

* Fix - Fix issue with Paytium Block by removing isEmptyObject (Gutenberg/Block editor)
* Fix - Update jQuery UI to only load on pages with Paytium shortcode, not all pages (improves performance)
* Fix - Improve chargeback notification message/notice
* Fix - Chargeback notification should only be shown in Paytium, not all WP admin pages

= 3.0.13 - July 8th, 2019 =

* Fix - Remove id attribute from individual radio fields (to get HTML validation)
* Fix - Fix minor PHP warning for $paytium_item_limits
* Fix - Solve conflict with CiviCRM by only checking for Subscriptions menu when user is in admin
* Fix - Setup Wizard v4: encode username, countries updated, update text etc
* Fix - Correct multiple issues with display of renewal payments, caused by incorrect SQL query
* Fix - No longer get renewal payment information from first payment, as renewal payment contains it already
* Fix - Paytium Logger: Suppress PHP warning because I'm already checking if file can be opened
* Fix - Replace YouTube video after Setup Wizard with Vimeo video
* Fix - Setup Wizard: remove username and category for Mollie account
* Fix - Paytium Logger: Check file permissions before writing to log (fixes a PHP warning)
* Fix - Webhook: Add better HTTP response code function, add better log messages
* Fix - Webhook: Improve test for _is_admin_test with subscription webhooks to fix PHP warning
* Fix - Improve quantity box field by adding padding (issue in some themes)
* Fix - For payments without payment update amount from dash to 0 to fix &quot;Non-numeric&quot; PHP warnings
* Fix - Update &quot;Only x left!&quot; translation string to not include ()
* Fix - Fix PHP error &quot;Invalid argument supplied for foreach()&quot; in shortcodes.php line 2440
* Fix - Update currency in user entered amount input field (based on bootstrap) to work with more themes
* Fix - Update api.davdeb.com to davdeb.com/api
* Fix - Remove Mollie account create from plugin, no longer supported

= 3.0.12 - May 24th, 2019 =

* Fix - Add isset() check to fix PHP warning about $paytium_payment['subscription_id']
* Fix - Set pt_payment_failed meta box to priority high so it's more visible when something goes wrong
* Fix - Fix incorrect tax in views because amount was set to integer instead of float

* Fix - Zapier: Fix PHP error by setting an array() default for paytium_statuses_webhook
* Fix - Exports: add description to Exports &gt; Payment source
* Fix - Fix warning about non-object when updating Paytium

= 3.0.11 - May 14th, 2019 =

* Fix - Don't load jquery-ui.css on admin pages outside Paytium, fixes conflict with Divi
* Fix - Subscription webhook: improve order so processing with different statuses works better
* Fix - Remove &quot;Open in new window&quot; from links in Subscription details (target blank)
* Fix - Subscription details: make sure a subscription error and details can be shown at the same time
* Fix - Error where a space was required after opening PHP tag (subscription-details.php)
* Fix - Webhook: handle renewal payments with status refund differently (and add log message)
* Fix - Minor: update code comments and log messages

= 3.0.9 - May 6th, 2019 =

* New - Experimental: add &quot;hidden&quot; field type

* Fix - Also show chosen field value in payment items
* Fix - Fix PHP error with &quot;Only x left!&quot; message, check that array key exists before calling the key
* Fix - Recognize some incorrect field types that users might enter and convert them to correct, examples: naam &gt; name, voornaam &gt; firstname, e-mail &gt; email
* Fix - Improve &quot;Unknown field type&quot; warning: only show to admins, only show when defaulting to text field because field type is not known (in switch statement), better explain what's wrong, keep showing field (don't break)
* Fix - Convert field types to lowercase, with not spaces, and trim, in the hope that incorrect types entered by users are recognized by Paytium more often
* Fix - Fix JavaScript error by checking ptCheckboxItemId data exists before handling it
* Fix - Fix issues payment data not being shown by moving pt_get_first_payment_id to payment_functions.php
* Fix - Only show link to Subscriptions Pro Edit screen in Plus, Pro, Premium

= 3.0.8 - April 28th, 2019 =

* Fix - Rename ideal.svg icon to ideal-2019.svg in the hopes it will better bust the cache (and it's not huge anymore)
* Fix - Issue in Internet Explorer 10, where dataset is not supported, now using getAttribute (JavaScript)
* Fix - User entered amounts where not formatted correctly (parseAmount)
* Fix - iDEAL icon/svg in menu size was uncommented in CSS, causing it to be too large
* Fix - Subscription details in some cases where not shown in Payment &gt; Edit

= 3.0.7 - April 24th, 2019 =

Check out the most awesome new features: [memberships](https://www.paytium.nl/handleiding/membership-sites-wordpress/), [crowdfunding](https://www.paytium.nl/handleiding/crowdfunding-wordpress/), [limits](https://www.paytium.nl/handleiding/limieten/), [field quantities](https://www.paytium.nl/handleiding/flexibele-bedragen/), [file uploads](https://www.paytium.nl/handleiding/extra-velden/).

* New: Add Crowdfunding, including a bar with total donations amount
* New: Test forms in test mode without entering API Keys
* New: Administrator test mode (checkbox in settings) allows admins to test payments without other users experiencing this
* New: Add a date with the &quot;until&quot; option to a form and the form will automatically close after that date
* New: Set your own &quot;From&quot; email details in Paytium &gt; Settings &gt; Advanced, other plugins (WP Mail From II) no longer needed)
* New: Add date range selector to Payments overview
* New: Added a better field style for showing currency in the open amount (text) field
* New: Default message after payment will now be shown in the Paytium form/shortcode, and not replace the entire page content. Solves multiple issues with Page Builders. If you don't want this, add 'full_page_return_message' to the starting shortcode of your Paytium form.
* New: Added new field quantity for adding simple amounts, for example `[paytium_field type=&quot;label&quot; label=&quot;Tickets B&quot; amount=&quot;49.95&quot; quantity=&quot;true&quot; /]`
* New: Sell memberships and only allow access to WordPress content when certain (payment) conditions are met
* New: Add date field type, with a little calender pop-up
* New: Store the page/post from where a payment started as &quot;source&quot;
* New: Add &quot;file&quot; field to allow uploads with `[paytium_field type=&quot;file&quot; /]`
* New: Add item limits (basic inventory)
* New: Add optional minimum for open amounts with `min=&quot;&quot;` attribute for fields
* New: Include more payment (meta) date in search, so it's easier to find payments based on user information
* New: Option to set user role when creating users after a payment

* Fix: Paid user registrations (user data), also add the role to existing account(s)
* Fix: Removed the nonce used in payment forms, nonce's aren't for frontend forms!
* Fix: Payment links, also support spaces in URL parameters (remove %20 etc)
* Fix: File field (for uploads): make sure the required option is respected
* Fix: Only show 'Administrator test mode' in Live mode
* Fix: For new quantity fields, set default to 0, not 1
* Fix: Optimize layout of open field with currency symbol
* Fix: Multiple PHP 5.3 warnings (come on, update to at least PHP 7, people!)
* Fix: Update jquery-ui.css enqueue to support http and https
* Fix: Crowdfunding: allow switch between test and live mode, allow multiple forms to have individual counters
* Fix: If Subscription times is a space, set it to empty and process subscription anyway
* Fix: Make sure custom fields are not shown outside of the Paytium form, should solve issues where users have an incorrect form syntax without knowing it.
* Fix: Check for unknown field types in the Paytium form, and show a message. Should prevent users from using &quot;E-mail&quot; instead of &quot;email&quot; as type
* Fix: Selected option not stored with first_option=&quot;amount&quot;
* Fix: Solve issues with Bold Page Builder
* Fix: Handle immediately failed payments, set the status to &quot;failed&quot; instead of keeping them &quot;open&quot;
* Fix: Add specific CSS classes for pt-form-group, so you can call individual form groups with CSS
* Fix: Implement nonce in Paytium forms for increased security
* Fix: Required checkbox in one form shows error in other forms

= 2.1.6 - February 21th, 2019 =

* Update ideal.svg (icon in menu) to have cache busting (so icon isn't gigantic)

= 2.1.5 - January 20th, 2019 =

* Add 'Paytium Code' block for WordPress 5.x Block Editor (includes ideal.svg)
* Setup Wizard: Remove 'I have a Mollie account' form, add a short manual

= 2.1.4 - November 1st, 2018 =

* New: Add support for EPS, GiroPay
* New: Rename MisterCash to Bancontact
* New: In Payments search include meta data so it's more powerful

* Fix: Setup Wizard: better explain what people can do when the wizard fails
* Fix: Add separate items table for payments admin view
* Fix: Don't try to create a subscription if one is already active
* Fix: Language string updates
* Fix: Update API endpoint to https://api.mollie.com (advice by Mollie)
* Fix: Update minimum amount to 99 cent, so 1 euro is accepted
* Fix: Required checkbox shows error in other forms

= 2.1.3 - May 24th, 2018 =

* Fix: Show Paytium iDEAL icon in WP editor with inline CSS (reverted), causes display issues with Media Manager, Updraft Plus etc, replaced with javascript

= 2.1.2 - May 24th, 2018 =

* New: Add new shortcode [paytium_button /] with support for custom css classes, style definitions

* Fix: Default amounts in open fields (donations) weren't registered correctly, causing &quot;Invalid amount&quot; error
* Fix: Remove unused $default and $required for checkbox and terms fields
* Fix: Remove hard-coded required for name, first name and last name fields
* Fix: Show Paytium iDEAL icon in WP editor in Pro versions too (move CSS inline, thank you HTML5!)
* Fix: Only show toolbar and 'Pro versions' link to users with capability 'manage_options'

= 2.1.1 - May 8th, 2018 =

* FIX:
    * PHP 7.x fatal error &quot;Cannot use &quot;self&quot; when no class scope is active&quot;

= 2.1.0 - May 7th, 2018 =

* NEW:
    * Option to process field data as [user information (for creating users and storing as user meta in WordPress)](https://www.paytium.nl/handleiding/na-betaling-gebruikers-aanmaken-wordpress/)
    * Subscriptions: add support for [first payment](https://www.paytium.nl/handleiding/recurring-payments/#afwijkende-eerste-betaling) which is different than recurring payment amount
    * Improved form validation and anti-spam: check that amount is not zero, JavaScript is enabled, and Paytium's JavaScript file is included.
    * Add ability for Paytium to also [sum up checkbox amounts](https://www.paytium.nl/handleiding/flexibele-bedragen/)
    * Many usability improvements based on feedback by users, for example in Setup Wizard
    * Add filter paytium_items_table_emails_invoices for items table (invoices/emails)
    * Updated Mollie API PHP to 1.9.6 (for compatibility with Mollie Payments for WooCommerce)
    * Information from custom fields no longer sent to Mollie by default, see [FAQ](https://www.paytium.nl/handleiding/veelgestelde-vragen/#extra-velden-als-metadata-meesturen-naar-mollie)
    * Add link to [explanation of payment statuses](https://www.paytium.nl/handleiding/betalingen-beheren/#betekenis-van-statussen)
    * Add ING Home'Pay and gift cards as payment methods
    * Add filter ['paytium_payment_description' so developers can change the payment description](https://www.paytium.nl/handleiding/veelgestelde-vragen/#omschrijvingen-van-betalingen-aanpassen)
    * Add link to [pro versions](https://www.paytium.nl/prijzen/) on Paytium website

* FIX:
    * Subscriptions: multiple improvements to processing of subscriptions, making sure new subscriptions can't be created by accident
    * Fix Paytium &gt; Payments view on small screen size
    * Remove pt_is_localhost() check before shortcode generation because in some server configurations, the IP is actually set to 127.0.0.1 even when the server is production
    * Fixed issue where with open fields (user entered custom amount) the amount wasn't stored correctly before payment
    * Add a call to catch $_POST['pt-amount'] for processing payment functions for backwards compatibility of custom integrations
    * Fix bug where field type checkbox only saves one option
    * Make sure required checkboxes only get one &quot;This field is required&quot; error
    * Add explicit explanation that voting on Paytium features subscribes user to newsletter
    * Don't create a Mollie customer when a form doesn't include a payment [(Paytium No Payment)](https://www.paytium.nl/handleiding/formulier-zonder-betaling/)
    * The register_activation_hook was implemented incorrectly and didn't run, causing admin notices to not display
    * Improve 'Items Table' layout in payment edit, invoices, emails
    * Improve styling of dropdowns in forms to look the same as text input
    * Label of fields with type firstname was not stored (by typo in ddata)
    * Checkboxes: remove default checkbox for amounts, make sure terms option is also stored, only sum up amounts for amount checkboxes, not eg. terms
    * Fix harmless warning in developer console for missing Parsley map file
    * Add explanation to prefilled fields (name, firstname, lastname, email) for administrators
    * Email field: fix validation when field not required and empty

= 2.0.6 - January 14th, 2018 =

* FIX:
    * Made sure payment status is translated on return page
    * Paytium Links: amounts with comma's as separator not processed correctly
    * If a form contains multiple required email fields with no input on submit, the &quot;This value is required&quot; message was shown multiple times under the first field
    * Fixed issue where with open fields (user entered custom amount) the amount wasn't stored correctly before payment
    * Remove check for amount format in open amount fields (user entered amount) as it's also done in form processing javascript and causes issues in some browsers (regex pattern)
    * Updated examples in TinyMCE button to match new format, see https://www.paytium.nl/handleiding/flexibele-bedragen/

= 2.0.5 - December 7th, 2017 =

* NOTES:
    * Paytium can now count multiple amounts (bedragen optellen) in one form! Hooray! But this does mean that if you have an incorrect form, the total might be too high. I have a noticed a small group of users have this incorrect setup. Please check your forms after the update, and make sure your total amount is correct.

* NEW:
    * Add new amount shortcodes so you can include multiple items (products/services/amounts) per form
    * Add support for setting a tax percentage per item tag
    * Add support for summing up (optellen) multiple items
    * Add Payments link to WordPress sidebar

* FIX:
    * Make sure extra fields of type textarea are not included in Mollie metadata (otherwise might hit Mollie metadata limit and show an error)
    * Terms &amp; Conditions checkbox: fix bug, link to T&amp;C (with 404 error) shown even when not set
    * Setup Wizard: individual website profiles can now be seen and selected (for users that already have active profiles)
    * Setup Wizard: fix &quot;Check again&quot; button
    * Fix bug when using first name and last name field and recurring payments (Mollie Customer not created)
    * Update minimum capability for Payments overview to edit_posts so Editors can view them
    * Saving selected labels in dropdowns &amp; radio buttons
    * Make sure CSS/icon for Paytium icon in editor is also shown in site

* UX:
    * Subscriptions: show Mollie Customer ID in Subscriptions metabox
    * Subscriptions: improvement to only create a subscription if first payment is not expired, cancelled or failed
    * Subscriptions: fix &quot;Cancel subscription&quot; button and show more useful information to users (after Mollie changed their API, causing an error when button was used)
    * Subscriptions: improve Mollie Subscriptions implementation by saving and showing more useful information to users
    * Payments overview: improve style of status labels in Payments overview
    * Update Parsley.js to 2.7.2 (fixes conflicts with plugins, at least Caldera Forms)

* DEV:
    * Webhook: use GET/POST instead of REQUEST and sanitize input
    * Remove unused libraries: pikaday, WPUpdatePhp, moment.js
    * Subscriptions: only save subscription post meta fields if payment is actually a subscription
    * Moved MailChimp API libraries to pro versions so basic version is lighter
    * Updated Mollie API PHP client to 1.9.1

= 1.5.0 - May 27th, 2017 =

* NEW:
    * Links: pre-fill information into a form from a URL, see [manual](https://www.paytium.nl/handleiding/links/).
    * No Payment: create normal forms that don't need a payment, see [manual](https://www.paytium.nl/handleiding/formulier-zonder-betaling/).
    * Automatically prefill a users name (full, first, last) if logged in

* FIX:
    * Make sure text after clicking Buy Now-button -Even wachten a.u.b- is translatable
    * Improve styling/css of user-entered-amount (open field for amount)
    * Improved translations and fixed typo's
    * Fix bug where newly created profile key was not stored in Setup Wizard

* UX:
    * Don't show a notice for Setup Wizard if Paytium is already set to accept Live payments
    * Don't show Setup Wizard in menu if site is set to Live payments
    * Add admin notice explaining that using the Setup Wizard is not required if site has already received live payments
    * During Setup Wizard only set site to Live payments if website profile is verified, not just on check

* DEV:
    * Split payment, webhook &amp; redirect functions into 3 separate files

= 1.4.1 - March 18th, 2017 =

* NEW: Added (3) better messages after payment per status (paid, open and other statuses)
* NEW: Add new hooks after webhook processing of subscription first and renewal payments, paytium_webhook_subscription_renewal_payment and paytium_webhook_subscription_first_payment
* FIX: Re-add support for sending custom field info to Mollie, but cap at 20 fields because of Mollie metadata size limit
* FIX: Updated always_enqueue check to paytium_always_enqueue, caused scripts to not always load when Paytium shortcode was not found in the content

= 1.4.0 - February 21st, 2017 =

* Bug fixes:
    * Add a custom start date for subscriptions, so they start the interval period after the first payment (no more double payments)
    * Make sure payment status shown after payment (in the Thank you message) is pretty and translated (to Dutch for example), not an untranslated (English) database value
    * Add a colon ':' to the label of paytium_dropdown and paytium_radio automatically, just like the other fields in the payment form
    * Payment and order status labels in Paytium &gt; Payments did not have different colours previously
    * On some sites payment status was not updated because the home_url() didn't include a trailing slash by default, changed webhook URL to always have a trailing slash
    * Also recognize amounts in [paytium_dropdown /] &amp; [paytium_radio /] if there is no description in the options, just an amount
    * Added wp_unslash to remove slashes before description and name are sent to Mollie
    * The error &quot;Invalid Customer ID&quot; will no longer be shown when a webmaster moves from test to live payments and does a test with a known email address
* Subscriptions, improved and extended the implementation of recurring payments:
    * Added Subscription details in Paytium &gt; Payment &gt; Edit Payment, only shown when payment is a subscription
    * Added button to cancel subscriptions from Paytium &gt; Payments &gt; Edit Payment
    * Added an icon to Paytium &gt; Payments, with different colours, indicates if a payment is for a subscription and what the status is
        * Orange icon: subscription pending, not created yet
        * Green icon: subscription created
        * Red icon: creating subscription failed
        * Blue icon: renewal payment for existing subscription
    * Storing more subscription related information to the database, like subscription_payment_status and subscription_error
    * Register a webhook URL for subscriptions at Mollie, so renewal payments for subscriptions will also be sent to the website/Paytium
    * Only try to create a subscription if payment status is paid and there is a valid mandate, and save subscription status to database
* Improvements:
    * Remove limitations in amount of custom fields that can be added and stop sending custom field data to Mollie in metadata (limit was 1024KB)
    * Added a hook (paytium_after_pt_payment_update_webhook) after Mollie calls the webhook, so you can do some addition processing after a payment
    * Added a hook (paytium_after_full_payment_saved) directly after Paytium saves the full payment, for developers PP features
    * Added a hook (paytium_update_payment_status_from_admin) so stuff can be done when status is updated from WordPress admin (like sending emails)
    * Added space between euro currency symbol and amount, as is the norm in the Dutch language
    * Added label option for paytium_total tag, example: label=&quot;Totaal&quot;
    * Added filter pt_after_email_field which allows support for newsletter shortcodes (MailChimp, MailPoet) in the future
    * Added optional processing for newsletter shortcodes (for PP)
    * Added a message to Paytium &gt; Payments &gt; Edit Payment when payment is created in test mode: 'This payment was created in test mode!'
    * Save label and selected option for custom amounts with [paytium_dropdown /] &amp; [paytium_radio /] to database
    * Stop storing pt_cf_radio and pt_cf_dropdown to database, better way to handle them implemented in public.js
    * Removed .mo and .pot files so translations are automatically handled by wordpress.org
    * Removed lot's of redundant code and reformatted other code to WordPress standards
    * Output Mollie 'white screen of death' errors to the user, don't just log them to the debug.log
    * Allow users to configure what the first option in an amount dropdown [paytium_dropdown /] should be
    * Updated payment statuses in Paytium to actual ones that Mollie might use/send to the website
    * Always create a new Mollie customer for every payment, most secure solution for the fact that Paytium has no 'customer management'
    * Make pt_set_paytium_key smarter, so it uses correct key for existing payments

= 1.3.1 - October 25th, 2016 =

* Error shown when customer_id was not set in certain cases
* Improved PHP 5.3 compatibility by switching back to old-style array syntax
* Solved a fatal error on PHP versions below PHP5.5, where empty() doesn't support more than $variables
* Removed check for multiple [paytium_subscription /] tags in one form, incorrectly checks entire content, not just form
* Improved CSS for &quot;User Entered Amounts&quot; so currency and field fit on one line in most themes (.pt-form-group .pt-uea-container input[type=&quot;text&quot;])

= 1.3.0 - October 16th, 2016 =

* NEW: Added support for subscriptions/recurring payments with [paytium_subscription /] shortcode
* FIX: Added default css for .pt-checkout-form button
* FIX: Fixed issue that made all fields required, even if set to required=false

= 1.2.0 - October 7th, 2016 =

* Updated the CSS for fields of the payment form so it automatically works better with more themes
* Updated Mollie API to version 1.6.6/1.7.0 with support for new APIs, Customers and Subscriptions support coming soon
* Added newsletter opt-in notice
* De-minify admin.css and remove admin.scss, as I don't use sass for this plugin
* Added Extensions page so users can show interest in new features
* Other minor UI improvements and fixes

= 1.1.0 - September 13th, 2016 =

* NEW: Added custom fields, current types: text field, text area, email field, radio buttons, checkbox, dropdown, terms &amp; conditions checkbox
* NEW: Added a hook (paytium_after_pt_show_payment_details) after payment, so you can hook into the messages after payment and for example redirect to another page
* NEW: Added Dutch language file for form validation, for example &quot;Dit veld  is verplicht&quot; instead of &quot;This field is required.&quot;
* NEW: Added new option: button_label=&quot;KOPUH!&quot; for custom button text in your forms
* Optimized the code that processed customer_details=&quot;true&quot; to use new custom fields process, keeping it backwards compatible
* Form and field CSS improvements (field margins etc)
* Fixed typo in URL to Mollie.com
* In CSS removed pt-radio-group margin, caused issues in some themes

= 1.0.4 - April 15th, 2016 =

* Added check for no or low amounts, shows a better error when people don't enter an amount or a too low amount
* Cleaned up processing javascript
* Setup wizard &gt; Create profile, make warning more prominent with pt-alert-danger
* Bug fix for &quot;Notice: undefined variable html&quot;
* Removed transaction_id column in Payments overview, not useful for the average user

= 1.0.3 - March 24th, 2016 =

* Changed to profile-verified for consistency with other API methods
* Change client to wordpress (lowercase) for API communication
* Show Mollie transaction ID in Payment overview and edit view
* Add Paytium payment ID to Mollie description
* Update Next step button in Setup wizard &gt; Create profile to go to Payment test instead of Create product step
* Bug fix: incorrect API key used to check status of payments, so status was not updated in WP
* Correct continue button in Setup Wizard &gt; Activate account to link to First product tab

= 1.0.2 - March 15th, 2016 =

* Fixed issue in Setup Wizard with javscript typo (at least in Firefox and Safari)

= 1.0.1 - March 8th, 2016 =

* Turn test mode off in communication to Mollie API
* Added Dutch (nl-NL) language file
* Small changes and typos

= 1.0.0 - March 8th, 2016 =

* Hooray, first public version!

