...
Table of Contents |
---|
Introduction
This plugin integrates VAI Pay as a payment method in your JTL store.
VAI Trade GmbH offers an invoice purchase solution in the B2B area a purchase on account solutionsector, which allows merchants to buy purchase goods from their suppliers by invoice.
Suppliers by invoice and pay in installmentsinstalments. VAI Trade acts as a customer towards the supplier as a customer who buys on account and resells the purchased goods to the retailer accordingly. The supplier receives a payment for his goods within 24 hours and thus bears no risk.
Further information on the subject can be found here:
https://support.vaitrade.de/de-form/articles/2104656-wie-funktioniert-einkaufsfinanzierung
...
System requirements
JTL-Shop 5.00+ and its requrementsrequirements
Other requirements
You need a customer account, register at: https://vaitrade.de/de/b2b.
...
The plugin will help you to set up the payment method, for this select the "Help" tab in the plugin. There you will get an overview of the configuration. At the point, check the settings you have stored for the payment and shipping methods.
...
Payment methods
The configuration of the payment type is done via the standard administration in the JTL store. You can find the payment types under Administration → Payment methods. You can also find a direct link on the help page of the plugin. Select VAI Pay via the pencil icon and configure the payment method as needed.
...
You specify where and with which method the button is embedded via the selector and selector method.
Option | WerteValues | BeschreibungDescription |
---|---|---|
Active: | Yes / No | Here you can globally enable or disable the plugin. |
API-Key: | Enter the API key here that you received from VAI Pay after your registration. This serves as the access key for communication with VAI Pay. | |
Secret-Key: | Enter the secret key for communication with VAI Pay here. You have also received this after your registration with VAI Pay. This is used to secure the communication with VAI Pay. | |
Mode: | Sandbox / Live | Select the operating mode here Sandbox - the plugin communicates with the test environmentLive environment |
Button colorshemecolor sheme: | Light / Dark | Select the color scheme for the pay button here. |
Button text: | “Bezahlen mit VAI” | Choose your favorite button text. The text will be displayed in the VAI Pay button. |
Button selector (bind): | CSS - Selektor Standard: #complete-order-button | pecify Specify the CSS selectors (comma-separated) to which the button should be bound. If nothing is specified, then the default selector is used. |
Button selector method: | after - nach before - davor append - anhängen prepend - voranstellen replaceWith - ersetzen | after - the button will be added after the specified element before - the button will be added before the specifying element append - the button will be appended to the specifying element prepend - the button will be prepended to the specified element replaceWith - the specified element will be replaced with the button |
Element selector (remove): | Specify here the CSS selectors of the elements that should be hidden. By default, the element "#complete-order-button" is always hidden. If your button ID is named differently, you can specify your own selector here. |
...
Assign VAI Pay to the appropriate shipping methods/countries under Administration → Shipping. The plugin also takes into account any surcharges to the payment method. You can also find a direct link to this on the plugin's help page.
...
In order for the payments made via VAI Pay to be assigned to the orders in JTL-Wawi, extended settings must be made for thisset. For a correct function with VAI Pay, the described JTL workflows are of particular importance, more information on this topic you can be found find here: https://support.vaitrade.de/de-form/articles/3482535-welche-informationen-mussen-auf-meiner-rechnung-vorhanden-sein.
Set up payment method in Wawi 1.6
In JTL WAWI, open the payment method management Zahlungen → Zahlungsarten.
Create "Vai VAI Pay" as the payment method. Note that the payment methods must correspond to the "Displayed name" in the JTL store.
...
Set up JTL-Workflow
VAI Trade GmbH acts as the buyer to the seller, so unlike other orders, the invoice may not be addressed to the buyer, but must be addressed to VAI Trade instead. Set up a WAWI workflow to automatically change the invoice address of the order to the invoice address of VAI Trade to be defined when an order is created with VAI Pay as the payment type. To do this, proceed as follows:
Set up "Vai Pay" as a payment method.
Open Admin >JTL-Workflows:
Choose Aufträge:
and mark up “Komplett bezahlt”
Create a new Workflow:
Define conditions:
Define for the previously created payment type "Vai Pay" that payments should be processed.
Set up actions:
In Table Adressdata all variables are listed which have to be changed.
Choose action “Werte setzen“
Specify with "Variable" which value should be changed for
Auftrag > Zahlungen > Rechnungsadresse > VariableSpecify the new value for Wert.
Option “Feld leeren” is not available, to empty a variable please insert a "-" (minus) as a workaround.
Test Workflow
Save the Workflow
Adressdata
The setup help is intended to assist you in entering all the required variables.
...
Variable
...
Value
...
Comment
...
Setup help
...
Adresszusatz
...
-
...
- done
...
Anrede
...
-
...
- done
...
Bundesland
...
-
...
- done
...
...
...
- done
...
Fax
...
-
...
- done
...
Firma
...
VAI Trade GmbH
...
- done
...
Firmenzusatz
...
-
...
- done
...
LandISO
...
DE
...
- done
...
Landname
...
Deutschland
...
- done
...
Mobil
...
-
...
- done
...
Name
...
-
...
- done
...
Ort
...
Berlin
...
- done
...
PLZ
...
10245
...
- done
...
Straße
...
Warschauer Platz 11-13
...
- done
...
Telefon
...
+49 30 9599984 20
...
- done
...
Titel
...
-
...
- done
...
Vorname
...
-
...
- done
...
ZuHänden
...
-
...
- done
...
Tabelle: Rechnungsadressdaten
Test WAWI-Workflow
...
Now test the Wawi workflow on a test order by first creating a test order in your store (cash payment or similar) and transferring it to the WAWI. Set the payment for the order via "Vai Pay" and a payment receipt. Make a note of the order number (e.g. 123).
...
...
Go to JTL-Workflows by choosing Aufträge > Komplett bezahlt > “Auftrag_Komplett bezahlt”
...
Your workflow actions should look something like this:
...
...
Start the test
...
...
Select an object by searching for order number (e.g. 123)
...
Open the order again. The invoice recipient has been changed:
...
...
Setup “Eigenes Feld“ (custom field)
IN JTL-WAWI, open Admin→ “Eigene Felder”
If you have updated from v1.5 to v1.6, you will find the VaiDealNumber under "Automatisch generiert". You can create a new group "VAI Pay" and drag the VaiDealNumber into to structure your fields:
...
Otherwise, create a new field with the name "VaiDealNumber" and the data type "Kurztext":
...
The VaiDealNumber is then displayed in the offer/order on the right side under the tab “Eigene Felder“ (custom fields):
...
Set up payment method in Wawi 1.5
In JTL WAWI, open the payment method management Zahlungen → Zahlungsarten.
Create "VAI Pay" as the payment method. Note that the payment methods must correspond to the "Displayed name" in the JTL store.
...
Set up the order attribute
Change to Verkauf (F6) und open an order. You can edit the order attributes with
...
Create the Attribute “VaiDealNumber“. Now the transmitted dealNumber is displayed:
...
Set up JTL-Workflow
VAI Trade GmbH acts as the buyer to the seller, so unlike other orders, the invoice may not be addressed to the buyer, but must be addressed to VAI Trade instead. Set up a WAWI workflow to automatically change the invoice address of the order to the invoice address of VAI Trade to be defined when an order is created with VAI Pay as the payment type. To do this, proceed as follows:
Set up "VAI Pay" as a payment method.
Open Admin >JTL-Workflows:
Choose Aufträge:
and mark up “Komplett bezahlt”
Create a new Workflow:
Define conditions:
Define for the previously created payment type "VAI Pay" that payments should be processed.
Set up actions:
In Table Address data all variables are listed which have to be changed.
Choose action “Werte setzen“
Specify with "Variable" which value should be changed for
Auftrag > Zahlungen > Rechnungsadresse > VariableSpecify the new value for Wert.
Option “Feld leeren” is not available, to empty a variable please insert a "-" (minus) as a workaround.
Test Workflow
Save the Workflow
Address data
The setup help is intended to assist you in entering all the required variables.
Variable | Value | Comment | Setup help |
---|---|---|---|
Adresszusatz | - |
| |
Anrede | - |
| |
Bundesland | - |
| |
| |||
Fax | - |
| |
Firma | VAI Trade GmbH |
| |
Firmenzusatz | - |
| |
LandISO | DE |
| |
Landname | Deutschland |
| |
Mobil | - |
| |
Name | - |
| |
Ort | Berlin |
| |
PLZ | 10245 |
| |
Straße | Warschauer Platz 11-13 |
| |
Telefon | +49 30 9599984 20 |
| |
Titel | - |
| |
Vorname | - |
| |
ZuHänden | - | up to Wawi 1.5 |
|
Tabelle: Invoice address data
The field "ZuHänden" no longer exists as of Wawi 1.6 and can be removed from the workflow.
VAT ID
If you have to show a VAT ID on the invoice, the VAT ID of VAI must also be shown on the invoice. The easiest way is to can enter your VAT ID in the “Firmenzusatz” field:
...
Test WAWI-Workflow
Now test the Wawi workflow on a test order by first creating a test order in your store (cash payment or similar) and transferring it to the WAWI. Set the payment for the order via "VAI Pay" and a payment receipt. Make a note of the order number (e.g. 123).
Go to JTL-Workflows by choosing Aufträge > Komplett bezahlt > “Auftrag_Komplett bezahlt”
Your workflow actions should look something like this:
Start the test
Select an object by searching for order number (e.g. 123)
Open the order again. The invoice recipient has been changed:
Set up E-Mail template
As a seller, you have to send the buyer's invoice to the intermediary. In this case, a differentiation based on payment type must be set up in the e-mail template. The correct e-mail address for the transaction has already been set by the workflow. The corresponding DealNumber has been assigned in the incoming payment for the transaction. Open Admin → “Druck- / E-Mail- / Exportvorlagen“
...
Select Mailen → Standardvorlage → Bearbeiten. “E-Mail-Vorlagen bearbeiten” opens. Set the subject to “Benutzerdefiniert” to be able to open the advanced settings "...". Make sure that the variable set starting with “Vorgang” is available on the right-hand side. If this is not the case, you use a new standard template. Use the template "Standard (Veraltet)" instead, this template contains the required variable set:
...
Adapt subject
If you have not made any changes to your standard e-mail template, you can use the code as it is. Otherwise, adapt the code or insert your modifications in the ELSE part:
Code Block |
---|
{% if Vorgang.Zahlungen.ErstesObjekt.Zahlungsart.Name == "VAI Pay" %}
Rechnung zu VAI-Deal: #{{ Vorgang.Zahlungen.ErstesObjekt.ExterneTransaktionsID }}
{% else %}
Rechnung über "{{ Report.InvoicePosition[0].Name | Truncate: 20 }}"{% case Report.InvoicePosition.Size %}{% when 0%}{% when 1 %}{% when 2 %} und einem weiteren Artikel{% else %} und {{ Report.InvoicePosition.Size | Minus: 1 }} weiteren Artikeln{% endcase%} von {{ Report.Company.CompanyName }}
{% endif %} |
Wawi 1.5
Code Block |
---|
{% if Vorgang.Zahlungen.ErstesObjekt.Zahlungsart.Name == "VAI Pay" %}
Rechnung zu VAI-Deal: #{% assign Attribute = Vorgang.Auftrag.Attribute | Split: '|' %}{% for Attribut in Attribute %}{% if Attribut contains 'VaiDealNumber' %}{{ Attribut | ReplaceFirst: 'VaiDealNumber=','' }}{% endif %}{% endfor %}
{% else %}
Rechnung über "{{ Report.InvoicePosition[0].Name | Truncate: 20 }}"{% case Report.InvoicePosition.Size %}{% when 0%}{% when 1 %}{% when 2 %} und einem weiteren Artikel{% else %} und {{ Report.InvoicePosition.Size | Minus: 1 }} weiteren Artikeln{% endcase%} von {{ Report.Company.CompanyName }}
{% endif %} |
Wawi 1.6
Customise Invoice PDF Name
The same applies to the naming of the PDF invoice name. Insert your modifications in the ELSE part at the end of the code line:
Code Block |
---|
{% if Vorgang.Zahlungen.ErstesObjekt.Zahlungsart.Name == "VAI Pay" %}#{{ Vorgang.Zahlungen.ErstesObjekt.ExterneTransaktionsID }}.pdf{% else %}Rechnung-{{ Vorgang.Rechnungsnummer }}.pdf{% endif %} |
Wawi 1.5
Code Block |
---|
{% if Vorgang.Zahlungen.ErstesObjekt.Zahlungsart.Name == "VAI Pay" %}#{{ Vorgang.Zahlungen.ErstesObjekt.ExterneTransaktionsID }}.pdf{% else %}{{ Vorgang.Vorgangsid }}.pdf{% endif %} |
Wawi 1.6
On operation
Shop
The payment method is integrated in the storefront of the store like a regular JTL store payment method.
...
Column | Description |
---|---|
Order ID | JTL-Shop order Id |
Customer | Name of the customer |
Invoice ID | Internal invoice number (UUID generated by the plugin) |
Deal-Number | VAI Pay deal number (internal ID generated by VAI Pay) |
Status | Status of the payment (confirmed/unconfirmed). The status is confirmed when the order has been created in the JTL store and VAI Pay has confirmed the transferred amounts. |
Total Sum | Total gross amount in the JTL store (due to any fees, the amounts in the VAI customer account may differ). |
Order date | Timestamp of the order or payment |
IP-Address | IP of the buyer/customer |
...
The JTL workflows, once set up, start automatically during the Wawi reconciliation synchronization and do not require any further processing during operationprocessing during operation.
The plugin also has no further interaction with the Wawi, cancellations must be solved directly with VAI. Furthermore, the plug-in does not respond to a Wawi comparison in the opposite direction.
Customization
The payment method itself has no customizable elements. However, you can specify which color scheme and button text to display on the summary page.
...
You can find the shop log in the JTL admin area under Administartion Administration → Troubleshooting → Log.
The JTL log works with log levels in order not to fill the database with log data indefinitely. Conversely, this means that you will only see log messages if they have been generated after the log level has been changed. The plug-in logs almost exclusively in the debug log level, except for critical errors. So if something does not work, you should first activate the debug log level, then perform a test order, then deactivate the debug log level again and consult the messages logged in the meantime.
...
The web server log becomes relevant if you encounter an error 500 (= white page) somewhere.
Your hoster hosting provider can provide you with the web server log.
...
Warning |
---|
Attention: Only edit the shop's config file if you know what you are doing! Incorrect adjustments here can make your shop inaccessible or (encrypted) data unusable. If in doubt, ask your hoster or service partner for help. |
...
make your shop inaccessible or (encrypted) data unusable. If in doubt, ask your hoster or service partner for help. |
Changelog
v1.0.3 (July 2023)
Bugfix: Improved checks for payment errors during payment processing.
v1.0.2 (February 2023)
Transmission of the order number in the shop
v1.0.1 (January 2023)
JTL Shop 5.2 Kompatibilität
v1.0.0 (August 2022)
Initiales ReleaseInitialRelease
Support und Contact
siehe Go to Support und KontaktContact