I'm trying to use accept js to get a payment nonce back for a card but no matter what I pass in for the expiration month I am gettin the error "Please provide valid expiration month".
I have tried strings:
"08"
"12"
And integers:
8
12
But no matter what I send I get the invalid expiration month error code.
Has anyone seen this? Or am i doing something wrong? The expiration year seems to be working correctly (not getting an error about it in the response messages).
Example Code:
var secureData = {}; var authData = {}; var cardData = {}; cardData.cardNumber = data.CardNumber; //Test card cardData.month = data.ExpirationMonth; //"08" cardData.year = data.ExpirationYear; // "2021" cardData.cardCode = data.CSC; // "333" secureData.cardData = cardData; authData.clientKey = clientKey; authData.apiLoginID = loginId; secureData.authData = authData; Accept.dispatchData(secureData, responseHandler);
06-14-2017 01:08 PM
Where is data.ExpirationMonth coming from? console.log(data.ExpirationMonth) immediately before the call to sendPaymentDataToAnet().
06-14-2017 05:04 PM - edited 06-14-2017 05:10 PM
I know for a fact that data.ExpirationMonth is being populated. Doesn't work as a string or an integer.
06-14-2017 05:57 PM
Substitute data.ExpirationMonth with a hard coded 2-digit month string value for testing purposes.
06-14-2017 05:59 PM - edited 06-14-2017 06:01 PM
Did you ever work this out? This has started happening to me recently after previously working fine,
03-12-2018 04:19 AM