fix: changed check response from xml to json

This commit is contained in:
2026-07-08 15:23:17 +03:00
committed by Git Moneta
parent 018f675acd
commit 6cc9866f24
11 changed files with 301 additions and 76 deletions
@@ -87,4 +87,25 @@ trait PayAnyWay
$this->load->model('checkout/order');
$this->model_checkout_order->addHistory($orderId, $orderStatusId, $comment);
}
/** @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;
}
}