Link to home
Create AccountLog in
Avatar of pdheady
pdheady

asked on

How would I put this into a PHP function?

$pretty_credit_limit = number_format($creditLimit);
$pretty_credit_limit = "$" . $pretty_credit_limit;

if ($returnCode == "01") {
      
      $pretty_status = "Approval"; $border_color = "green"; $subprime_msg = "Submitted"; $opportunity_status_id = 3;
      
} elseif ($returnCode == "02") {
      
      $pretty_status = "Referral (Under Manual Review). Please call xxxxx at 1-800-555-1212 for an update on the application and reference patient $first_names $last_name (#$contact_id)."; $border_color = "orange"; $opportunity_status_id = 23;
      
} elseif ($returnCode == "03") {
      
                  $ref = $_SERVER['HTTP_REFERER'];
                  header( 'refresh: 1; url='.$ref . '?returnCode=03&errorMessage=$errorMessage&opportunity_id=$opportunity_id&resubmit=1');
            
} elseif ($returnCode == "07") {
      
      $pretty_status = "Invalid SSN. Social security number is either not numeric, does not match the SSN received"; $border_color = "orange"; $opportunity_status_id = 23;
      
} elseif ($returnCode == "09") {
      
      $pretty_status = "Referral (Under Manual Review)"; $border_color = "orange"; $opportunity_status_id = 9;
      
}
ASKER CERTIFIED SOLUTION
Avatar of ncoo
ncoo

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
Avatar of pdheady
pdheady

ASKER

thx