What is the best way to validate a credit card in PHP?

There are three parts to the validation of the card number: PATTERN – does it match an issuers pattern (e.g. VISA/Mastercard/etc.) CHECKSUM – does it actually check-sum (e.g. not just 13 random numbers after “34” to make it an AMEX card number) REALLY EXISTS – does it actually have an associated account (you are unlikely … Read more

Magento – Retrieve products with a specific attribute value

Almost all Magento Models have a corresponding Collection object that can be used to fetch multiple instances of a Model. To instantiate a Product collection, do the following $collection = Mage::getModel(‘catalog/product’)->getCollection(); Products are a Magento EAV style Model, so you’ll need to add on any additional attributes that you want to return. $collection = Mage::getModel(‘catalog/product’)->getCollection(); … Read more

Payment Processors – What do I need to know if I want to accept credit cards on my website? [closed]

I went through this process not to long ago with a company I worked for and I plan on going through it again soon with my own business. If you have some network technical knowledge, it really isn’t that bad. Otherwise you will be better off using Paypal or another type of service. The process … Read more

Stopping scripters from slamming your website

How about implementing something like SO does with the CAPTCHAs? If you’re using the site normally, you’ll probably never see one. If you happen to reload the same page too often, post successive comments too quickly, or something else that triggers an alarm, make them prove they’re human. In your case, this would probably be … Read more

How do you detect Credit card type based on number?

The credit/debit card number is referred to as a PAN, or Primary Account Number. The first six digits of the PAN are taken from the IIN, or Issuer Identification Number, belonging to the issuing bank (IINs were previously known as BIN — Bank Identification Numbers — so you may see references to that terminology in … Read more