1. Go to this page and download the library: Download saulmoralespa/wompi-api-php library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
saulmoralespa / wompi-api-php example snippets
// ... please, add composer autoloader first
ent;
$keyPrivate = "your_keyprivate";
$keyPublic = "your_keypublic";
$keyIntegrety = "your_keyIntegrety";
//instance class Client
$wompi = new Client($keyPrivate, $keyPublic, $keyIntegrety);
//for sandbox
$wompi->sandbox();
try {
$data = [
"name" => "Pago de arriendo edificio Lombardía - AP 505",
"description" => "Arriendo mensual", // Descripción del pago
"single_use" => false, // `false` current caso de que el link de pago pueda recibir múltiples transacciones APROBADAS o `true` si debe dejar de aceptar transacciones después del primer pago APROBADO
"collect_shipping" => false, // Si deseas que el cliente inserte su información de envío current el checkout, o no
"currency" => "COP",
"amount_in_cents" => 500000
];
$response = $this->wompi->createPaymentLink($data);
} catch (\Exception $exception) {
}