Actualización

This commit is contained in:
Xes
2025-04-10 12:24:57 +02:00
parent 8969cc929d
commit 45420b6f0d
39760 changed files with 4303286 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
<?php
/**
* Ejemplo 5
* Como crear una devolution 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
$refund = $culqi->Refunds->create(
array(
"amount" => 500,
"charge_id" => "{charge_id}",
"reason" => "bought an incorrect product"
)
);
// Respuesta
echo json_encode($refund);
} catch (Exception $e) {
echo json_encode($e->getMessage());
}