// Determines what data to verify on confirmation page private void ConfirmationPage(RegisterType type, IFeeCalculation feeCalculation) { if (RegisterMgr.OnConfirmationRedirectPage()) { RegisterMgr.ClickAdvantageNo(); } switch (type) { case RegisterType.ProEvent_Single: case RegisterType.ProEvent_Update: case RegisterType.ProEvent_Group: case RegisterType.Membership: case RegisterType.ProEvent_Simple: case RegisterType.EnduranceEvent_Single_USD: this.VerifyConfirmationFeeTotals(feeCalculation); break; case RegisterType.EnduranceEvent_Single_Pound: this.VerifyConfirmationFeeTotals(feeCalculation, MoneyTool.CurrencyCode.GBP); break; } }
// Determines what data to verify on checkout page private void CheckoutPage(RegisterType type, IFeeCalculation feeCalculation, RegisterManager.PaymentMethod paymentMethod) { switch (type) { case RegisterType.ProEvent_Single: case RegisterType.ProEvent_Group: case RegisterType.Membership: case RegisterType.ProEvent_Simple: case RegisterType.ProEvent_Update: this.VerifyCheckoutFeeTotals(feeCalculation); RegisterMgr.PayMoney(paymentMethod); RegisterMgr.FinishRegistration(); break; case RegisterType.EnduranceEvent_Single_USD: this.VerifyCheckoutFeeTotals(feeCalculation); RegisterMgr.ClickCheckoutActiveWaiver(); RegisterMgr.PayMoney(paymentMethod); RegisterMgr.FinishRegistration(); break; case RegisterType.EnduranceEvent_Single_Pound: this.VerifyCheckoutFeeTotals(feeCalculation, MoneyTool.CurrencyCode.GBP); RegisterMgr.ClickCheckoutActiveWaiver(); RegisterMgr.PayMoney(paymentMethod); RegisterMgr.FinishRegistration(); break; } }
// Verify Fees on Confirmation page, pulls data from TransactionIntegrityData private void VerifyConfirmationFeeTotals( IFeeCalculation feeCalculation, MoneyTool.CurrencyCode currency = MoneyTool.CurrencyCode.USD) { RegisterMgr.ConfirmRegistration(); RegisterMgr.VerifyConfirmationSubTotal(feeCalculation.Subtotal.Value, currency); RegisterMgr.VerifyConfirmationTax(feeCalculation.Tax1Amount.Value, ProEvent.Tax.Name.TaxOne, currency); RegisterMgr.VerifyConfirmationTax(feeCalculation.Tax2Amount.Value, ProEvent.Tax.Name.TaxTwo, currency); if (feeCalculation.ServiceFeeTotal.HasValue) { RegisterMgr.VerifyConfirmationSerivceFee(feeCalculation.ServiceFeeTotal.Value, currency); } if (feeCalculation.ShippingFeeTotal.HasValue) { RegisterMgr.VerifyConfirmationShippingFee(feeCalculation.ShippingFeeTotal.Value, currency); } if (feeCalculation.LodgingSubtotal.HasValue) { RegisterMgr.VerifyConfirmationLodgingFeeTotal(feeCalculation.LodgingSubtotal.Value, currency); } if (feeCalculation.LodgingBookingFee.HasValue) { RegisterMgr.VerifyConfirmationLodgingBookingFeeTotal(feeCalculation.LodgingBookingFee.Value, currency); } if (feeCalculation.DiscountCodeSavings.HasValue) { if (feeCalculation.GroupDiscountSavings.HasValue) { RegisterMgr.VerifyConfirmationGroupAndDiscountSaving( feeCalculation.GroupDiscountSavings.Value, feeCalculation.DiscountCodeSavings.Value, currency); } else { RegisterMgr.VerifyConfirmationSaving(feeCalculation.DiscountCodeSavings.Value, currency); } } if (feeCalculation.RecurringSubtotal.HasValue) { RegisterMgr.VerifyConfirmationMembershipRecurringSubtotal(feeCalculation.RecurringSubtotal.Value, currency); } if (feeCalculation.RecurringTax1Amount.HasValue) { RegisterMgr.VerifyConfirmationMembershipReccuringTax( feeCalculation.RecurringTax1Amount.Value, ProEvent.Tax.Name.TaxOne, currency); } if (feeCalculation.RecurringTax2Amount.HasValue) { RegisterMgr.VerifyConfirmationMembershipReccuringTax( feeCalculation.RecurringTax2Amount.Value, ProEvent.Tax.Name.TaxTwo, currency); } if (feeCalculation.YearlyFees.HasValue) { RegisterMgr.VerifyConfirmationMembershipRecurringTotal(feeCalculation.YearlyFees.Value, currency); } if (feeCalculation.YearlyFeesDiscount.HasValue) { RegisterMgr.VerifyConfirmationMembershipRecurringSaving(feeCalculation.YearlyFeesDiscount.Value, currency); } RegisterMgr.VerifyConfirmationTotal(feeCalculation.TotalCharges.Value, currency); }
private void VerifyReportData(EventType type, IFeeCalculation feeCalculation) { if (type == EventType.Membership) { this.VerifyAttendeeReportTotals(feeCalculation.TotalCharges.Value + feeCalculation.YearlyFees.Value, type); } else { this.VerifyAttendeeReportTotals(feeCalculation.TotalCharges.Value, type); } this.VerifyTransactionFeesReport(feeCalculation.ExpectedTransactionFeesReportData); this.VerifyTransactionReport(type, feeCalculation.ExpectedTransactionReportData); }
// Verify Fees on Checkout page, pulls data from TransactionIntegrityData private void VerifyCheckoutFeeTotals( IFeeCalculation feeCalculation, Utilities.MoneyTool.CurrencyCode currency = MoneyTool.CurrencyCode.USD) { RegisterMgr.VerifyCheckoutTotal(feeCalculation.TotalCharges.Value, currency); RegisterMgr.VerifyCheckoutSubTotal(feeCalculation.Subtotal.Value, currency); RegisterMgr.VerifyCheckoutTax(feeCalculation.Tax1Amount.Value, ProEvent.Tax.Name.TaxOne, currency); RegisterMgr.VerifyCheckoutTax(feeCalculation.Tax2Amount.Value, ProEvent.Tax.Name.TaxTwo, currency); if (feeCalculation.ServiceFeeTotal.HasValue) { RegisterMgr.VerifyCheckoutSerivceFee(feeCalculation.ServiceFeeTotal.Value, currency); } if (feeCalculation.ShippingFeeTotal.HasValue) { RegisterMgr.VerifyCheckoutShippingFee(feeCalculation.ShippingFeeTotal.Value, currency); } if (feeCalculation.LodgingSubtotal.HasValue) { RegisterMgr.VerifyCheckoutLodgingFeeTotal(feeCalculation.LodgingSubtotal.Value, currency); } if (feeCalculation.LodgingBookingFee.HasValue) { RegisterMgr.VerifyCheckoutLodgingBookingFeeTotal(feeCalculation.LodgingBookingFee.Value, currency); } if (feeCalculation.DiscountCodeSavings.HasValue) { if (feeCalculation.GroupDiscountSavings.HasValue) { RegisterMgr.VerifyCheckoutGroupAndDiscountSaving( feeCalculation.GroupDiscountSavings.Value, feeCalculation.DiscountCodeSavings.Value, currency); } if (!feeCalculation.GroupDiscountSavings.HasValue) { RegisterMgr.VerifyCheckoutSaving(feeCalculation.DiscountCodeSavings.Value, currency); } } if (feeCalculation.RecurringSubtotal.HasValue) { RegisterMgr.VerifyCheckoutMembershipRecurringSubtotal(feeCalculation.RecurringSubtotal.Value, currency); } if (feeCalculation.RecurringTax1Amount.HasValue) { RegisterMgr.VerifyCheckoutMembershipReccuringTax(feeCalculation.RecurringTax1Amount.Value, ProEvent.Tax.Name.TaxOne, currency); } if (feeCalculation.RecurringTax2Amount.HasValue) { RegisterMgr.VerifyCheckoutMembershipReccuringTax(feeCalculation.RecurringTax2Amount.Value, ProEvent.Tax.Name.TaxTwo, currency); } if (feeCalculation.YearlyFees.HasValue) { RegisterMgr.VerifyCheckoutMembershipRecurringTotal(feeCalculation.YearlyFees.Value, currency); } if (feeCalculation.YearlyFeesDiscount.HasValue) { RegisterMgr.VerifyCheckoutMembershipRecurringSaving(feeCalculation.YearlyFeesDiscount.Value, currency); } }