This plugin integrates Gravity Forms with polish payment gateway - Dotpay. It allows end-users to purchase goods and services via Gravity Forms.
NOTE: this plugin requires Gravity Forms; so you need to have installed and activated Gravity Forms.
- The Gravity Forms plugin
- An account at Dotpay
- Install the Gravity Forms plugin.
- Activate the Gravity forms plugin, and set settings as desired.
- Upload the Gravity Forms Dotpay Add-On to your
/wp-content/plugins/
directory. - Activate Gravity Forms Dotpay Add-On via "Plugins" menu in WordPress.
- Select "Plugins" from the WordPress Admin menu.
- Click the "Settings" link for the Dotpay plugin.
- Enter your Dotpay Shop ID.
- Enter your Dotpay Shop PIN.
- Select desired mode ("Production" or "Testing").
- Save the settings by clicking the "Save Settings" button.
NOTE: It may be required to disable the "Block external urlc" and "HTTPS verify" options in the Dotpay panel.
Copy and paste the code below into your theme’s functions.php
file.
function change_gravity_currency($currencies) {
$currencies['PLN'] = [
'name' => 'Polish Złoty',
'symbol_left' => '',
'symbol_right' => 'zł',
'symbol_padding' => ' ',
'thousand_separator' => ',',
'decimal_separator' => ',',
'decimals' => 2
];
return $currencies;
}
add_filter('gform_currencies', 'change_gravity_currency');
Currently, the only option is to redirect the confirmation to the WordPress page, to which URL parameters should be passed.
- Create new theme template:
<?php /** * Template Name: Thank You Page */ get_header(); ?> <main class="main"> <?php if (isset($_GET['entry']) && is_numeric($_GET['entry'])) { $entry = GFAPI::get_entry($_GET['entry']); if (!is_wp_error($entry)) { switch ($entry['payment_status']) { case 'Paid': echo '<h1>Payment has been successfully confirmed!</h1>'; break; case 'Processing': echo '<h1>Your payment is being processed</h1>'; break; default: echo '<h1>Payment failed...</h1>'; } } } ?> </main> <?php get_footer(); ?>
- Create new WordPress page and select created template.
- Open your form's settings.
- Go to "Confirmations".
- Select your confirmation.
- Select "Page" in "Confirmation Type".
- Choose created page.
- Check "Pass Field Data Via Query String" and paste
entry={entry_id}
. - Save the settings.
- Open your form's settings.
- Go to "Notifications".
- Select your notification.
- Change "Event" to "Payment Completed".
- Save settings.