I have a Credit card expiry date with month and year only coming in form of a string say 08/17
, How can I change this string in a format so that I can pass it to Authorize.net
$creditCard->setExpirationDate( "2017-08");
I have tried to use strtotime()
but it is giving me the current year
echo $date = date('Y-m', strtotime($ccInfo['exp_date']));