Tested Updated Bestseller Perfect rating Documented

Custom Payment Gateways for WooCommerce

(4 customer reviews)

From: $29.99 / year

Add multiple custom payment gateways to WooCommerce.

$29.99 Single site1 year of updates and support30-day money-back guaranteeBuy
$79.99 Unlimited sites1 year of updates and support30-day money-back guaranteeBuy
$149.99Unlimited sitesLifetime updates and support30-day money-back guaranteeBuy
Clear

Description

Custom Payment Gateways for WooCommerce Pro plugin lets you add multiple custom payment gateways to WooCommerce.

With this plugin you can add any number of custom payment gateways to WooCommerce. Just go to “WooCommerce > Settings > Custom Payment Gateways”, set “Number of gateways” option to total number of gateways you want to add and click “Save changes” button. After that on the same screen you will be able to set admin titles for each gateway.

Custom Payment Gateways for WooCommerce - General Settings

After setting total number of gateways, visit “WooCommerce > Settings > Payments” (or “WooCommerce > Settings > Checkout” in older versions of WooCommerce) to set each gateway’s options. For each custom payment gateway you can set:

General Options

Custom Payment Gateways for WooCommerce - Gateway Options - General

Enable/Disable
Enables/disables the current custom payment gateway.
Default: no
Title
Controls the title which the user sees during checkout.
Default: Custom Payment Gateway
Description
Payment method description that the customer will see on your checkout.
Default:
Custom Payment Gateway Description.
Instructions
Instructions that will be added to the thank you page.
Default: None
Email instructions
Instructions that will be added to the emails.
Default: None
Icon
If you want to show an image next to the gateway’s name on the frontend, enter a URL to an image.
Default: None

Advanced Options

Custom Payment Gateways for WooCommerce - Gateway Options - Advanced

Minimum order amount
If you want to set minimum order amount (excluding fees) to show this gateway on frontend, enter a number here. Set to 0 to disable.
Default: 0
Enable for shipping methods
If gateway is only available for certain shipping methods, set it up here. Leave blank to enable for all methods.
Default: None
Accept for virtual orders
Do accept gateway if the order is virtual.
Default: yes
Default order status
In case you need more custom order statuses – we suggest using free Order Status for WooCommerce plugin.
Default: Default WooCommerce order status (pending)
Send additional emails: Send to admin
This may help if you are using pending or custom default order status and not receiving admin new order emails.
Default: no
Send additional emails: Send to customer
This may help if you are using pending or custom default order status and not receiving customer processing order emails.
Default: no
Custom return URL (Thank You page)
Full URL. Optional. Leave blank to use default URL. Available placeholders: %order_id%, %order_key%.
Default: None

Fees Options

This section allows you to set extra checkout fees. For each custom payment gateway you can set multiple fees.

Custom Payment Gateways for WooCommerce - Gateway Options - Fees

Enabled
Enables/disables the current fee.
Default: yes
Title
Name for the fee. Multiple fees of the same name will be merged into one (with tax options from the first fee).
Default: None
Type
Sets fee type. Can be fixed or percent. Percent is calcuated from cart total.
Default: Fixed
Amount
Sets fee amount. This field is required.
Default: None
Min amount
Minimum fee amount. Used for “Percent” type fees.
Default: None
Max amount
Maximum fee amount. Used for “Percent” type fees.
Default: None
Taxable
Is the fee taxable?
Default: no
Tax class
The tax class for the fee if taxable. A blank string is standard tax class.
Default: None
Min cart total
Minimum cart total for fee to be applied.
Default: None
Max cart total
Maximum cart total for fee to be applied.
Default: None

General Fees Options

In addition to gateway specific fees options, there are also general settings located in “WooCommerce > Settings > Custom Payment Gateways > Fees”.

Custom Payment Gateways for WooCommerce - Fees Options

Fees
Enables/disables fees section.
Default: yes

Cart Total Options

This section sets how cart total should be calculated for the fees. Affects “Min cart total”, “Max cart total” options and “Percent” based fees.

Taxes
Include/exclude taxes when calculating cart total for the fees.
Default: yes
Shipping
Include/exclude shipping when calculating cart total for the fees.
Default: yes
Discounts
Include/exclude discount when calculating cart total for the fees.
Default: yes

Input Fields Options

If you want to collect data from customers on checkout (e.g. credit card numbers).

