This commit is contained in:
Xes
2025-08-14 22:41:49 +02:00
parent 2de81ccc46
commit 8ce45119b6
39774 changed files with 4309466 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
<?php
/**
* Ejemplo 2
* Como crear un charge a una tarjeta usando Culqi PHP.
*/
try {
// Usando Composer (o puedes incluir las dependencias manualmente)
require '../vendor/autoload.php';
// Configurar tu API Key y autenticación
$SECRET_KEY = "{SECRET KEY}";
$culqi = new Culqi\Culqi(array('api_key' => $SECRET_KEY));
// Creando Cargo a una tarjeta
$card = $culqi->Cards->create(
array(
"customer_id" => "{customer_id}",
"token_id" => "{token_id}"
)
);
// Respuesta
echo json_encode($card);
} catch (Exception $e) {
echo json_encode($e->getMessage());
}