=== OtpPal === Contributors: rijensky Donate link: https://otppal.com/ Tags: authentication, verification, otp, two-factor, security Requires at least: 5.6 Tested up to: 6.9 Requires PHP: 7.4 Stable tag: 2.3.8 License: GPL2 License URI: https://www.gnu.org/licenses/gpl-2.0.html Client-side plugin for OtpPal Server – Send and verify OTP messages via WhatsApp. == Description == OtpPal is a client-side WordPress plugin that connects to your OtpPal Server installation to send and verify OTP (One-Time Password) messages via WhatsApp. This plugin enables secure phone number verification for your WordPress forms, helping prevent spam and ensuring legitimate user submissions. **Key Features:** * **WhatsApp OTP Delivery**: Send one-time passwords directly to users via WhatsApp * **Contact Form 7 Integration**: Seamless integration with Contact Form 7 for phone verification * **Flexible Phone Input**: Support for both international and national phone number formats * **Easy Configuration**: Simple setup through WordPress admin panel * **Secure Verification**: Server-side validation ensures secure OTP verification * **Rate Limiting**: Built-in protection against abuse (handled by OtpPal Server) * **Customizable UI**: Clean, responsive lightbox interface for OTP input **Use Cases:** * Verify phone numbers in contact forms * Add two-factor authentication to form submissions * Prevent spam submissions with phone verification * Ensure legitimate user contact information == Installation == 1. Upload the plugin files to `/wp-content/plugins/otppal` directory, or install through the WordPress plugins screen directly 2. Activate the plugin through the 'Plugins' menu in WordPress 3. Ensure you have an active OtpPal Server installation 4. Go to OtpPal > Settings in WordPress admin to configure the plugin 5. Enter your OtpPal Server URL and API key 6. Configure phone format preferences (international or national) == Configuration == 1. Navigate to **OtpPal > Settings** in your WordPress admin panel 2. Enter your **OtpPal Server URL** (e.g., https://otppal.com or your server URL) 3. Enter your **API key** from the OtpPal Server 4. Choose your preferred **Phone Format**: * International: Users enter phone numbers with country code (e.g., +1234567890) * National: Users enter phone numbers without country code (e.g., 1234567890) 5. If using National format, select a **Default Country** for phone number validation 6. Click **Save Settings** == Usage == **Contact Form 7 Integration:** Add phone verification to your Contact Form 7 forms by including the `[otppal_verify]` tag in your form: ``` [text* your-name] [email* your-email] [otppal_verify] [submit "Send"] ``` When users submit the form, they will be prompted to verify their phone number via WhatsApp OTP before the form is submitted. **Embedded Phone Field:** Alternatively, use the `[otppal_phone]` tag to include a phone input field directly in your form: ``` [text* your-name] [email* your-email] [otppal_phone your-phone] [submit "Send"] ``` **Note:** `[otppal_verify]` and `[otppal_phone]` cannot be used together in the same form. **WPForms, Gravity Forms, Fluent Forms, Ninja Forms, Formidable Forms, SureForms:** For these builders, OtpPal uses CSS classes on existing fields instead of custom shortcodes: - Add the CSS class `otppal_phone` to a phone (or text) field to turn it into an **embedded phone field** managed by OtpPal. - Add the CSS class `otppal_verify` to a field to enable **modal-based verification**, which stores the verified phone in a hidden input. OtpPal will automatically: - Initialize the embedded phone widget using your global OtpPal settings (phone format, default country). - Intercept the form submission, open the OTP modal, and only submit after successful verification. - Write the verified phone number into a hidden field so your form plugin receives it like any other field. For best results, use **either** `otppal_phone` **or** `otppal_verify` in a single form, not both. **Typeform (limited integration):** Typeform is a hosted service embedded via iframe, so OtpPal cannot reliably intercept its internal submission flow. You can still use OtpPal alongside Typeform by: 1. Placing an OtpPal-verified phone field or button **above** the Typeform embed on your WordPress page. 2. Requiring users to verify their phone with OtpPal first. 3. Instructing users to enter the same verified phone number in the Typeform itself. This pattern improves trust but is **not a deep integration** like the native WordPress form plugins, and cannot hard-block Typeform submissions. == Frequently Asked Questions == = Do I need an OtpPal Server installation? = Yes, this plugin requires a separate OtpPal Server installation. This plugin is the client-side component that communicates with your server. = How do I get an API key? = You can obtain an API key from your OtpPal Server installation. Check your server's documentation for API key generation. = Does this work with other form plugins? = Currently, OtpPal supports Contact Form 7. Support for other form plugins may be added in future versions. = What phone formats are supported? = The plugin supports both international format (with country code) and national format (without country code). You can configure this in the plugin settings. = Is my data secure? = Yes. The plugin uses secure REST API communication with your OtpPal Server. API keys are stored securely in WordPress options and never exposed to the frontend. = Can I customize the OTP verification interface? = The plugin includes CSS classes that can be customized with your theme's styles. Check the plugin's CSS files for available classes. = What happens if a user doesn't receive the OTP? = Users can request a new OTP if they don't receive the message. The plugin includes error handling and retry functionality. == Screenshots == 1. Plugin settings page 2. OTP verification lightbox 3. Contact Form 7 integration example == Changelog == = 1.0.0 = * Initial release * Contact Form 7 integration * International and national phone format support * OTP verification via WhatsApp * Admin settings page * REST API integration with OtpPal Server == Upgrade Notice == = 1.0.0 = Initial release of OtpPal client plugin. Requires OtpPal Server installation. == Support == For support, please visit the plugin's support forum or contact the plugin author. For issues related to OtpPal Server, please refer to your server's documentation.