in the payu page there is a sdk package to integrate in my laravel 5.6 but I do not know how or where to store it.
in the payu page there is a sdk package to integrate in my laravel 5.6 but I do not know how or where to store it.
You must download the SDK
, unzip it and add it to some directory of your project. For example, if you put it inside the /app
directory, you should have something like this:
- app
--- Http
--- Providers
--- lib <--------------- librería de PayU
----- PayU
------- api
--------- exceptions
--------- resources
--------- util
- bootstrap
- config
- database
- ...
- ...
Then, you must configure your credentials in the PayU
configuration:
/app/lib/PayU.php
/**
* The method invocation is for testing purposes
*/
public static $isTest = false; // <--------
/**
* The merchant API key
*/
public static $apiKey = "XXXXX"; // <--------
/**
* The merchant API Login
*/
public static $apiLogin = "XXXXX"; // <--------
/**
* The merchant Id
*/
public static $merchantId = "XXXXX"; // <--------
(*) Replace "XXXXX"
with your credentials.
PS: As a recommendation, you should refer to environment variables hosted in .env
.
Already with this you could use the library. For management and guidelines, check the documentation from PayU.