Application create is possible via EPP too

This commit is contained in:
Pinga 2025-02-17 16:20:57 +02:00
parent f2326a92e0
commit c5b2783fbf
3 changed files with 629 additions and 343 deletions

View file

@ -9,6 +9,7 @@
"namingo/rately": "^0.1.0",
"moneyphp/money": "^4.6",
"phpmailer/phpmailer": "^6.9",
"filips123/monolog-phpmailer": "^2.0"
"filips123/monolog-phpmailer": "^2.0",
"ramsey/uuid": "^4.7"
}
}

File diff suppressed because it is too large Load diff

View file

@ -23,6 +23,9 @@ use Money\Currency;
use Money\Converter;
use Money\Currencies\ISOCurrencies;
use Money\Exchange\FixedExchange;
use Ramsey\Uuid\Uuid;
use Ramsey\Uuid\Guid\Guid;
use Ramsey\Uuid\Exception\UnsatisfiedDependencyException;
/**
* Sets up and returns a Logger instance.
@ -859,6 +862,20 @@ function formatMoney(Money $money) {
return number_format($money->getAmount() / 100, 2, '.', '');
}
function createUuidFromId($id) {
// Define a namespace UUID; this should be a UUID that is unique to your application
$namespace = '123e4567-e89b-12d3-a456-426614174000';
// Generate a UUIDv5 based on the namespace and a name (in this case, the $id)
try {
$uuid5 = Uuid::uuid5($namespace, (string)$id);
return $uuid5->toString();
} catch (UnsatisfiedDependencyException $e) {
// Handle exception
return null;
}
}
/**
* Fetch a single value from the database using PDO.
*/