There was issues with the certificate mismatch and saml assertion format. So we switched to asp.net and stopped using PHP for the task. Now we are using COMPONENTSPACE SAML2.0 library in asp.net
Question is: How do we manage to run php code with asp.net
ANS: We send an api request to asp.net code with login credentials and asp.net calls service provider and returns us the redirect url.
Hope this may help