Payment Gateway Charges For WHMCS

From ModulesGarden Wiki
Jump to: navigation, search

Contents

About Payment Gateway Charges For WHMCS

Payment Gateway Charges For WHMCS allows you to charge additional fees and set up discounts for usage of a chosen payment gateway.

With this module you can easily set products, addons, domains and other items which require an additional fee.
You can also select clients that will be exempt from fees and discounts.

  • Features:
✔ Set Different Rates For Different Payment Gateways (Percentage Or Fixed)
✔ Set Different Discounts For Different Payment Gateways (Percentage Or Fixed)
✔ Set Minimum Invoice Value To Charge Payments And Discounts
✔ Include/Exclude From Charges And Discounts Certain Clients
✔ Include/Exclude From Charges Certain Products, Addons, Domains And Other
✔ Automatic Conversion Of Charges And Discounts In Different Currencies
✔ PayPal Subscription Charging
✔ Impose Tax On Charges
✔ Impose Charge After Tax
✔ Impose Charge Before Tax And Charge Tax
✔ Choose Billing Type
✔ Standard - Exclusive Charge
✔ PayPal - Inclusive Charge
✔ Display Charge Rates Depending On Available Gateways
✔ Display Calculated Price For Each Available Gateways
  • Supported Order Form Templates:
✔ Ajaxcart
✔ Boxes
✔ Cart
✔ Cloud Slider
✔ Comparison
✔ Modern
✔ Premium Comparison
✔ Pure Comparison
✔ Slider
✔ Standard Cart
✔ Supreme Comparison
✔ Universal Slider
✔ Verticalsteps
✔ Web20cart
  • General Info:
✔ Supports All Payment Gateways
✔ Supports Mass Payment Functionality
✔ Easy Integration Which Automatically Adjusts To Each Order Form Template
✔ Multi-Language Support
✔ Supports PHP 5.3 Up To PHP 7
✔ Supports WHMCS Templates Five and Six
✔ Supports WHMCS V6 and V7

Installation

This tutorial will show you how to successfully install and configure Payment Gateway Charges For WHMCS.

We will guide you step by step through the whole installation and configuration process.

1. Log in to your client area and download Payment Gateway Charges For WHMCS.
GC1.png
2. Upload and extract the module into the main WHMCS directory.

Files in your WHMCS directory should look like these.

GC2.png
3. When you install Payment Gateway Charges for the first time you have to rename 'license_RENAME.php' file.

File is located in 'modules/addons/gateway_charges_functions/license_RENAME.php'. Rename it from 'license_RENAME.php' to 'license.php'.

GC3.png
4. In order to configure your license key, you have to edit a previously renamed 'license.php' file.

Enter your license key between quotation marks as presented on the following screen. You can find your license key in your client area → 'My Products'.

GC4.png
5. Now you have to activate the module in your WHMCS system.

Log in to your WHMCS admin area. Go to 'Setup' 'Addon Modules'. Afterwards, find 'Payment Gateway Charges' and press 'Activate' button.

GC5.png
6. In the next step you need to permit access to this module.

To do so click on 'Configure' button, tick 'Full Administrator' and press 'Save Changes'.

GC6.png
7. You have just successfully installed Payment Gateway Charges!

You can access your module at 'Addons' 'Payment Gateway Charges'.

GC7.png

Configuration and Management

Payment Gateway Charges For WHMCS allows your customers to manage additional charges in your WHMCS system.

In this short guide we will present you the possibilities of our module.

Integration Code

Integration described below is not obligatory.

Module allows your customers to view charges for using payment gateways when ordering.
We implemented easy integration codes and the displayed instruction of which can be easily adjusted to each order form template.

Note! Please insert the codes to the template you are using, if you use more than one template then insert the codes to all of them.
The provided directory is just an example of one of the available templates.

Underneath you will find as specific information on the code insertion as possible.
As soon as you enter any part of integration, its status will change from 'Undone' to 'Done' in the addon.

GC18.png

Table of Charges on Cart

To display charges table on order form, add the below integration code.

Open the template you are using (we opened 'modern' template as an example).

GC8.1.png
Correctly placed codes in 'modern' order form template are presented on the following screens.
GC8.png
GC8.2.png
In the client area it should look like on the screen below.
GC9.png

Credits Integration

These integration codes will remove charge when a client pays through credits.

Open the 'viewinvoice.tpl' file and insert the below codes at the very top of that file. Remember to alter the file of the used by you template!
On the screen there is a shown location of the file in template 'Six'.

GC9.1.png
Properly inserted code should look like that:
GC19.png

PayPal Subscription Integration

PayPal subscription is integrated automatically, there is no need for you to add any codes.
'PayPal' button that is shown on the invoice below allows your clients to pay automatically for recurring payments via PayPal.
GC20.png

Configuration

Gateway Charges

Proceed to the addon itself, you will be moved directly to its configuration. Firstly you will have to set charges for each active in your system gateway.

Find a list of active gateways and set charges for all of them or only for those you wish.

To set additional charge for a payment gateway, simply enter desired values in a corresponding column.

You can add percentage value of invoice amount or fixed amount to charge. Fixed amount will be charged in the default currency of the client.
Once you have set up the configuration, press 'Save Changes' button.

GC10.png

Additional Options

Find tab 'Additional Options', you may configure there your personal charges' options.
GC2 11.png
  1. Minimum Invoice Value - set minimum value of invoice to charge or place discount
  2. Tax Payment Charge - tick to impose taxes on charges
  3. Charge After Taxing - if selected, charge will be applied to an already taxed item
  4. Hide Gateway Charges Table - if selected, the box with details of additional payments with our module on the order form will not be visible for a client
  5. Charge After Applying Promo Code - if checked, your promotion codes will be taken into consideration before calculating the final price.
    See Tips section to read about exceptions!
  6. Billing type - choose between Standard (exclusive charge) or PayPal billing type (inclusive charge) - see below to note the differences
    Underneath you can find some examples illustrating difference in charging with both types.

