internal ReservationToReturnForExchange(string reservationId, int?quantity, PurchasePrice billingRefundAmount, BillingInformation billingInformation, OperationStatus?status)
 {
     ReservationId       = reservationId;
     Quantity            = quantity;
     BillingRefundAmount = billingRefundAmount;
     BillingInformation  = billingInformation;
     Status = status;
 }
Ejemplo n.º 2
0
        public async Task UpdateBillingInformation(BillingInformation update)
        {
            await _billingInformationCollection
            .ReplaceOneAsync(x => x.BillingInformationId == update.BillingInformationId, new BillingInformationMap(update));

            await _addressCollection
            .ReplaceOneAsync(x => x.AddressId == update.BillingAddress.ReferenceId, new AddressMap(update.BillingAddress));
        }
Ejemplo n.º 3
0
        protected static HostedPaymentRequest CreateHostedPaymentRequest()
        {
            var customer = new CustomerRequest {
                Name = "Jack Napier", Email = GenerateRandomEmail()
            };

            var shippingDetails = new ShippingDetails {
                Address = GetAddress(), Phone = GetPhone()
            };

            var billing = new BillingInformation {
                Address = GetAddress(), Phone = GetPhone()
            };

            var recipient = new PaymentRecipient
            {
                AccountNumber = "1234567",
                DateOfBirth   = "1985-05-15",
                LastName      = "TESTING",
                Zip           = "12345"
            };

            var products = new[] { new Product {
                                       Name = "Gold Necklace", Quantity = 1L, Price = 200L
                                   } };

            return(new HostedPaymentRequest
            {
                Amount = 1000L,
                Reference = "reference",
                Currency = Currency.GBP,
                Description = "Payment for Gold Necklace",
                Customer = customer,
                Shipping = shippingDetails,
                Billing = billing,
                Recipient = recipient,
                Processing = new ProcessingSettings {
                    Aft = true
                },
                Products = products,
                Risk = new RiskRequest {
                    Enabled = false
                },
                SuccessUrl = "https://example.com/payments/success",
                CancelUrl = "https://example.com/payments/success",
                FailureUrl = "https://example.com/payments/success",
                Locale = "en-GB",
                ThreeDs = new ThreeDsRequest {
                    Enabled = false, AttemptN3D = false
                },
                Capture = true,
                CaptureOn = DateTime.UtcNow,
                AllowPaymentMethods =
                    new List <PaymentSourceType> {
                    PaymentSourceType.Card, PaymentSourceType.Ideal
                }
            });
        }
Ejemplo n.º 4
0
 public BillingInformationModel(BillingInformation entity)
 {
     NameOnCard        = entity.NameOnCard;
     CardNumber        = entity.CardNumber;
     CardSecurityValue = entity.CardSecurityValue;
     ExpirationMonth   = entity.ExpirationMonth;
     ExpirationYear    = entity.ExpirationYear;
     Address           = new SystemAddressModel(entity.Address);
 }
Ejemplo n.º 5
0
 // Might have to come back and verify whats the best way to represent foreign keys
 internal BillingInformationMap(BillingInformation billingInformation)
 {
     BillingInformationId      = IntegerUtility.ParseOrDefault(billingInformation.BillingInformationId);
     CreditCardNumber          = billingInformation.CreditCardNumber;
     SecurityCode              = billingInformation.SecurityCode;
     ExpirationDate            = billingInformation.ExpirationDate;
     ReferenceCustomerId       = IntegerUtility.ParseOrDefault(billingInformation.ReferenceCustomerId);
     ReferenceBillingAddressId = IntegerUtility.ParseOrDefault(billingInformation.BillingAddress?.ReferenceId);
 }
 internal BillingInformationMap(BillingInformation billingInformation)
 {
     BillingInformationId      = billingInformation.BillingInformationId;
     CreditCardNumber          = billingInformation.CreditCardNumber;
     SecurityCode              = billingInformation.SecurityCode;
     ExpirationDate            = billingInformation.ExpirationDate;
     ReferenceCustomerId       = billingInformation.ReferenceCustomerId;
     ReferenceBillingAddressId = billingInformation.BillingAddress?.ReferenceId;
 }
Ejemplo n.º 7
0
        public RoughRiderRegistration(EventRegistration eventRegistration, BillingInformation billingInformation)
        {
            ShowPaymentSection = true;
            IsAdminView        = false;
            EventRegistration  = eventRegistration;

            BillingInformation = billingInformation;

            SetupAttendees(true);
        }
