Answers for "symfony card expires validation"

PHP
0

php validate credit card expiration date

$expires =  date_format( \DateTime::createFromFormat('ym', $cc_expiration),"ym");

$now =  date_format(new \DateTime(),"ym");

if ($expires < $now) {
    return 'Expired!';
}
Posted by: Guest on October-18-2020

Browse Popular Code Answers by Language