fix: changed check response from xml to json
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user