Checkout without leaving my website

What is the best way to keep the user on my website when they Checkout and pay by credit card? I also need this to be very safe. Do i need to setup SSL ? on my server ? DO i have to get SSL certificate ?