Use stripe integration to collect payments via credit card. Make sure to use you stripe Secret key. You will be required to open a stripe account in order to be able to use this feature. You can visit https://stripe.com for more information.
If you already have a stripe account go to Biz Setup / Biz Profile. Here look for Stripe Payment Gateway and enter your secret Stipe key to complete integration. Click save and you are done.