Skip to content

barnald1000/nubefact-integration

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NubeFact Integration Library

This library allows you to easily send payment to the NubeFact platform.

Features

  • Integration with the NubeFact API using Guzzle.
  • Batch processing of transactions.
  • Handling of NubeFact responses.
  • Easy to use and extensible.

Requirements

  • PHP 8.2 or higher
  • Guzzle library installed

Usage

Here's a basic example of how to use the library:

$requests = $this->repository->getAllRequests();

$service   = new GuzzleNubeFactService('https://api.nubefact.com', 'token');
$sender    = new PaymentsSender($service);
$processor = new TransactionProcessor($sender);

$transactions = $requests->map(
    static fn(array $raw) => new SingleEntryItemTransaction($raw)
);

$responses = $processor->process($transactions);

// Do something with the NubeFact responses
foreach ($responses as $response) {
    if ($response instanceof Success) {
        // Process the successful response
    } else {
        // Handle errors
    }
}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages