PHP code example of carlosupreme / cep-query-payment
1. Go to this page and download the library: Download carlosupreme/cep-query-payment 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/ */
carlosupreme / cep-query-payment example snippets
use Carlosupreme\CEPQueryPayment\CEPQueryService;
// Create service instance
$cepService = new CEPQueryService();
// Prepare form data
$formData = [
'fecha' => '15-01-2024', // Payment date (dd-mm-yyyy)
'tipoCriterio' => 'T', // 'T' for tracking key, 'R' for reference
'criterio' => '1234567890', // Tracking key or reference number
'emisor' => '40012', // Sender bank code
'receptor' => '40002', // Receiver bank code
'cuenta' => '012345678901234567', // Beneficiary CLABE (18 digits)
'monto' => '1500.00', // Amount
];
// Query payment
try {
$result = $cepService->queryPayment($formData);
if ($result !== null) {
// Payment found
print_r($result);
} else {
// Payment not found
echo "Payment not found";
}
} catch (Exception $e) {
echo "Error: " . $e->getMessage();
}
use GuzzleHttp\Client;
use Carlosupreme\CEPQueryPayment\CEPQueryService;
$httpClient = new Client([
'timeout' => 120,
'verify' => true,
]);
$cepService = new CEPQueryService($httpClient);
bash
composer dump-autoload
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.