Custom Payment Gateways for WooCommerce - Gateway Options - Input Fields

Title
Input field’s title (required).
Default: None
Required
Is input field required to fill in on checkout.
Default: no
Type
Input field’s type. Possible values: Text; Number; Select(drop-downlist); Color; Date; Email; Range; Tel; Time; URL; Week; Month; Password; Checkbox; Textarea;.
Default: text
Placeholder
Input field’s placeholder (optional).
Default: None
Class
Input field’s CSS class (optional).
Default: None
Default value
Input field’s default value (optional).
Default: None
Options
Input field’s options – for “Select” type; one option per line.
Default: None

General Input Fields Options

In addition to gateway specific input fields options, there are also general settings located in “WooCommerce > Settings > Custom Payment Gateways > Input Fields”.

Custom Payment Gateways for WooCommerce - Input Fields Options

Input fields
Enables/disables input fields section.
Default: yes

Order Details Options

Add to order details
After order table. For example on “Thank You” page.
Default: no
Template: Header
Default:
<table class="widefat striped"><tbody>
Template: Each field
Placeholders: %title%, %value%.
Default:
<tr><th>%title%</th><td>%value%</td></tr>
Template: Footer
Default:
</tbody></table>

Emails Options

Add to emails
After order table.
Default: no
Sent to
Possible values: All emails; Admin emails only; Customer emails only.
Default: All emails
HTML template: Header
Default: None
HTML template: Each field
Placeholders: %title%, %value%.
Default:
<p>%title%: %value%</p>
HTML template: Footer
Default: None
Plain text template: Header
Default: None
Plain text template: Each field
Placeholders: %title%, %value%
Default:
%title%: %value%
Plain text template: Footer
Default: None

General Options

Add to order notes
Default: no

4 reviews for Custom Payment Gateways for WooCommerce

  1. Serendipity (verified owner)

    Great plugin, don’t bother looking elsewhere nothing else exists that does this.

  2. Noh Balcha (verified owner)

    It simply works. Had used the free plugin for a couple of months…but decided it was time to upgrade. Have a whooping 5 Custome Payment Gateways Installed on our website. http://www.cakestudioaddis.com .

    And as for the support…..had a false positive problem which I resolved in the end BUT the developer got back to me within an hour after I had posted a question.

    Thank you so much for this.

  3. HR

    Hi,

    This is pre-sale question. For input field, does it support upload function?

  4. techbp (verified owner)

    This plugin works like a charm! I installed the FREE version initially but then I loved it and upgraded to PRO.
    Good job guys please don’t be tired to continuously support this plugin.
    Thanks

Add a review

Your email address will not be published. Required fields are marked *

Changelog

1.6.4 – 23/06/2021

  • Fix – Input field was not visible when using WPML.
  • Fix – Title and Description were not translatable.
  • Fix – Stock levels not reducing once an order was placed.
  • WC tested upto 5.4

1.6.3 – 04/02/2020

  • Dev – Custom return URL (Thank You page) – %order_total% placeholder added.

1.6.2 – 03/02/2020

  • Dev – Code refactoring.
  • Plugin description updated.
  • WC tested up to: 3.9.

1.6.1 – 03/01/2020

  • Dev – Input Fields – ‘Process in “Advanced Order Export For WooCommerce” plugin’ options added.
  • Dev – Typo fixed in admin settings.

1.6.0 – 25/12/2019

  • Dev – “Fees” options section added.
  • Dev – Input Fields – “Enable section” option added.
  • Dev – Code refactoring.

1.5.0 – 02/12/2019

  • Dev – Input Fields – “Add to order notes” option added.
  • Dev – Admin settings descriptions updated.
  • Dev – Code refactoring.
  • WC tested up to: 3.8.
  • Tested up to: 5.3.

1.4.2 – 10/09/2019

  • Dev – Input Fields – “Textarea” type added.
  • WC tested up to: 3.7.

1.4.1 – 20/07/2019

  • Dev – Input Fields – Type – “Checkbox” option added.

1.4.0 – 18/06/2019

  • Dev – Input Fields – General Options – “Add to order details” option added.
  • Dev – Input Fields – General Options – “Add to emails” options added.
  • Dev – Input Fields – “Type” option added.
  • Dev – General admin settings split into sections.
  • Dev – Code refactoring.

