This question already has an answer here:
I made my own payment gateway and it passes vulnerabity tests.
My store redirects to this payment gateway. Card details is collected there. Payment is processed there (not stored) and user is redirected back to our store.
So this works basically same as all payments gateways/processors like Paypal, SagePay, Cardinal etc.
Our online store don't event touch card details.
Is it PCI compilant?
Related question: PCI Compilance - Custom payment processor