Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

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 sector, which allows merchants to purchase goods from their suppliers by invoice and pay in instalments. VAI Trade acts as a customer towards the supplier 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

Features

Frontend

  • Payment method VAI Pay

Backend

  • Overview of the payments with VAI-Pay

  • Configuration help for the Plugin

Wawi

  • Wawi-Workflows

Installation / Update

System requirements

  • JTL-Shop 5.00+ and its requirements

Other requirements

You need a customer account, register at: https://vaitrade.de/de/b2b.

Get more information https://support.vaitrade.de/de-form/articles/2032365-welche-voraussetzungen-gibt-es about additional requirements to use VAI Pay.

Plugin-Installation

The installation of the plugin is done according to JTL standard, as it is described here.

Plugin-Update

When updating to a newer version, you can start updating the plugin to the next available version under the menu item "PLUG-INS → My Purchases > Bound Licenses → VAI Pay". In the Status column, click "Update".

Configuration

Shop

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.

In addition to the standard settings for payment methods, the plugin contains the settings for the payment method under the Settings tab. Here you can store the data necessary for operation, which you have received from VAI Pay for the setup.

If the VAI Pay payment method is selected, the pay button is replaced with a payment button in the VAI design. You can choose from three different button texts.

You specify where and with which method the button is embedded via the selector and selector method.

Option

Values

Description

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 environment
Live - the plugin accepts real payments.

Button color sheme:

Light / Dark

Select the color scheme for the pay button here.

Button text:

“Bezahlen mit VAI”
“Jetzt einkaufen, später bezahlen“
“Ihr Einkauf in 4 Raten“

Choose your favorite button text. The text will be displayed in the VAI Pay button.

Button selector (bind):

CSS - Selektor

Standard: #complete-order-button

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

before

append

prepend

replaceWith

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.

Shipping methods

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.

JTL-Wawi

In order for the payments made via VAI Pay to be assigned to the orders in JTL-Wawi, extended settings must be made for this. For a correct function with VAI Pay, the described JTL workflows are of particular importance, more information on this can be found here: https://support.vaitrade.de/de-form/articles/3482535-welche-informationen-mussen-auf-meiner-rechnung-vorhanden-sein.

Set up payment method

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:

Customise invoice template

For the additionally required invoice information (delivery address, VAI Pay VAT ID, etc.), the following block must be set in "Rechnungsdruck nach Zahlungseingang":

Lieferadresse:
{{ Vorgang.Lieferadresse.Firma }} {{ Vorgang.Lieferadresse.Firmenzusatz }}
{{ Vorgang.Lieferadresse.Straße }} {{ Vorgang.Lieferadresse.PLZ }} {{ Vorgang.Lieferadresse.Ort }} {{ Vorgang.Lieferadresse.Land.NameDeutsch }}
Lieferbedingung: gemäß Incoterms 2010:CIP
Umsatzsteuer ID (VAI Trade GmbH): DE311841845

Terms of delivery should only be listed if applicable.

Skonto is not taken into account by the plugin.

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:

  1. Set up "Vai Pay" as a payment method.

  2. Open Admin >JTL-Workflows:

  3. Choose Aufträge:

    and mark up “Komplett bezahlt”

  4. Create a new Workflow:

  5. Define conditions:

    Define for the previously created payment type "Vai Pay" that payments should be processed.

  6. Set up actions:

    In Table Address data all variables are listed which have to be changed.

    1. Choose action “Werte setzen“

    2. Specify with "Variable" which value should be changed for
      Auftrag > Zahlungen > Rechnungsadresse > Variable

    3. Specify the new value for Wert.

    4. Option “Feld leeren” is not available, to empty a variable please insert a "-" (minus) as a workaround.

  7. Test Workflow

  8. 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

-

  • done

Anrede

-

  • done

Bundesland

-

  • done

EMail

info@vaitrade.de

  • 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

  1. 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).

  2. Go to JTL-Workflows by choosing Aufträge > Komplett bezahlt > “Auftrag_Komplett bezahlt”

  3. Your workflow actions should look something like this:

  4. Start the test

  5. Select an object by searching for order number (e.g. 123)

  6. Open the order again. The invoice recipient has been changed:

On operation

Shop

The payment method is integrated in the storefront of the store like a regular JTL store payment method.

Frontend

he VAI Pay payment method is only available to buyers under certain conditions. The payment method can only be offered for B2B in Germany and only in Euro.

If the billing country is not Germany, VAI Pay will not be offered as a payment method.

If a currency other than Euro is selected in the store, then VAI Pay cannot be offered as a payment method.

If the buyer has not entered a company in the customer details, VAI Pay will not be offered as a payment method.

Backend

In the plugin backend you can view the orders that were paid with VAI Pay. The search helps you to find the desired orders.

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
(confirmed / unconfirmed)

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

WAWI

The JTL workflows, once set up, start automatically during the Wawi reconciliation and do not require any further processing during operation.

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.

If you are using your own template, enter your special selector for the "Order Paid" button under Button Selector (Show).

Troubleshooting

If you observe any problems with the plugin, first check the logs and if necessary contact our support or your service partner if you cannot solve the problem on your own.

The more information you can give to the support in case of a problem, the sooner we will be able to help you. Non-reproducible problems, on the other hand, are also difficult to analyze.

Messages

This currency is not supported!

This message is displayed when the buyer has changed the currency other than Euro on the summary page and wants to complete the order. He will be redirected back to the shipping and payment method page and can select a payment method suitable for the desired currency.

The payment was canceled

This message is displayed when the customer clicks on "Cancel" in the VAI Pay account and thus cancels without submitting the order.

The submitted data is invalid. The order could not be created!

This message is displayed if the data transmitted by VAI Pay could not be decoded with the secret key.

The internal ID is invalid. The order could not be created!

This message is displayed when the data transmitted by VAI Pay does not match the current data in the session.

VAI could not confirm the payment!

This message is displayed when an error occurred in the API communication. In this case, VAI could not finally confirm the authenticity of the transmitted data. However, the order could be successfully created in the JTL store. The buyer was redirected to the order confirmation page.

Check logs

In the plug-in backend, success and error messages are displayed to the merchant for each action. The plug-in logs all actions into the shop log (debug level). All corresponding messages can be conveniently filtered with the prefix "VAIPAY>". 

To find out where a problem lies, the logs help you and us. Depending on the error pattern, one of the following 3 logs is more or less relevant.

Browser log

The browser log is usually relevant when something in the shop's frontend behaves strangely or does not react. (Example: You click a button and apparently nothing happens).

You can see the browser log by pressing F12 in the browser and then switching to Console.

Shop log

The shop log is always interesting if unexpected error messages are displayed in the frontend or if the plug-in reacts to inputs in the frontend but does not deliver the expected result. Sometimes the browser log also shows that the information is more likely to be found in the shop log.

You can find the shop log in the JTL admin area under 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.

Webserver-Log

The web server log becomes relevant if you encounter an error 500 (= white page) somewhere.

Your hoster can provide you with the web server log.

In the standard configuration, the JTL shop does not log anything in the web server log, not even critical errors such as an error 500.

In order for the shop to log these errors, the individual *_LOG_LEVEL values must be changed from 0 to E_ERROR in /includes/config.JTL-Shop.ini.php.

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.

Changelog

v1.0.0 (August 2022)

  • Initial Release

Support und Contact

goto Support und Contact

  • No labels