Integrate sdk payu laravel

1

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.

    
asked by Jhon Bernal 04.08.2018 в 22:02
source

1 answer

2

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.

    
answered by 05.08.2018 / 04:48
source