init($url) ->post(true) ->postfields($query) ->returntransfer(true) ->sslVerifypeer(false) ->sslVerifyhost(false) ->exec() === 'VERIFIED'; } /** * Is approved * * @return bool */ public function isApproved() : bool { return ! empty($_POST['payment_status']) && ($_POST['payment_status'] ?? NULL) === 'Completed'; } /** * Get error messages * * @return string|false */ public function error() { if( $this->isApproved() ) { return false; } return $_POST['payment_status'] ?? 'Payment status not found!'; } }