Ejemplo n.º 8
0
        public RoughRiderRegistration()
        {
            ShowPaymentSection = true;
            IsAdminView        = false;
            EventRegistration  = new EventRegistration();

            BillingInformation = new BillingInformation();

            SetupAttendees(true);
        }
Ejemplo n.º 9
0
        public Donation(Entity.Donation donation, BillingInformation billingInformation)
        {
            ShowPaymentSection  = true;
            IsAdminView         = false;
            DonationInformation = donation;
            donation.BaseType   = "PER";

            BillingInformation = billingInformation;

            SetupDonor(true);
        }
Ejemplo n.º 10
0
 public string isPrimary(IList <BillingInformation> list, BillingInformation item)
 {
     if (list.IndexOf(item) == 0)
     {
         return("Primary");
     }
     else
     {
         return("Secondary");
     }
 }
Ejemplo n.º 11
0
 public void SetShippingDetails()
 {
     currentUser = App.serverData.mei_user.currentUser;
     if (currentUser != null)
     {
         billingInformation        = App.serverData.mei_user.userAddressList[shippingIndex];
         shippingFirstName.Text    = billingInformation.firstName;
         shippingLastName.Text     = billingInformation.lastName;
         shippingAddressLine1.Text = billingInformation.addressLine1;
         if (!string.IsNullOrEmpty(billingInformation.addressLine2))
         {
             shippingAddressLine2.Text = billingInformation.addressLine2;
         }
         else
         {
             shippingAddressLine2.IsVisible = false;
         }
         shippingCity.Text    = billingInformation.city;
         shippingState.Text   = billingInformation.state;
         shippingZipCode.Text = billingInformation.postalCode;
         if (!string.IsNullOrEmpty(billingInformation.addressLine2))
         {
             currentTransaction.transactionShippingAddress = shippingAddressLine1.Text + "," + shippingAddressLine2.Text + "," + shippingCity.Text + "," + shippingState.Text + "," + shippingZipCode.Text;
         }
         else
         {
             currentTransaction.transactionShippingAddress = shippingAddressLine1.Text + "," + shippingCity.Text + "," + shippingState.Text + "," + shippingZipCode.Text;
         }
     }
     if (App.serverData.mei_user.userAddressList.Count > 1)
     {
         if (shippingIndex == App.serverData.mei_user.userAddressList.Count - 1)
         {
             nextAddress.IsVisible = false;
         }
         else
         {
             nextAddress.IsVisible = true;
         }
         if (shippingIndex == 0)
         {
             previousAddress.IsVisible = false;
         }
         else
         {
             previousAddress.IsVisible = true;
         }
     }
     else
     {
         nextAddress.IsVisible     = false;
         previousAddress.IsVisible = false;
     }
 }
Ejemplo n.º 12
0
        public Donation()
        {
            ShowPaymentSection  = true;
            IsAdminView         = false;
            DonationInformation = new Entity.Donation {
                BaseType = "PER"
            };

            BillingInformation = new BillingInformation();

            SetupDonor(true);
        }
Ejemplo n.º 13
0
        public async Task CreateBillingInformation(BillingInformation billingInformation)
        {
            var addAddress = _context.Addresses.Add(new AddressMap(billingInformation.BillingAddress));
            await _context.SaveChangesAsync();

            var addBillingInformation = new BillingInformationMap(billingInformation);

            addBillingInformation.ReferenceBillingAddressId = addAddress.Entity.AddressId;

            _context.BillingInformations.Add(addBillingInformation);
            await _context.SaveChangesAsync();
        }
Ejemplo n.º 14
0
        public void CreatePurchaseBulgaria_AndValidateNoVATTax()
        {
            IWebDriver driver = new FirefoxDriver();

            var shoppingCartPage = new ShoppingCartPage(driver);
            var billingInformationPage = new BillingInformationPage(driver);
            var onlineShoppingCart = new OnlineShoppingCartFacade(billingInformationPage, shoppingCartPage);
            var billingInfo = new BillingInformation("Anton", "Angelov", "Kaspichan");
            var shippingInfo = new ShippingInformation("Anton", "Angelov", "Kalofer");

            onlineShoppingCart.PerformPurchase(billingInfo, shippingInfo);
        }
Ejemplo n.º 15
0
        public void CreatePurchaseBulgaria_AndValidateNoVATTax()
        {
            IWebDriver driver = new FirefoxDriver();

            ShoppingCartPage         shoppingCartPage       = new ShoppingCartPage(driver);
            BillingInformationPage   billingInformationPage = new BillingInformationPage(driver);
            OnlineShoppingCartFacade onlineShoppingCart     = new OnlineShoppingCartFacade(shoppingCartPage, billingInformationPage);
            BillingInformation       billingInfo            = new BillingInformation("Anton", "Angelov", "Kaspichan");
            ShippingInformation      shippingInfo           = new ShippingInformation("Anton", "Angelov", "Kalofer");

            onlineShoppingCart.PerformPurchase(billingInfo, shippingInfo);
        }
