Esempio n. 1
0
 /**
  * Sanitize the card number .
  *
  * @param  string $card
  * @return string|false
  */
 public static function sanitize($card)
 {
     if (Master::isValid($card)) {
         return Master::sanitize($card);
     } elseif (Visa::isValid($card)) {
         return Visa::sanitize($card);
     } elseif (Amex::isValid($card)) {
         return Amex::sanitize($card);
     }
     return false;
 }
Esempio n. 2
0
 /**
  * @see \Tbs\Helper\CreditCard\Amex::isValid()
  * @dataProvider providerInvalid
  */
 public function testIsInvalid($card)
 {
     $rs = Amex::isValid($card);
     $this->assertFalse($rs);
 }