Paternity test

Hi I am 22 years old and 28 weeks pregnant this kinda long so sorry for that but to start off my conception date is around April 23rd based off estimated ovulation date me and my ex broke up on the 21st of April we were last intimate on April 18 I was depressed and had a one night stand on the 23rd found out I was pregnant may 3rd ex wants nothing to do with baby when I told him he's 1 of 2 possible fathers and blocked me and moved out of state the guy I had the one night stand with wants to be a father tho he hasn't exactly been completely present during my pregnancy he always checks on me and baby daily through out the day even tho we aren't together i wanted to do a paternity test while I'm still pregnant but it cost too much so we agreed to do it after birth even tho he knows it's a 50/50 chance he is or isn't the father he still wants the child to have his last name and he wants to be on the birth certificate I think that's sweet of him but personally I want to have confirmation of paternity before doing that incase any issues arise later. Being irresponsible got me in this situation in the first place so I don't want to make anymore bad decisions someone is going to call me mom now so it's time to grow up but my question is do hospitals do paternity testing right after birth if you explain the situation or is that something you do on your own time??