protected string GetCardToken_Method(string creditCardNo, string expireDateMonth, string expireDateYear, string cvcNo) { GetCardTokenClientService clientService = new GetCardTokenClientService(); GetCardTokenRequest request = null; GetCardTokenResponse response = null; GetCardTokenRequestFactory factory = new GetCardTokenRequestFactory(); factory.request.creditCardNo = creditCardNo; factory.request.expireDateMonth = expireDateMonth; factory.request.expireDateYear = expireDateYear; factory.request.cvcNo = cvcNo; try { request = factory.Build(); response = clientService.GetCardToken(request); if (response.hashData == GenerateHashData(response)) { return(response.cardToken); } else { ShowMessage("CardToken Doğrulanamadı!"); return(null); } } catch (Exception ex) { ShowMessage(ex.Message); return(null); } }
public string GetCardToken(string creditCardNo, string expireDateMonth, string expireDateYear, string cvcNo) { GetCardTokenClientService clientService = new GetCardTokenClientService(); GetCardTokenRequest request = new GetCardTokenRequestFactory().AddCreditCardNo(creditCardNo) .AddExpireDate(expireDateMonth, expireDateYear).AddCvcNo(cvcNo).Build(); GetCardTokenResponse response = clientService.GetCardToken(request); Assert.IsNotNull(response); string expectedHashData = GenerateHashData(response); Assert.AreEqual(expectedHashData, response.hashData); return(response.cardToken); }