The WHMCS SEPA module enables you to offer your customers payment via SEPA direct debit and to manage the direct debit mandates issued. Due invoices for which you have been given a direct debit mandate can be exported directly via the module in XML format and thus sent to your bank or imported into a banking software.
System requirements
The following requirements must be met in order to use the SEPA module:
- Running WHMCS installation version 8.8 – 8.11
- Admin access to WHMCS
- FTP access
- Ioncube Loader installed (at least version 13)
- installed openssl and bcmath PHP extension
- PHP 7.4, 8.1, 8.2
- For the use of Micropayment.de a corresponding contract with Micropayment is required
- To use Stripe, a corresponding Stripe account with activated direct debit payment is required
Installation
- Please log in to the customer area of Plambee.de Webhosting and download the current version of the SEPA module.
- Unzip the zip file on your computer
- In the modules/addons/sepa folder there is a PHP file called secretkeyexample.php, open this file with an editor and enter a key of your choice here and save the file.
key and save the file as ‘secretkey.php’. This key is then used to encrypt the customer IBAN and BIC in the database.
are encrypted. Attention: Make a backup copy of this key. If the key is lost (e.g. deleted, changed, damaged), you will no longer have access to the customer’s bank data! The key must not be changed later. - Upload the modules folder and the appropriate template from the template folder to your WHMCS directory via FTP. Attention: If you want to make your own
adjustments to the checkout.tpl of the standard_cart order form, do not upload the template folder until you have also made these adjustments to the checkout.tpl adjusted for the SEPA module. If you would like to use the IBAN-only procedure, please delete the field for the BIC entry from the tpl file. - If you are using a Bootstrap 4 based customer area template, please rename the overview_bs4.tpl to overview.tpl.
- Now log in to your WHMCS admin area and go to Payment/Payment Gateways/All Payment Gateways and activate the SEPA Gateway. Here you can change the name of the gateway
- Now please go to ‘System/Addon Modules’
- In the addon list, please search for the module ‘SEPA Module’ and click on ‘Activate’ and then on ‘Configure’
- In the ‘Module licence’ field, please enter your licence code, which you can find in the Plambee.de customer area in the product details.
These steps complete the actual installation. However, the module itself still requires a few settings.
Update notes
Update to version 2.0
From version 2.0.0, the following files are no longer required and can be removed from your WHMCS installation:
The directories: /modules/addons/sepa/dist/css/skins /modules/addons/sepa/plugins/jvectormap can be deleted including their contents.
If you use the CSV import, please note that the CSV file has been extended by three values as of version 2.0.0. These are the values ‘Rcur’, ‘automandate_date’ and ‘automandate_ip’. The value ‘Rcur’ is used by the module to specify in the XML file whether the mandate has already been used once (1) and is therefore a recurring direct debit or whether it is a first-time use (0). The values ‘automandate_date’ and ‘automandate_ip’ are values that save when and by whom an automandate was created. As a rule, you do not have these values when importing. If you do have these values, please use this format for ‘automandate_date’: 2016-04-01 00:48:36 The example csv file has been adapted accordingly.
As of version 2.0.0, the variables {$reid} for the invoice number and {$kid} for the customer number are available for the purpose of use. The module therefore no longer automatically attaches the customer and invoice number to the purpose. Therefore, please adjust the purpose accordingly before the first export.
Update to version 2.1
The button for saving the bank details in the customer area has been given a new name in version 2.1.0 to avoid complications with other modules. Please change the name of the button in the overview.tpl from saveclientconfig to sepa_saveclientconfig after updating from a version <2.1.0.
WHMCS unfortunately does not provide a hook point so that modules can find out when an invoice is deleted. From now on, when the module is called, the module checks whether the invoices listed in the module still exist and deletes the entry from the module if not. If you delete an invoice in WHMCS, it will be removed from the module database the next time the module is called up in the admin area.
Users of a cart template based on the modern template can delete the old code in the viewcart.tpl of
<script>
function showsepaform() {
if (!jQuery("#sepaform").is(":visible")) {
jQuery("#sepaform").hide().removeClass('hidden').slideDown();
}
}
</script>
to
<script>
function showsepaform() {
var Value = jQuery("input[name='paymentmethod']:checked").val();
if (Value == 'sepa') {
if (!jQuery("#sepaform").is(":visible")) {
jQuery("#sepaform").hide().removeClass('hidden').slideDown();
}
}
}
</script>
<body onLoad="showsepaform()">
so that the Sepa input fields are also opened immediately after reloading the page (if Sepa was selected as the payment method).
Update to Version 2.2
From version 2.2 there is a new e-mail template to remind the customer of the mandate or the account details. Please customise the text to suit your needs.
Update to Version 2.6
With version 2.6 the inline script code for the SEPA input fields in the cart has been replaced by a .js file. After updating to the new version, please make sure that the option ‘Do not insert jQuery’ is deactivated and that you have copied the sepa.js file from the module archive into the js folder of your order form. Alternatively, you can also deactivate the new option and insert the sepa.js file yourself. <script type=‘text/javascript’ src=‘templates/orderforms/IHRCARTjs/sepa.js’ async></script>
Update to Version 2.8
From version 2.8.0, the variables {$kid} and {$rid} are available in the PDF URL to generate the PDF externally, for example. {$kid} stands for the customer number and {$rid} for the invoice number.
Update to version 2.9
Note on WHMCS 7.3: jQuery is no longer integrated in some order form templates from WHMCS 7.3. However, the module requires jQuery to open the input boxes in the checkout. If the SEPA input boxes no longer open with WHMCS 7.3, please check whether jQuery is loaded and if not, please integrate it.
There have been some changes to the template of the customer area. If you have changed the previous template file, please synchronise the files beforehand and do not overwrite the overview.tpl file immediately.
Update to Version 3.0
With version 3.0, the module switches from mcrypt to openssl for the encryption of bank details. The reason for this is that mcrypt was removed with PHP 7.2.
First create a backup of your database!!!
Then upload the latest module files to your WHMCS installation and go to the module settings. Then click on the ‘Upgrade to version 3.0’ link on the right-hand side and start the database upgrade. During the upgrade, the page may be reloaded several times; the upgrade is complete when you receive the corresponding message.
Do not close the window during the upgrade and do not reload the page manually.
Update to Version 5.0.13
Due to an error in the template, please update your checkout.tpl. You can use the adjustments in the wiki as a guide or use the supplied tpl file
Update to Version 5.4.0
With version 8.0.0, WHMCS has enabled mail dispatch via external mail providers. Due to limitations of the API, the module sends emails independently. Either the SMTP setting stored in WHMCS is used for this or, if you use an external mail provider, PHP Mail is used as a fallback.
Update to Version 6.1.0
After you update from a module version < 6.1.0 to a module version >= 6.1.0, please go to the WHMCS module listing or to the SEPA module after the file upload so that the module can perform the necessary database updates in the background.
From version 6.1.0, the module’s own e-mail templates are migrated to the WHMCS e-mail templates (System Settings -> E-mail templates) in order to integrate the multilingualism of the e-mails sent by the module and to store the templates in a central location.
Therefore, please go to the e-mail templates after the update has been carried out and customise them according to your requirements and, if necessary, store them for languages that you use in your WHMCS installation.
If you use the module in conjunction with Stripe, please log in to the Stripe Dashboard, go to the Stripe webhook you have created via the Developer menu item and display the webhook secret there and save it in the module settings. The webhook secret begins with whsec_ and is required to verify the callback. Without a valid webhook secret, callbacks cannot be accepted.
Setup
Once the module has been successfully installed, a few settings still need to be made. To do this, please go to the module and click on the
‘Settings’ button.
Here you also have the option of customising the emails that the module sends. In the current version, the module sends 4 different e-mails. Once you have customised the e-mails, please click on ‘SEPA settings’. In this menu you have a few setting options.
Note regarding automatic order acceptance
You can use this function to automatically authorise orders so that the customer does not have to wait until the order has been checked and manually authorised.
Please use this function with caution, as it can sometimes result in high costs. If a fake order is placed, for example, the domain ordered will be registered immediately and you will be stuck with the costs. Our Gateway Limiter module may be worthwhile for you here: Gateway Limiter with which you can activate payment options for existing customers only. You can find a free trial version on our website.
SEPA Widget
In WHMCS, widgets are the individual small boxes that you see when you log in to the WHMCS admin area and give you a quick overview of individual areas. Our module contains a widget that shows you invoices that are due but have not yet been exported.
This means you don’t have to check the module every day to see which invoices can be exported. To activate the widget, please go to the WHMCS admin area, select Setup/Staff Management/Administrator Roles at the top of the menu, then select the corresponding group that should see this widget and scroll down the list of rights to activate ‘SEPA Widget’ and or ‘SEPA Mandate Widget’. After you have saved the change, the widget will be displayed in the WHMCS Admin main screen.
Cart template customisation
The module requires some adjustments to the cart template for the input option in the cart. You can use the templates that we provide with the module for this purpose. If you have already made your own adjustments to the cart, we would like to show you the necessary adjustments here, based on the standard_cart template.
Search for the following code in the checkout.tpl template file
<input type="radio" name="paymentmethod" value="{$gateway.sysname}" class="payment-methods{if $gateway.type eq "CC"} is-credit-card{/if}"{if $selectedgateway eq $gateway.sysname} checked{/if} />
and replace it with
<input type="radio" name="paymentmethod" value="{$gateway.sysname}" class="payment-methods{if $gateway.type eq "CC"} is-credit-card{/if} {if $gateway.sysname eq "sepa"} is-sepa{/if}"{if $selectedgateway eq $gateway.sysname} checked{/if} />
under the following
<div class="clearfix"></div>
then please insert the following code
{** SEPA MODUL **}
<div id="sepaform"{if $selectedgatewaytype neq "sepa"} class="hidden"{/if}>
<table class="table">
<tr>
<td width="25%"><div class="col-lg-7">{$sepa.bankname}</div></td>
<td><div class="col-lg-6"><input class="form-control" type="text" name="bankname" value="{$sepadetails.bankname}" {if $sepadetails.sepa_client == '1'}disabled{/if}></div></td>
{if $sepadetails.sepa_client == '1'}<input type="hidden" name="bankname" value="{$sepadetails.bankname}">{/if}
</tr>
<tr>
<td width="25%"><div class="col-lg-7">{$sepa.accountholder}</div></td>
<td><div class="col-lg-6"><input class="form-control" type="text" name="accountholder" value="{$sepadetails.accountholder}" {if $sepadetails.sepa_client == '1'}disabled{/if}></div></td>
{if $sepadetails.sepa_client == '1'}<input type="hidden" name="accountholder" value="{$sepadetails.accountholder}">{/if}
</tr>
<tr>
<td width="25%"><div class="col-lg-7">{$sepa.iban}</div></td>
<td><div class="col-lg-6"><input class="form-control input-sm " id="iban" type="text" name="iban" value="{$sepadetails.iban}" {if $sepadetails.sepa_client == '1'}disabled{/if}></div></td>
{if $sepadetails.sepa_client == '1'}<input type="hidden" name="iban" value="{$sepadetails.iban}">{/if}
</tr>
<tr>
<td width="25%"><div class="col-lg-7">{$sepa.bic}</div></td>
<td><div class="col-lg-6"><input class="form-control" type="text" name="bic" value="{$sepadetails.bic}" {if $sepadetails.sepa_client == '1'}disabled{/if}></div></td>
{if $sepadetails.sepa_client == '1'}<input type="hidden" name="bic" value="{$sepadetails.bic}">{/if}
</tr>
<tr>
<td></td>
<td><div class="checkbox"><label><input type="checkbox" id="sepaprivacypolicy" name="sepaprivacypolicy"> {$sepadetails.privacy}</label></div></td>
</tr>
</table>
<br />
</div>
{** End SEPA MODUL **}
<div class="clearfix"></div>
If you deactivate the entry of the BIC and the bank name in the module, you can remove the corresponding fields from the code above.
Use
Add customers manually
Adding a customer manually is useful, for example, if the customer wants to change the payment method but there is no new order for them or if you want to transfer customer data from another module or switch from a payment provider.
If you want to load a customer manually into the Sepa module, please click on ‘SEPA customers’ at the top and then on ‘Settings’ in the drop-down menu and then simply select the item ‘Select new customer’.
On the new page, you now have the option of selecting the customer by entering the name or customer number in the search field and then clicking on the relevant customer. Once you have selected the customer, please enter the customer’s bank details. If you have already received a mandate, please tick the ‘Direct debit allowed’ checkbox and save.
The customer has now been created. And if you have ticked the checkbox, the customer will automatically receive an e-mail informing them of the new mandate reference and your creditor ID, for example.
Customise the customer area
If you want to customise the customer area, you can adapt the overview.tpl from the module directory.
If you would like to link to the SEPA page from your customer area, please use the following link: https.//www.yourdomain.de/index.php?m=sepa
Create mandate
If the customer has given you the mandate, simply go to the customer view in the module and select ‘Create mandate’ from the ‘Settings’ drop-down menu for the relevant customer. Alternatively, you can also go to ‘Edit customer’ and select the corresponding checkbox. In both cases, the customer will receive an e-mail notification informing them that the mandate has been received. The e-mail also contains the mandate reference and your creditor ID.
Invoice export
You must export the invoices so that they can be paid. To do this, please go to the ‘Open Sepa direct debits’ module view. Here you will receive
an overview of all open direct debits that have not yet been exported. For invoices for which the export is currently not possible (e.g. because there is no mandate),
the checkbox is deactivated. Such invoices cannot be exported. To export the invoices, simply select them using the checkbox
and then click on the blue ‘SEPA Export’ button. The XML file is then generated and the customers are notified by e-mail. Alternatively, you can
also export individual invoices. To do this, simply select ‘Sepa Export’ via the settings button. If you click on the green ‘Open Sepa direct debits’ button in the top menu again after the export, only the invoices that have not yet been exported will be displayed. You will receive a complete list of all
invoices after clicking on the button labelled ‘All SEPA bookings’. Here you can also export invoices that have already been exported individually.
Mark invoice as paid
When you record the incoming payment on your account, simply go to the WHMCS invoice listing and enter the corresponding payment there.
Note: If you want to manually enter a payment with a different gateway for an invoice that has already been loaded into the SEPA module and has the status ‘Open’ because the customer has suddenly paid the amount due by bank transfer, for example, please proceed as follows:
- go to the corresponding invoice and click on the ‘Options’ tab
- now select the payment method the customer used to pay (do not change anything else) and save the whole thing
- Now you can save the transaction under the ‘Add Payments’ tab.
If you enter the payment directly under ‘Add Payments’ and simply change the payment method there, the invoice will NOT be deleted from the module, so that it may be included in the next export and you may bill the customer twice.
may be included in the next export and you bill the customer twice.
Why is this the case? Unfortunately, the hook points AddInvoicePayment and InvoicePaid only return the invoice ID but no payment method that could be sent to the module. We will check whether a workaround is possible for a later version.
If the customer has changed the payment method directly in the customer area (viewinvoice), the invoice is automatically removed from the module. WHMCS provides all the necessary information via the hook point.
Deposit return debit note
If there is a returned direct debit for an invoice, click on the green ‘Open SEPA direct debits’ button in the top menu of the module and then later on the button labelled ‘All SEPA bookings’ at the bottom right. You can now search for the corresponding invoice using the search function. Then click on the settings button in the corresponding line and select ‘Return direct debit’ or ‘Return direct debit due to unauthorised booking’. The differences between the two return debit notes are as follows: In the case of a normal return debit note (e.g. because the account was not covered), an invoice for the amount of the charge incurred is created immediately in accordance with your settings and an information e-mail is sent, but the mandate is retained. In the case of a returned direct debit due to unauthorised debiting, the e-mail will also be sent and an invoice may be created, but the mandate will expire. In both cases, the booking is labelled accordingly and listed on the page for returned direct debits (top menu ‘Returned direct debits’). From WHMCS 7.2, the module also reports a return debit note back to WHMCS, which means that the original invoice no longer has the status ‘unpaid’ but ‘collected’, which means that WHMCS then resets the due date by one billing period (since the date was counted when the invoice was added). If you use WHMCS < version 7.2, please remember to reset the next due date manually in the event of a chargeback.
Add invoice to the module
To add an existing invoice to the module, you have 2 options. In the admin area, go to the relevant invoice and select Sepa as the payment method under ‘Options’ and save the whole thing.
As a customer, go to the viewinvoice view and select Sepa as the payment method. If the customer is not yet known to the module, they can also enter their bank details here and download the form for the direct debit mandate.
Bank transfers
Since version 2.0, the module can also create XML files for collective transfers. This refers to transfers that you send, e.g. to carry out refunds from cancellations.
Settings
Before you can create your first transfer XML, please go to the module settings and select the ‘Transfers’ tab. Select the required Pain version from the drop-down menu and enter a reason for payment in the text field which is to be used for the transfer. The variables {$reid} for the invoice number and {$kid} for the customer number are available for the purpose of use. In the ‘Notifications’ tab, you can also select whether the module should automatically send an email notification when a transfer is exported, informing the customer that the amount will be credited to their account in a few days. The email template for this notification can be edited in the module under Settings/Email Templates/Transfer.
Create invoice for the bank transfer
If you would like to load an invoice into the module as a bank transfer, please go to an existing invoice or create a new invoice and enter negative sums here for the amounts, e.g. -25.99, and select the module as the usual payment method. After saving, the invoice will then appear under ‘Open transfers’ in the module.
Exporting a bank transfer
Exporting a credit transfer is similar to exporting a direct debit. With the difference that you can export transfers at any time. There is no check whether a mandate exists as this is not required for a bank transfer.
To export an invoice, you can either select the relevant checkboxes and then click on the blue ‘SEPA Export’ button at the bottom or click on the blue settings button for the relevant booking and select ‘SEPA Export’.
CSV Import
If you switch to WHMCS and our module from another software and already have a customer base, it is a lot of work to manually load each individual customer into the module. Because the bank data in our module is stored in encrypted form for security reasons, you have to start a script after the import. In this chapter we describe the complete procedure for an import.
Prepare CSV file
In order for the data to be imported, the CSV file must correspond to a certain structure. The order of the data is: ID, customer number, IBAN, BIC, mandate reference, account holder, name of the bank, date of the mandate and mandate status. A comma is used as a separator. Please export your existing bank data from your old programme and convert the data into this format. The zip archive contains a sample file which you can use. The first field (ID) is automatically assigned by the module during import, so you can leave the column empty. For customers for whom you do not yet have a direct debit authorisation, leave the fields Mandate reference and Date of mandate empty and enter 0 for Mandate status. For customers for whom you have a direct debit authorisation, please enter the reference in the Mandate reference column, the date when the mandate was issued in the Mandate date field and a 1 in the Mandate status field. If you do not have a BIC for a customer, please leave the field empty, as shown in the example file.
Data import
Create a backup of your database and make sure that you have entered a suitable value for max_execution_time in the PHP settings.
Now upload the CSV file to the module directory where your secretkey.php file is located. The file must have the name import.csv. Now please log in to your WHMCS admin area and go to the SEPA module. In the module, please click on ‘SEPA customers’ and then, after clicking on the settings button, select the item ‘Import customers’. Then click on the start button if you want to start the import. The module will now import the data records from the file and encrypt the customer’s bank data. Please do not change the page during the import. As soon as the import is complete, you will receive a message and the import.csv will be deleted from your web space. If you have already loaded invoices for a customer into the SEPA module, but the customer itself is only stored in the module during the import, this is not a problem. When the customer is created, the import automatically checks whether an invoice already exists for the customer in the module and stores the corresponding data in the booking.
PDF for the direct debit mandate
In addition to the static PDF for the direct debit mandate, version 2.9 gives you the option of having the PDF generated automatically. You can change the appearance of the PDF yourself by customising the direct debit mandate.php file. We have opted for the HTML version here, as this is easier for most customers than TCPDF.
Advantages of automatic PDF generation:
- The PDF is already pre-filled with the customer’s data. Name, address and account details are already included in the PDF file. The customer only has to check and sign it.
Disadvantages of automatic PDF generation:
- Using HTML in conjunction with TCPDF limits the appearance of the PDF file, as TCPDF only supports CSS to a limited extent, for example. With a static PDF created with Word or Writer, for example, you have more graphical options.
Micropayment.de Setup
Setup by Micropayment.de
As soon as you have created a corresponding account at Micropayment.de, please create a project and assign the Direct Debit Event API payment method to it and activate it.
Please enter the URL such as https://ihre-whmcsdomain.de/modules/gateways/callback/pl_sepa.php as the notification URL.
Module Setup
Go to the module settings and select Micropayment as the export method. In the ‘Direct debit’ tab, enter your access key and the project code from your Micropayment.de account. Then enter how many days after the due date the invoice should be transferred to Micropayment.de (if autopay is used) and whether you want to use the autopay function.
The options: ‘Use due date as debit date’, ‘Skip weekend’, ‘A payment information block’ and ‘Mark invoice as paid on due date’ are not relevant when using Micropayment, as Micropayment specifies the debit date.
Stripe.com setup and instructions
Setup on Stripe.com
As soon as you have an active Stripe.com account and have activated the SEPA Direct Debit payment method there, go to the webhook configuration in the Stripe dashboard under Developers and create a new webhook endpoint there. The URL should have this structure: https://ihre-whmcsdomain.de/modules/gateways/callback/pl_sepa.php . Activate the charge and payment_intents events for the webhook and copy the webhook secret to store it in the module settings.
Then go to the Api keys area under Developers and copy the secret key into the module settings
Module Setup
Go to the module settings and select Stripe.com for the export method. Then enter your Public and your Secretkey in the ‘Direct debit’ tab. Then enter how many days after the due date the invoice should be transferred to Stripe.com (if autopay is used) and whether you want to use the autopay function.
Stripe.com Sandbox
If you want to use the Stripe test environment, click on the small button ‘View test data’ in the Stripe dashboard and then create the webhook again and store the API keys of the test environment in the module. If you then want to use the module live, please make sure to store the normal API data in the module
Notes to stripe.com
When using Stripe, the module works with an automatic mandate, i.e. as soon as the customer has entered their bank details in the checkout, the mandate is created with Stripe and payments are processed by direct debit. We recommend that you take measures to protect yourself against fake orders. With our gateway limiter, you can block individual payment methods, e.g. for new customers.
If the customer changes their bank details, a mandate can usually continue to be used, but this is slightly different with Stripe. Here, bank details cannot be changed, which is why a new mandate is created.
Unfortunately, Stripe does not tell you when the customer will actually be debited, which is why the debit notification always contains the next day as the debit date. So please remember to shorten the advance notice period in your terms and conditions/contracts to one day accordingly.
If a booking is transmitted to Stripe, it receives the status ‘Payment Pending’, as soon as Stripe confirms receipt of payment via webhook, the payment status is changed to ‘Paid’.
When a booking is submitted, Stripe may send a ‘Failed’ to the webhook. The module then sends a module to the e-mail address stored in the module for admin notifications (unless there is already a booking with the failed status). In this case, you must check the booking manually in Stripe as unfortunately no exact reason is transmitted here.
A failed does not necessarily correspond to a return debit note, these have their own status with Stripe and are recognised by the module and handled accordingly in the module.
Tips and hints
Notes on direct debit
Some customers have asked whether it is possible to include a reference to the payment method in areas such as invoice emails to remind the customer that they do not have to do anything for this invoice, as the direct debit is automatic. This is possible regardless of the module. You can find out what you need to edit and how here:
Note on the PDF invoice
If you would like to include a note on the PDF invoice which makes it clear to the customer once again that the invoice amount will be collected and that they do not need to make a manual payment, open your invoicepdf.tpl with a suitable editor and add the following code, for example, in the desired position:
if ($paymentmethod == 'SEPA Lastschrift'){
$pdf->Cell(180, 4, Lang::trans('IHRLANGSTRING'), '', '', 'C');
}
Where ‘SEPA Direct Debit’ must correspond to the name you have given to the payment method. This means that the note is only included if the payment method for the invoice is direct debit.
Note in the invoice e-mail
If you would like to include a note in the invoice email that makes it clear to the customer once again that the invoice amount will be collected and that they do not need to make a manual payment, please go to the email templates in WHMCS and open the ‘Invoice Created’ template there. Then insert the following code in the appropriate place:
{if $invoice_payment_method eq “SEPA Lastschrift”}IHR HINWEIS{/if}
Where ‘SEPA Direct Debit’ must correspond to the name you have given to the payment method. This means that the note is only displayed if the payment method for the invoice is direct debit.
Note on the viewinoice
If you would like to include a note in the viewinvoice which makes it clear to the customer once again that the invoice amount will be collected and that they do not need to make a manual payment, open your viewinvoice.tpl with a suitable editor and insert the following code in the appropriate place:
{if $paymentmethod eq “SEPA Lastschrift”}{$LANG.IHR_LANG_STRING}{/if}
Where ‘SEPA Direct Debit’ must correspond to the name you have given to the payment method. This means that the note is only displayed if the payment method for the invoice is direct debit.
Email template variables
The module uses a number of variables, such as in the direct debit notification email, which are then later filled with the corresponding content by the module. You can find out which variables are available where in the following overview. If you are missing a variable, please contact our support so that we can take this into account in an update.
Debit notification
The following variables are available to you in the direct debit notification:
- $date} = Date of charge
- {$client_name} = Client name
- {$reid} = Invoicenumber
- {$kdnr} = Clientnumber
- {$amount} = Amount
- {$glid} = Creditor identification number
- {$mandat} = Mandate reference
- {$iban} = IBAN
- {$owner} = Account holder
- {$bank} = Name of the bank
- {$signature} = Global signature from the WHMCS settings
Mandate confirmation of receipt
The following variables are available in the mandate confirmation of receipt:
- {$client_name} = Client name
- {$glid} = Creditor identification number
- {$mandat} = Mandate reference
- {$signature} = Global signature from the WHMCS settings
Return debit note
- {$client_name} = Client name
- {$reid} = Invoice Number
- {$backfee} = Chargeback fee
- {$signature} = Global signature from the WHMCS settings
Announcement of the bank transfer
- {$client_name} = Client name
- {$reid} = Invoice Number
- {$signature} = Global signature from the WHMCS settings
Mandate reminder
- {$client_name} = Client name
- $signature} = Global signature from the WHMCS settings
Variables for the direct debit mandate
If you want to generate the PDF for the direct debit mandate automatically, the following variables are available in the direct debit mandate.php:
- $sepa_creditorid = Your creditor identification number
- $sepa_company = Your company name
- $sepa_clientfirstname = First name of the account holder
- $sepa_clientlastname = Last name of the account holder
- $sepa_clientaddress = Address of the customer
- $sepa_clientpostcode = Postcode of the customer
- $sepa_clientcity = Client City
- $sepa_clientbankname = Name of the bank
- $sepa_clientbic = BIC
- $sepa_clientiban = IBAN
Mandate note on the Checkoutcomplete page
As of module 5.0, the module offers an option to display a message to the customer on the checkoutcomplete page if there is no mandate for them yet. As we can only store a standard text in the hook, we recommend deactivating this option and adapting the Checkoutcomplete.tpl of your cart template. From version 5.0, the module provides a variable on this page which indicates whether a mandate already exists for the customer. This allows you to display the notice with a simple IF query and gives you more freedom in terms of design and placement. The whole thing can then look like this:
{if $vars[‘paymentmethod’] == ‘sepa’ && $sepa.has_mandate == ‘1’}
YOUR_TEXT_OR_LANG_VAR
{/if}
FAQ
Question: I created a mandate today, but I still can’t export an invoice for the customer. Why is that?
Answer: The mandate must be at least one day old before it can be used for export. Please wait until tomorrow to export the invoices.
Question: After activating the module, I receive a 500 server error. Why is this?
Answer: There are 3 common causes for this.
Cause 1: You are using the wrong IonCube Loader version. At least version 5.0 is required.
Cause 2: The missing or incorrectly integrated PHP extension bcmath.
Cause 3: You have forgotten to rename the file secretkey-example.php to secretkey.php.
Please check that this is installed correctly.
Question: When the customer submits an order, he receives a white page or a message that the bcmod function is unknown. Why is this?
Answer: This indicates that the PHP extension bcmath is missing. Please check whether this extension is correctly integrated in your system. Bcmath is required to check the IBAN.
Question: I have bookings without IBAN/BIC in the module and there is no corresponding customer in the module. Why is this?
Answer: If the new customer places an order, for example, and selects PayPal as the payment method, but changes the payment option in the viewinvoice to SEPA using the dropdown, the invoice is immediately set to this payment method by WHMCS and transferred to the module. However, the customer himself can only be entered once he has entered his bank details in the viewinvoice.
Question: I have changed the transaction of a partial payment, but the booking in the module has not been adjusted. Why?
Answer: WHMCS unfortunately only offers a hook point when creating a new transaction. When a transaction is changed, WHMCS unfortunately does not report this to the module. To import the booking with the new value, please go to the invoice and change the payment method once to e.g. bank transfer and then back to Sepa. This will regenerate the booking and take the edited transaction into account. (From version 2.0)
Question: We no longer need a BIC and have deactivated it in the module, but the BIC is still a mandatory field in the SEPA customer area.
Answer: Please open the overview.tpl file from the Sepa module and remove the required in the affected line.