by Version Next on WordPress.org
Create powerful, customizable, and secure payment forms with multiple gateways, conditional logic, and advanced analytics – all inside WordPress.

Dashboard Interface
FormPays Pro is a comprehensive payment form plugin designed to make online payments simple and secure. Whether you’re running a small business or a large site, this plugin provides everything you need to collect payments through custom forms. From flexible payment forms to enterprise-grade security, FormPays Pro is designed to simplify online payments for businesses, nonprofits, and educators.
[formpays_pro_payment_form id="123"]This plugin connects to third-party payment gateway services to process payments. Below is detailed information about each service:
Data Security: All payment data is transmitted securely using HTTPS encryption. Customer payment details (card numbers, etc.) are handled directly by the payment gateways and never stored on your WordPress site.
User Consent: By using payment forms created with this plugin, users consent to their payment data being processed by the selected payment gateway according to that gateway’s terms and privacy policy.
Use the generated shortcode in any post or page:
[formpays_pro_payment_form id=”1″]
Basic form structure:
php
$form_data = array(
'title' => 'Product Payment',
'description' => 'Complete your purchase',
'gateway' => 'razorpay',
'amount_type' => 'fixed',
'fixed_amount' => 999.00,
'currency' => 'INR',
'fields' => array(
array(
'id' => 'name',
'label' => 'Full Name',
'type' => 'text',
'required' => true
),
array(
'id' => 'email',
'label' => 'Email Address',
'type' => 'email',
'required' => true
),
array(
'id' => 'mobile',
'label' => 'Mobile Number',
'type' => 'tel',
'required' => true
)
)
);
`php
$conditional_logic = array(
array(
‘field’ => ‘payment_type’,
‘operator’ => ‘equals’,
‘value’ => ‘business’,
‘action’ => ‘show’,
‘target’ => ‘company_name’
)
);
`
Form submission:
`php
add_action(‘wp_ajax_formpays_pro_submit_form’, ‘handle_payment’);
add_action(‘wp_ajax_nopriv_formpays_pro_submit_form’, ‘handle_payment’);
function handle_payment() {
// Form data is automatically processed
// Payment gateway is initialized
// User is redirected to payment page
}
`
Webhook handling:
php
// Webhook endpoints are automatically created
// /wp-json/formpays-pro/v1/webhook/razorpay
// /wp-json/formpays-pro/v1/webhook/payu
Get transaction:
php
global $formpays_pro;
$transaction = $formpays_pro->transactions->get_transaction('TXN_123');
Update status:
php
$result = $formpays_pro->transactions->update_transaction_status(
'TXN_123',
'success'
);
The plugin includes CSS classes for easy customization:
css
.formpays-pro-form-wrapper { /* Form container */ }
.formpays-pro-field { /* Individual field */ }
.formpays-pro-field-label { /* Field labels */ }
.formpays-pro-field-input { /* Field inputs */ }
.formpays-pro-submit-btn { /* Submit button */ }
`javascript
// Form submission events
jQuery(document).on(‘formpays_pro_form_submit’, function(e, formData) {
// Custom handling before submission
});
// Payment success events
jQuery(document).on(‘formpays_pro_payment_success’, function(e, response) {
// Custom handling after successful payment
});
`
`php
// Modify form data before processing
add_filter(‘formpays_pro_form_data’, ‘modify_form_data’, 10, 2);
// Custom payment validation
add_filter(‘formpays_pro_validate_payment’, ‘custom_validation’, 10, 2);
// Modify email content
add_filter(‘formpays_pro_email_content’, ‘customize_email’, 10, 3);
`
Both Razorpay and PayU support test mode:
1. Enable test mode in gateway settings
2. Use test credentials from your gateway dashboard
3. Test complete payment flow without real charges
Razorpay:
* Success: 4111 1111 1111 1111
* Failure: 4000 0000 0000 0002
PayU:
* Success: 4012 0000 0000 0000
* Failure: 4000 0000 0000 0002
{transaction_id} – Transaction ID{amount} – Payment amount{customer_name} – Customer name{customer_email} – Customer email{payment_date} – Payment date and time{payment_method} – Selected payment method{form_title} – Form title{site_name} – Your site name`php
// Modify email templates
add_filter(‘formpays_pro_email_template’, ‘custom_email_template’, 10, 3);
// Add custom notification recipients
add_filter(‘formpays_pro_admin_emails’, ‘add_custom_emails’);
`
Payment Not Processing:
1. Check gateway credentials
2. Verify webhook URLs are set correctly
3. Check server logs for errors
4. Ensure SSL is enabled (for live mode)
Forms Not Displaying:
1. Check if form is published
2. Verify shortcode syntax
3. Check for JavaScript conflicts
4. Review browser console for errors
Webhook Issues:
1. Verify webhook secret is correct
2. Check webhook URL accessibility
3. Review server logs for webhook failures
4. Test webhook endpoint manually
Enable WordPress debug mode for detailed error logging:
php
// wp-config.php
define('WP_DEBUG', true);
define('WP_DEBUG_LOG', true);
`
GET /wp-json/formpays-pro/v1/forms/{id}
GET /wp-json/formpays-pro/v1/transactions/{id}
POST /wp-json/formpays-pro/v1/webhook/{gateway}
`
`php
// Form submission
wp_ajax_formpays_pro_submit_form
wp_ajax_nopriv_formpays_pro_submit_form
// Admin actions
wp_ajax_formpays_pro_save_form
wp_ajax_formpays_pro_delete_form
wp_ajax_formpays_pro_save_gateway_settings
`
We welcome contributions! Please follow these steps:
This plugin is licensed under the GPL v2 or later.
FormPays Pro – Making payment forms simple and powerful!