=== 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.9 License: GPL2 License URI: https://www.gnu.org/licenses/gpl-2.0.html Client-side plugin for OtpPal – Send and verify OTPs via WhatsApp. == Description == OtpPal is a client-side WordPress plugin that connects to otppal.com 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 (OtpPal.com) * **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. Go to OtpPal > Settings in WordPress admin to configure the plugin 4. Enter your API key (get it at https://otppal.com) 5. Configure phone format preferences (international or national) == Configuration == 1. Navigate to **OtpPal > Settings** in your WordPress admin panel 2. Enter your OtpPal **API key** 3. 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) 4. If using National format, select a **Default Country** for phone number validation 5. 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, Elementor Pro:** 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 == = Does this plugin enable OTP login for my users? Yes! with a fully customizable login button. Just enable it in the settings, and use the shortcode to embed it anywhere on your site. = How do I get an API key? = You can obtain an API key from OtpPal at https://otppal.com. = Does this work with other form plugins? = OtpPal supports many different integrations including Contact Form 7, Elementor Pro, WPForms, Gravity Forms, Fluent Forms, Ninja Forms, Formidable Forms, and SureForms. See otppal.com for more information. = 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. When using international format, the plugin automatically detects the user's country based on their IP address for a better user experience. = Is my data secure? = Yes. The plugin uses secure REST API communication with the OtpPal Servers. Phone numbers aren't saved anywhere. = 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 == = 2.3.9 = * Enhanced phone number lookup to support both billing and shipping phone fields * Improved OTP lightbox state transitions after errors * Fixed compatibility issues with WooCommerce admin classes = 2.3.8 = * Stability improvements = 2.3.7 = * Stability improvements = 2.3.6 = * Country autodetect on international format = 2.3.5 = * Security and UI enhancements = 2.3.4 = * Security enhancements = 2.3.3 = * Security enhancements = 2.3.2 = * Javascript improvements = 2.3.1 = * Stability improvements = 2.3.0 = * Rebuild user lookup = 2.2.0 = * Rebuild plugin to server authentication = 2.1.0 = * Add customization options = 2.0.0 = * Improve security * Add OTP login = 1.0.3 = * Add form plugin integrations = 1.0.2 = * Add form plugin integrations = 1.0.1 = * Stability improvements = 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 the OtpPal server == Upgrade Notice == = 2.3.9 = Enhanced phone number matching and improved error handling in OTP verification flow. = 2.3.8 = Rebuild plugin with security enhancements and new json api url structure = 1.0.0 = Initial release of OtpPal client plugin. == Support == For support, please visit the plugin's support forum or contact the plugin author.