public void ValidateCallbackData(bool expected, string tx_status, string errorcode, string cnn, string tx_eci) { //arrange var data = new MPIRes { ccn = cnn, // 13 to 19 Credit card number (as originally inputted) exp = "XXXXXX", // 6 Credit card expiry date (as originally inputted) mid = "000702053562583-48001122", // 24 merchantID with the MPI. (as originally inputted) orderno = "405278", // 20 Order Number of the transaction (as originally inputted) amount = "2500", // 16 Transaction amount (as originally inputted) acqbin = null, // Up to 11, usually 6 Acquirer’s BIN currcode = null, // 3 ISO-4217 Numeric Currency Code. This will determine the exponential of amount. e.g. 702 for SGD etc. purchase_xid = "00000000000000405278", // 20 Transaction Identifier (From ACS – PARES) tx_cavv = "BwABBkl2cQAAADEmg3ZxAAAAAAA=", //28 Alphanumeric value Transaction Stain/Cardholder Authentication Verification Value (From ACS – PARES) tx_eci = tx_eci, //2 Electronic commerce indicator value (From ACS - PARES) tx_status = tx_status, //1 Possible values are Y,N,U,A “Y” – Authenticated “N” – Not Authenticated “U” – Unknown “A” – Proof of Authentication (From ACS - PARES) errorcode = errorcode, errormsg = null, additionalData = null }; //act var actual = true; try { MPIValidator.ValidateCallbackData(data); } catch (ArgumentException ex) { actual = false; } //assert Assert.Equal(expected, actual); }
public void IsECIApproved(bool expected, string cnn, string tx_eci) { Assert.Equal(expected, MPIValidator.IsECIApproved(cnn, tx_eci)); }