feat: add fiscalization settings, POST callbacks and fix callback issues

This commit is contained in:
2026-10-26 18:34:30 +03:00
committed by Git Moneta
parent 1a701f0a71
commit 0ef04469d8
5 changed files with 4 additions and 53 deletions
+1 -22
View File
@@ -17,7 +17,7 @@ trait PayAnyWay
private static int $orderLockTimeoutSeconds = 10;
private static string $moduleCode = 'payanyway';
private static string $moduleVersion = '1.0.3';
private static string $moduleVersion = '1.0.4';
private static string $defaultCmsName = 'OpenCart';
private static int $clientEmailMaxLength = 64;
@@ -301,25 +301,4 @@ trait PayAnyWay
return $email;
}
/** @return non-empty-string|null */
private function getClientName(): ?string
{
$name = trim(($this->orderInfo['firstname'] ?? '') . ' ' . ($this->orderInfo['lastname'] ?? ''));
return ('' !== $name) ? $name : null;
}
/** @return non-empty-string|null */
private function getClientEmail(): ?string
{
$email = trim((string)($this->orderInfo['email'] ?? ''));
return ('' !== $email) ? filter_var($email, FILTER_SANITIZE_EMAIL) : null;
}
/** @return non-empty-string|null */
private function getClientPhone(): ?string
{
$digits = preg_replace('/\D/', '', trim((string)($this->orderInfo['telephone'] ?? '')));
return ('' !== $digits) ? '+' . $digits : null;
}
}