protected void Page_Load(object sender, EventArgs e) { GatewayTypeInfo gti = new GatewayTypeInfo(); gti.TestLoginId = "7wYB5c6R"; gti.LiveUrl = "https://test.authorize.net/gateway/transact.dll"; gti.TestUrl = "https://test.authorize.net/gateway/transact.dll"; gti.TestTransactionKey = "4px54kx6ZZ7489Gq"; gti.Id = Guid.NewGuid(); gti.ProviderName = "ANetBillingProvider"; GatewayInfo gi = new GatewayInfo(); gi.Id = Guid.NewGuid(); gi.GatewayTypeId = gti.Id; gi.ChargebackFee = 1; gi.TransactionFee = 10; gi.TransactionKey = "4px54kx6ZZ7489Gq"; gi.Password = "******"; gi.LoginId = "7wYB5c6R"; gi.Name = "ANetBillingProvider"; Customer cust = new Customer(); CreditCardInfo cci = new CreditCardInfo(Guid.NewGuid(), Guid.NewGuid(), "6011000000000012", 3, 2009, "0421", "Visa"); cci.ChangeDecryptionStatus(true); BillingController.ProcessPayment(gi, gti, Guid.NewGuid(), cust, cci, 7, true); }
public static bool CheckForDuplicationCardInfo(ref CreditCardInfo entity) { if (entity.CustomerId != Guid.Empty) { entity.ChangeDecryptionStatus(true); List<CreditCardInfo> creditCardInfoList = GetCreditCardsByCustomer(entity.CustomerId); foreach (CreditCardInfo objCreditCardInfo in creditCardInfoList) { if (entity.CustomerId == objCreditCardInfo.CustomerId & entity.CardNumber == objCreditCardInfo.CardNumber & entity.SecurityCode == objCreditCardInfo.SecurityCode) return true; } entity.ChangeDecryptionStatus(false); } return false; }