To display the widget on your site, all you have to do is incorporate the following JavaScript code just before the closing </head> tag in your store's code, specifying your own account-related settings. Take a look at the example below:
<script type="text/javascript" src="https://king-avis.com/widgets/31-991bf70b65ba2b823dd8b50fd3621a2b8933b47d5.js"></script>
31 | = Merchant ID |
991bf70b65ba2b823dd8b50fd3621a2b8933b47d5 | = Marchand Token |
<?php
file_get_contents('https://king-avis.com/en/merchantorder/add?id_merchant=31&token=991bf70b65ba2b823dd8b50fd3621a2b8933b47d5&private_key=62af78aebuiod02e4e773b21e9bd4a7c54a2ab68&ref_order=17&email[email protected]&amount=57.230000&iso_currency=CHF&firstname=Germain&lastname=Tenthorey&iso_lang=en');
?>
<img src="https://king-avis.com/en/merchantorder/add?id_merchant=31&token=991bf70b65ba2b823dd8b50fd3621a2b8933b47d5&private_key=62af78aebuiod02e4e773b21e9bd4a7c54a2ab68&ref_order=17&email[email protected]&amount=57.230000&iso_currency=CHF&company=Webbax&firstname=Germain&lastname=Tenthorey&address=CP%20157&postcode=1926&city=Fully&iso_country=CH&phone=0277461981&date_order=2021-01-01%2010:01:32&iso_lang=en" height="0" width="0">
https://king-avis.com/en/merchantorder/add? | : The base link must be pre-specified as per this example. The value "/en/" may be replaced by "/de/", "/fr/", "/it/". |
id_merchant |
This is the Merchant ID taken from your King-Avis back-office settings. Type : int Field : required |
token |
This is the Merchant Token specified in your King-Avis back-office settings. Type : string Field : required |
private_key |
This is the Private Merchant Key specified in your King-Avis back-office settings. Type : string Field : required |
ref_order |
your order reference or number Type : string Field : required |
the buyer's email address Type : email Field : required |
|
amount |
total order value Type : float Field : required |
iso_currency |
the ISO code of the currency (CHF, EUR, USD...) Type : string(3) Field : required |
company |
company name Type : string Field : optional |
firstname |
the buyer's given name Type : string Field : required |
lastname |
the buyer's surname Type : string Field : required |
address |
buyer's address Type : string Field : optional |
postcode |
buyer's postal code Type : string Field : optional |
city |
buyer's city Type : string Field : optional |
iso_country |
ISO code for the buyer's country (FR, CH, DE, IT...) Type : string(2) Field : optional |
phone |
buyer's phone number Type : string Field : optional |
iso_lang |
ISO code of the buyer's language (fr, de, en, it...) Type : string(2) Field : required |
date_order |
order date Type : DateTime (Y-m-d H:i:s) Field : optional |