This function looks the same as in the paypalusa/billmelater.php file.
Could it be refactored ?