Payment Processing?

I am going to be building a custom E-shop that will require credit card payment processing.
I’m not totally sure how to go about doing this. What I need is a service where I can send a credit-card #, the cost, and any other relevant information to a URL and if

  1. the payment was accepted, the service should return some confirmation data
  2. if the payment was not accepted then some data should be returned stated the reason for denial.

I’ve looked at, but not sure if thats what I need. Could someone plx point me in the right direction?