Do not forget to press 'Save Changes'.

Billing types explanation:
  • Standard (exclusive to cart total) - when this type is selected, then full amount charged for product and fee paid to a payment gateway is counted in a standard way;
  • PayPal (inclusive to final total) - when PayPal method is selected, charge amount is already included in the fee when calculating the final amount.
    Note: when this method is selected such billing type is applied to every activated payment gateway, not only to the PayPal ones.
Please see at the below table any calculations done during counting the final price to pay by the client and the amount that will be given to PayPal and note the difference
between the two available methods.

Fee: $124
Gateway Discount: 5%

Method Base Fee Full Amount PayPal Fee
Standard 124 * 0,05 = 6,2 124 + 6,2 = 130,2$ 130,2 * 0,05 = 6,51$
PayPal (124/0,95) - 124 = 6,53 124 + 6,53 = 130,53$ 130,53 * 0,05 = 6,53$
GC2 21.png
Underneath you can see an exemplary order summary view after additional options (charges description) has been provided in English.php language file
and with standard billing type selected.
GC21 1.png

Management of Clients

In order to enable/disable charges for specific clients move to 'Client' section.
GC13.png
Here you can exclude clients from being charged.

To do so, mark checkbox next to client ID and press 'Save Changes', consequently such client will not be additionally charged for using a specific payment gateway.

GC14.png

Management of Items

To enable/disable charges for products and addons, proceed to 'Items' section.
GC15.png
In order to disable charges for products or addons, mark checkboxes next to the chosen ones and press 'Save Changes'.
GC16.png
In order to enable charges for domain actions or items, mark checkboxes next to the chosen entries and press 'Save Changes'.
GC17.png
Marked 'Other Invoice Item Types' applies charges to all other invoice types, which were not described above.
GC17x.png

Automatic Conversion of Charges

This functionality will make you forget about all the problems with currencies. Module automatically calculates the value basing on your default currency.

1. Module automatically calculates fixed amount discount depending on the currency selected by the customer. Example:
When your default payment gateway currency is USD and you set fixed amount discount at -1.00, your customer who prefers to pay in USD will receive $1 discount.
If you have other payment gateway currency, let's say EUR, and the same fixed amount discount -1.00, your customer who prefers to pay in EUR will receive about 0.75€ discount.
2. Exactly the same as above applies to Minimum Invoice Value which currency is also automatically calculated.
3. Percentage value is collected separately for each currency based on the values specified in the 'Pricing' section of each product, addon, domain or other.

Disabling Payment Gateway For Specific Product Group

If you want to disable payment gateway for a specifc product group, follow these simple steps.

Go to 'Setup' 'Products/Services' 'Products/Services' and edit product group you want to disable payment gateway for.

GC22.png
Unmark checkbox next to payment gateway you want to disable and press 'Save Changes' button.
GC23.png
As you can see on the following screen, payment gateway was disabled for products from group you edited.
GC24.png

Tips

1. For your convenience, payments gateway charges are enabled by default for clients, products and addons.
Charges for domains and other are disabled by default.
2. Promotion codes: if the option 'Charge After Applying Promo Code' is enabled in the addon, you need to remember about one thing.

If the promotion code is created for a bundle of items (e.g. a product ordered with an addon) then all required items must be chargeable to allow the promotion
before being charged with the gateway charge. In case at least one of the required items in the ordered package is not chargeable, the promotion will be applied after charging the price.

3. Charge/Discount Charges visible names are included in language file of the module (e.g. english.php), there are used two variables which you can use to alter displayed names of the two options.
The mentioned variables are:
$LANG['mg_chtpl_charged'] = 'Payment Gateway Charge';
$LANG['mg_chtpl_discount'] = 'Payment Gateway Discount';
4. It is advised that 'Auto Apply Credits' option should be disabled due to the possibility of problems occurrence.

Charge is not automatically added and calculated when auto applying credits.
Problems may occur when a client does not have sufficient credits for both the basic payment and the charge.

5. In case administrator deletes a hosting product that has been invoiced but later on the payment gateway is changed then such hosting product is treated as of 'Other' type on the invoice.
6. It is possible to either hide or change the header above the available payment gateways visible to the client.
GC 24.png
There are two possible ways:

1. To change the line, edit the module english.php lang file. Find line:

$LANG['client_header']     = 'Payment Gateway Charges'; 

Change the text as you need or leave empty space between quotation marks:

$LANG['client_header']     = ''; 

2. To delete the line, edit your currently used template.
Depending on the used cart, adequate template must be found and edited.
Templates are located in: /modules/addons/gateway_charges_functions/templates/
Full list of files:

  • boxes.tpl
  • ajaxcart.tpl
  • cart.tpl
  • comparison.tpl
  • default.tpl
  • modern.tpl
  • slider.tpl
  • standard_cart.tpl
  • verticalsteps.tpl


Find variable that describes this language line and comment the line including it out:

  {$lang.client_header}

Usually this is:

<h2 {if $hideChargesTable}style="display: none;"{/if}>{$lang.client_header}</h2>

or

<h2>{$lang.client_header}</h2>

Common Problems

1. When you have problems with connection, check whether your SELinux or firewall does not block ports.
Personal tools
Namespaces

Variants
Actions
Navigation
WHMCS Modules
cPanel Modules
Magento Extensions
Magento Themes
PrestaShop Modules
Blesta Extensions
General
Social
Payment Gateway Charges For WHMCS