Forum Moderators: coopster
Are you aware of the recommendations from VISA/MC on the kind of systems you must have in place if you're going to handle card details?
Most merchants have the actual authorisation done by their payment processor, so they aren't liable if it goes wrong...
A payment processor validates the card number for you as they take the payment and many of them offer a postcode/ZIP-code check as well. I know mine does.
It needs to be something that can validate the card number in the space of a few seconds so that the user can then carry on downloading their product, etc.
To the merchant bank processor
To the credit card interchange process
To the credit card issuer
To the merchant bank account
To the merchant bank.
the whole thing is a complicated process
and really should not be addressed outside of a gateway.
Would I pass the details to a bank's validator/processor and they then inform me if it has passed validation and return some sort of authorisation to my PHP code?
IMHO your site should NOT be asking for the credit card details at all.
You should pass a basket reference and basket total to the gateway, they ask for the payment details, make the relevant security checks, process the payment, and pass back a token to your site which indicates whether the payment succeeded. Your site can then proceed (if the order is paid) or throw an error (if the payment failed).
Hint: don't re-invent the wheel - this kind of thing has been done over and over again, why do you want to recode it?
What I was trying to avoid is having a different shopping cart company that the user has to register with and pay through
When you apply for an account with a payment gateway, most of them have a drop-down box with list of compatible shopping carts, and then "other" or "custom cart" at the bottom.
If you've programmed your own cart, you should be able to write the extra code to pass the transaction to the payment gateway and to receive the response. Compared with writing an entire shopping cart this isn't rocket science :-)