Using the libraries

This page contains the libraries and demo packages that integrates the payment to your page.

The library can be installed using composer.

composer require visma-pay/visma-pay
Usage instructions

The package contains the PHP library and an example page. You can take this code into use by just modifying couple of parameters.

  1. Download the package.
  2. The package contains following:
    • PHP library - Handles the communication to Visma Pay interface.
    • Example page - An example integration that can be used as a reference.
  3. To get started you need to perform one easy step:
    • Change login credentials - The credentials are defined in the beginning of the index.php file.
      • Change the first parameter to your api key
      • Change the second parameter to corresponding private key
      • Instructions for finding the api key and the private key
Library source from Github
See documentation for the PHP library

Node library can be installed using npm.

npm install visma-pay
Usage instructions

The package contains an example code that can be used as a reference. The example server requires express-package which can be installed by npm.

npm install express
  • To get started you need to perform one easy step:
    • Change login credentials - The credentials are defined in server.js file.
      • setApiKey is used to define API key
      • setPrivateKey is used to define private key
      • Instructions for finding the api key and the private key
    • The example express-server is capable for serving the page with or without SSL. Although it is recommended to use HTTPS. To enable HTTPS you need specify the path for certificate files. You can change these in server.js file.
    Library source from Github
    See documentation for the Node library