1.3.0 – 22/05/2019

  • Dev – “Input Fields” options added.
  • Dev – Advanced Options – Shipping methods – “Do not load” option added.
  • Tested up to: 5.2
  • WC tested up to: 3.6

1.2.2 – 15/04/2019

  • Dev – Custom return URL (Thank You page) – %order_id% and %order_key% placeholders added. alg_wc_custom_payment_gateway_custom_return_url filter added.

1.2.1 – 01/04/2019

  • Fix – “Text Domain” renamed to custom-payment-gateways-woocommerce.
  • Dev – Advanced Options – “Load shipping method instances” option added.
  • Dev – Empty values are now allowed in custom payment gateway’s “Title” and “Description”.

1.2.0 – 14/12/2018

  • Dev – Enable for shipping methods – Listing all shipping instances (i.e. by shipping zones) now (instead of just shipping methods).
  • Dev – Code refactoring.
  • Dev – Admin settings restyled.

1.1.1 – 05/08/2018

  • Dev – Admin settings restyled and descriptions updated.
  • Dev – Plugin link updated.
  • Dev – readme.txt updated.

1.1.0 – 26/07/2017

  • Dev – WooCommerce v3 compatibility – reduce_order_stock() replaced with wc_reduce_stock_levels().
  • Dev – WooCommerce v3 compatibility – Order status, payment method and shipping method – Getting with functions instead of accessing properties directly.
  • Dev – Autoloading plugin options.
  • Dev – Link updated from http://coder.fm to https://wpcodefactory.com.
  • Dev – Plugin header (“Text Domain” etc.) updated.
  • Dev – POT file added.

1.0.0 – 17/02/2017

  • Initial Release.

Free version

This plugin is a premium version of free "Custom Payment Gateways for WooCommerce" plugin.

Developers

Exporting Input Fields

Input fields are stored in an array as order meta with _alg_wc_cpg_input_fields key, so if you would need to retrieve them:

if ( ! function_exists( 'alg_wc_cpg_print_input_fields' ) ) {
    /**
     * Function prints order's custom payment gateway's input fields titles and values.
     */
    function alg_wc_cpg_print_input_fields( $order_id ) {
        $input_fields = get_post_meta( $order_id, '_alg_wc_cpg_input_fields', true );
        foreach ( $input_fields as $title => $value ) {
            echo $title . ' = ' . $value . PHP_EOL;
        }
    }
}

Extra Validation for the Input Fields

If you need to add some extra validation to gateway's input fields, you can use WooCommerce woocommerce_after_checkout_validation filter. For example let's say you need to check if field's input is alphanumeric:

add_action( 'woocommerce_after_checkout_validation', 'alg_wc_cpg_my_validate_input_fields', 10, 2 );
if ( ! function_exists( 'alg_wc_cpg_my_validate_input_fields' ) ) {
    /**
     * alg_wc_cpg_my_validate_input_fields.
     */
    function alg_wc_cpg_my_validate_input_fields( $data, $errors ) {
        $gateway = 'alg_custom_gateway_2'; // Here you need to set gateway to check
        $field   = 'My field title';       // Here you need to set field (title) to check
        if ( ! empty( $data['payment_method'] ) && $gateway === $data['payment_method'] ) {
            if ( isset( $_POST['alg_wc_cpg_input_fields'][ $gateway ][ $field ] ) ) {
                if ( ! ctype_alnum( sanitize_text_field( $_POST['alg_wc_cpg_input_fields'][ $gateway ][ $field ] ) ) ) {
                    $errors->add( 'alg_wc_custom_payment_gateways', sprintf( '%s must be alphanumeric!', $field ) );
                }
            }
        }
    }
}

Installation and Updates

  • Buy the plugin 🙂
  • Download plugin’s zip to your computer (you will receive an email with download link, or you can always download the plugin from your account).
  • Go to “Admin Dashboard > Plugins > Add New > Upload Plugin” and browse for downloaded zip file.
  • If plugin is successfully installed – you should see it added to the Plugins list.
  • To keep WPFactory items up to date, please install WPFactory Helper plugin and enter your site key.

Refunds

We want to ensure that you are 100% happy with your purchase, so if you feel the product(s) you purchased are not the best fit for your requirements and you attempted to resolve issues with product's author, we are offering 30 day money back guarantee refund policy.