• France
lyra.com
Search
Categories
Tags
docs.
France
Spain
Europe (English)
India
Home
Implementation
Embedded form (cards)
REST payment API
REST PCI-DSS payment API
REST SEPA API
Hosted payment
Data collection form
File exchange
Mobile payment
Snippets
Plugins
Marketplace
Back Office
Merchant Back Office
Expert Back Office
Guides
Help
FAQ
Video tutorials
Support

Managing shop settings via a configuration file

Using a configuration file allows to avoid including hard-coded values in the code.

The configuration files may contain:

  • the payment page URL,
  • the test and production keys,
  • the shop ID,
  • etc.

These files allow to sort the data to be saved.

The program that generates the payment form interrogates the configuration file to know the value of a parameter.

It is the merchant's responsibility to do anything in his or her power to limit the access to the configuration file (.htaccess file, rewrite the URL, etc.).

Example of "conf.txt" configuration file:
vads_site_id = 11111111
TEST_key = 2222222222222222
PROD_key = 3333333333333333
vads_ctx_mode = TEST
Example of a call to configuration file in the payment form:
$conf_txt = parse_ini_file("conf.txt");
if ($conf_txt['vads_ctx_mode'] == "TEST") $conf_txt['key'] = $conf_txt['TEST_key'];
if ($conf_txt['vads_ctx_mode'] == "PRODUCTION") $conf_txt['key'] = $conf_txt['PROD_key'];
Recruitment

Head Office :

LYRA NETWORK
109, rue de l’innovation
31670 Labège
FRANCE

2.8.1-doc-1.8