public CreatePaymentEvent(Guid eventID, Guid shopperID, CreditCardProtected creditCard, Money amount)
 {
     this.EventID    = eventID;
     this.ShopperID  = shopperID;
     this.CreditCard = creditCard;
     this.Amount     = amount;
 }
예제 #2
0
 public Payment(Guid paymentID, Guid shopperID, Guid merchantID, CreditCardProtected creditCard, Money amount)
 {
     this.Id         = paymentID;
     this.ShopperID  = shopperID;
     this.MerchantID = merchantID;
     this.CreditCard = creditCard;
     this.Amount     = amount;
 }
예제 #3
0
        public static void ProtectSensitiveData(IDataProtectionProvider dataProtectionProvider, Payment payment)
        {
            var protector = dataProtectionProvider.CreateProtector("Checkout.Gateway.Payment");

            var creditCardProtected = new CreditCardProtected();

            creditCardProtected.CreditCardID   = Guid.NewGuid();
            creditCardProtected.CreditCardType = protector.Protect(payment.CreditCardNotMasked.CreditCardType.ToString());
            creditCardProtected.CVV            = protector.Protect(payment.CreditCardNotMasked.CVV.ToString());
            creditCardProtected.ExpireDate     = protector.Protect(payment.CreditCardNotMasked.ExpireDate.ToString());
            creditCardProtected.Number         = protector.Protect(payment.CreditCardNotMasked.Number);
            creditCardProtected.Owner          = protector.Protect(payment.CreditCardNotMasked.Owner);

            payment.TransformCreditCardInfo(creditCardProtected);
        }
예제 #4
0
 public PaymentRegisteredEvent(Guid shopperID, Guid merchantID, Guid transactionID, Money amount, CreditCardProtected creditCard)
 {
     this.ShopperID     = shopperID;
     this.MerchantID    = merchantID;
     this.TransactionID = transactionID;
     this.Amount        = amount;
     this.CreditCard    = creditCard;
 }