Ejemplo n.º 16
0
        public void saveCallBack()
        {
            billing       = settings.billingInfo;
            credit        = settings.ccInfo;
            colorRelevant = settings.colorRelevant;
            sizeRelevant  = settings.sizeRelevant;
            color         = settings.color;
            size          = settings.size;
            keywords      = settings.keywords;
            category      = settings.category;

            btnOrder.Enabled = true;
        }
Ejemplo n.º 17
0
        public JsonResult PayBill(BillingInformation billInfo)
        {
            var context = invoker.Invoke(new InvokerContext(
                                             new PayCurrentBill(),
                                             new { CompanyName = Session["CompanyName"], billInfo.UserAccountData }));

            if (!context.Results.PaymentSucceeded)
            {
                return(ControllerExtensions.CreateModelErrors(this, context.Messages.ToArray()));
            }

            return(Json(new { Success = true, context.Messages }));
        }
Ejemplo n.º 18
0
        public SubmitPaymentResponse SubmitPayment(BillingInformation billingInfo, string token)
        {
            SubmitPaymentResponse mobileResponse = null;

            try
            {
                mobileResponse = reservationservice.SubmitPayment(billingInfo, token);
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(mobileResponse);
        }
Ejemplo n.º 19
0
        public void PerformPurchase(BillingInformation billingInfo, ShippingInformation shippingInfo)
        {
            ////shoppingCartPage.ChangeQuantity(1);
            shoppingCartPage.Checkout.Click();
            shoppingCartPage.AssertCheckoutButtonIsEnabled();
            shoppingCartPage.AssertCheckoutButtonIsEnabled();

            billingInformationPage.Asserter.AssertCityLabel();
            billingInformationPage.Asserter.AssertFirstNameLabel();
            billingInformationPage.Asserter.AssertLastNameLabel();
            billingInformationPage.FillBillingInformation(billingInfo.FirstName, billingInfo.LastName, billingInfo.City);
            billingInformationPage.FillShippingInformation(shippingInfo.FirstName, shippingInfo.LastName, shippingInfo.City);
            billingInformationPage.Map.ProceedToPayment.Click();
        }
Ejemplo n.º 20
0
        private static String checkOut(Product product, BillingInformation billingInfo, CreditcardDetails ccInfo)
        {
            SupremeRequest sr = new SupremeRequest(new Uri("https://www.supremenewyork.com/checkout"), ref product.getCookieReference());

            String checkOutPageSrc = sr.GET(true);

            String authenticity_token = ExHelper.getAuthenticity_token(checkOutPageSrc);
            String postString         = SupremeRequest.generatePostString(authenticity_token, billingInfo, ccInfo);

            sr = new SupremeRequest(new Uri("https://www.supremenewyork.com/checkout"), ref product.getCookieReference());
            String successPageSrc = sr.POST(postString, true, true, true, "https://www.supremenewyork.com/checkout");

            return(successPageSrc);
        }
Ejemplo n.º 21
0
 public void SetPaymentDetails(BillingInformation _card)
 {
     card = _card;
     id   = App.serverData.mei_user.userAddressList.IndexOf(card);
     if (id == 0)
     {
         makePrimaryButton.IsEnabled = false;
     }
     FullName.Text             = card.firstName + " " + card.lastName;
     shippingAddressLine1.Text = card.addressLine1;
     //shippingAddressLine2.Text = card.addressLine2;
     ShippingCity.Text       = card.city;
     shippingState.Text      = card.state;
     shippingPostalCode.Text = card.postalCode;
 }
Ejemplo n.º 22
0
        public async Task CreateBillingInformation(BillingInformation billingInformation)
        {
            var insertAddress = new AddressMap(billingInformation.BillingAddress);

            insertAddress.AddressId = Guid.NewGuid().ToString();

            await _addressCollection.InsertOneAsync(insertAddress);

            var insertBillingInformation = new BillingInformationMap(billingInformation);

            insertBillingInformation.BillingInformationId      = Guid.NewGuid().ToString();
            insertBillingInformation.ReferenceBillingAddressId = insertAddress.AddressId;

            await _billingInformationCollection.InsertOneAsync(insertBillingInformation);
        }
        public void PerformPurchase(BillingInformation billingInfo, ShippingInformation shippingInfo)
        {
            ////shoppingCartPage.ChangeQuantity(1);
            this.ShoppingCartPage.Checkout.Click();
            this.ShoppingCartPage.AssertCheckoutButtonIsEnabled();
            this.ShoppingCartPage.AssertCheckoutButtonIsEnabled();

            this.BillingInformationPage.AssertCityLabel();
            this.BillingInformationPage.AssertFirstNameLabel();
            this.BillingInformationPage.AssertLastNameLabel();
            this.BillingInformationPage.FillBillingInformation(billingInfo.FirstName,
                billingInfo.LastName,
                billingInfo.City);
            this.BillingInformationPage.FillShippingInformation(shippingInfo.FirstName,
                shippingInfo.LastName,
                shippingInfo.City);
            this.BillingInformationPage.ProceedToPayment.Click();
        }
Ejemplo n.º 24
0
        public static String generatePostString(String authenticity_token, BillingInformation billingInfo, CreditcardDetails ccInfo)
        {
            StringBuilder postString = new StringBuilder();

            postString.Append("utf8=");
            postString.Append(Constants.UTF8);
            postString.Append("&authenticity_token=");
            postString.Append(Uri.EscapeDataString(authenticity_token));
            postString.Append("&order%5Bbilling_name%5D=");
            postString.Append(billingInfo.FullName.Replace(" ", "+"));
            postString.Append("&order%5Bemail%5D=");
            postString.Append(billingInfo.Email.Replace("@", "%40"));
            postString.Append("&order%5Btel%5D=");
            postString.Append(billingInfo.Telephone.Replace("+", "%2B"));
            postString.Append("&order%5Bbilling_address%5D=");
            postString.Append(billingInfo.Address_1.Replace(" ", "+"));
            postString.Append("&order%5Bbilling_address_2%5D=");
            postString.Append(billingInfo.Address_2.Replace(" ", "+"));
            postString.Append("&order%5Bbilling_address_3%5D=");
            postString.Append(billingInfo.Address_3.Replace(" ", "+"));
            postString.Append("&order%5Bbilling_city%5D=");
            postString.Append(billingInfo.City.Replace(" ", "+"));
            postString.Append("&order%5Bbilling_zip%5D=");
            postString.Append(billingInfo.ZipCode);
            postString.Append("&order%5Bbilling_country%5D=");
            postString.Append(billingInfo.Country.Value);
            postString.Append("&same_as_billing_address=1&store_credit_id=");
            postString.Append("&credit_card%5Btype%5D=");
            postString.Append(ccInfo.Type.Value);
            postString.Append("&credit_card%5Bcnb%5D=");
            postString.Append(ccInfo.Number);
            postString.Append("&credit_card%5Bmonth%5D=");
            postString.Append(ccInfo.Month);
            postString.Append("&credit_card%5Byear%5D=");
            postString.Append(ccInfo.Year);
            postString.Append("&credit_card%5Bvval%5D=");
            postString.Append(ccInfo.CVV2);
            postString.Append("&order%5Bterms%5D=0&order%5Bterms%5D=1&hpcvv=");
            postString.Append("&commit=");
            postString.Append(Constants.en_commit);

            return(postString.ToString());
        }
Ejemplo n.º 25
0
        private static BillTo CreateBillTo(BillingInformation billingInformation)
        {
            if (billingInformation == null)
            {
                return(null);
            }
            BillTo Bill = new BillTo();

            Bill.BillToStreet    = billingInformation.BillingAddress;
            Bill.BillToStreet2   = billingInformation.BillingAddressLine2;
            Bill.BillToCity      = billingInformation.BillingCity;
            Bill.BillToState     = billingInformation.BillingState;
            Bill.BillToZip       = billingInformation.BilingZipcode;
            Bill.BillToCountry   = billingInformation.Country;
            Bill.BillToFirstName = billingInformation.BillToFirstName;
            Bill.BillToLastName  = billingInformation.BillToLastName;
            Bill.BillToEmail     = billingInformation.BillToEmail;
            Bill.BillToPhone     = billingInformation.BillToPhone;
            return(Bill);
        }
        //public SummaryOfChargesPage()
        //{

        //    //if ((int)App.Current.Properties["CustomerId"] == 0)
        //    //{
        //    //    loginIcon.IconImageSource = ImageSource.FromResource("MaxVonGrafKftMobile.Assets.LogInTool.png", assembly);

        //    //}
        //    //else
        //    //{
        //    //    loginIcon.IconImageSource = ImageSource.FromResource("MaxVonGrafKftMobile.Assets.logOutTool.png", assembly);
        //    //}
        //}

        public SummaryOfChargesPage(ReservationView reservationView, VehicleViewByTypeForMobile selectedVehicle)
        {
            InitializeComponent();
            var assembly = typeof(SummaryOfChargesPage);

            this.reservationView             = reservationView;
            summaryMobileRequest             = new GetCalculateSummaryMobileRequest();
            summaryMobileResponsecs          = null;
            ReservationMobileResponse        = null;
            ReservationMobileRequest         = new CreateReservationMobileRequest();
            summaryMobileRequest.reservation = reservationView;
            token = App.Current.Properties["currentToken"].ToString();
            termsandConditionByTypeRequest          = new GetTermsandConditionByTypeRequest();
            termsandConditionByTypeRequest.clientId = Constants.ClientId;
            termsandConditionByTypeRequest.typeId   = 3;
            termsandConditionByTypeResponse         = null;
            this.selectedVehicle = selectedVehicle;
            startDateLabel.Text  = ((DateTime)reservationView.StartDate).ToString("ddd MM/dd/yyyy");
            endDateLabel.Text    = ((DateTime)reservationView.EndDate).ToString("ddd MM/dd/yyyy");
            startTimeLabel.Text  = ((DateTime)reservationView.StartDate).ToString("hh:mm tt");
            endTimeLabel.Text    = ((DateTime)reservationView.EndDate).ToString("hh:mm tt");
            if (selectedVehicle.VehicleImageUrl != null)
            {
                vehilcleTypeImage.Source = ImageSource.FromUri(new Uri(selectedVehicle.VehicleImageUrl));
            }
            vehicleSampleLabel.Text = selectedVehicle.vehicleName;
            vehilcleTypeLabel.Text  = selectedVehicle.VehicleType;
            priceLabel.Text         = "Days: " + selectedVehicle.RateDetail.TotalDays.ToString();
            emailInvoiceRequest     = new EmailInvoiceRequest();
            emailResponse           = null;
            creditCardRequest       = new GetAllCustomerMobileCreditCardRequest();
            creditCards             = null;
            customerId = (int)App.Current.Properties["CustomerId"];

            billingInformation = new BillingInformation();
            submitPaymentandCreateReservationRequest = new SubmitPaymentandCreateReservationRequest();
            PaymentResponse = null;

            //imgSelect.Source = "iconCircleSelected.png";
        }
 public ProcessPaymentPage(decimal amountWantToPay, ReservationView reservationView)
 {
     InitializeComponent();
     this.amountWantToPay = amountWantToPay;
     this.reservationView = reservationView;
     amountLAbel.Text     = "$ " + amountWantToPay.ToString("0.00");
     creditCardRequest    = new GetAllCustomerMobileCreditCardRequest();
     creditCards          = null;
     customerId           = (int)App.Current.Properties["CustomerId"];
     token = App.Current.Properties["currentToken"].ToString();
     billingInformation = new BillingInformation();
     PaymentResponse    = null;
     agreementId        = 0;
     submitPaymentAndUpDateReservationRequest = new SubmitPaymentAndUpDateReservationRequest();
     paynowBtn.Text          = "Pay and extend now";
     isExtendAgreement       = false;
     promotionMobileRequest  = new GetPromotionMobileRequest();
     promotionMobileResponse = null;
     summaryMobileRequest    = new GetCalculateSummaryMobileRequest();
     summaryMobileResponsecs = null;
     appliedPromoId          = 0;
 }
Ejemplo n.º 28
0
 public Task CreateBillingInformation(BillingInformation billingInformation)
 {
     return(_billingInformationRepository.CreateBillingInformation(billingInformation));
 }
Ejemplo n.º 29
0
 public async Task AddCreditCard(BillingInformation billdata, CreditCardDetail cc)
 {
     await rm.SendRequest("credit_cards", Method.POST, new { billing_information = billdata, credit_card_detail = cc });
 }
Ejemplo n.º 30
0
 public BillingSubmitWrapper(SessionHeader sessionHeader, string shoppingCartId, BillingInformation billingInformation)
 {
     SessionHeader      = sessionHeader;
     ShoppingCartId     = shoppingCartId;
     BillingInformation = billingInformation;
 }
Ejemplo n.º 31
0
 public Task UpdateBillingInformation(BillingInformation update)
 {
     return(_billingInformationRepository.UpdateBillingInformation(update));
 }
Ejemplo n.º 32
0
 internal ReservationToExchange(string reservationId, int?quantity, PurchasePrice billingRefundAmount, BillingInformation billingInformation)
 {
     ReservationId       = reservationId;
     Quantity            = quantity;
     BillingRefundAmount = billingRefundAmount;
     BillingInformation  = billingInformation;
 }