public override void SaveViewToModel()
 {
     if (AllowBillingAddressEdit())
     {
         BillingAddressChoice.SaveViewToModel();
     }
     if (this.PaymentMethodView != null)
     {
         if (this.Model.ActivePaymentMethod != null && this.Model.ActivePaymentMethod.PaymentType == PaymentType.CreditCard)
         {
             if (AspDotNetStorefrontCore.AppLogic.ActivePaymentGatewayCleaned() ==
                 AspDotNetStorefrontGateways.Gateway.ro_GWTWOCHECKOUT)
             {
                 TwoCheckoutPaymentView.SaveViewToModel();
                 return;
             }
             else if (AspDotNetStorefrontCore.AppLogic.ActivePaymentGatewayCleaned() ==
                      (new AspDotNetStorefrontGateways.Processors.Worldpay()).GatewayIdentifier)
             {
                 WorldPayPaymentView.SaveViewToModel();
                 return;
             }
             else if (AspDotNetStorefrontCore.AppLogic.ActivePaymentGatewayCleaned() == (new AspDotNetStorefrontGateways.Processors.SecureNetV4()).GatewayIdentifier)
             {
                 SecureNetPaymentView.SaveViewToModel();
             }
         }
         PaymentMethodView.SaveViewToModel();
     }
 }
Exemple #2
0
    public void SaveViewToModel()
    {
        switch (this.PaymentModel.ActivePaymentMethod.PaymentType)
        {
        case PaymentType.CreditCard:
        {
            SecureNetPaymentView.SaveViewToModel();
            this.CreditCardPaymentViewForm.SaveViewToModel();
        }; break;

        case PaymentType.PayPal:
        {
            this.PayPalPaymentView.SaveViewToModel();
        }; break;

        case PaymentType.CheckByMail:
        {
            this.CheckPaymentView.SaveViewToModel();
        }; break;

        case PaymentType.RequestAQuote:
        {
            this.RequestQuoteView.SaveViewToModel();
        }; break;

        case PaymentType.PurchaseOrder:
        {
            this.PurchaseOrderPaymentView.SaveViewToModel();
        } break;

        case PaymentType.PayPalExpress:
        {
            this.PayPalExpressView.SaveViewToModel();
        } break;

        case PaymentType.MicroPay:
        {
            this.MicroPayPaymentView.SaveViewToModel();
        } break;

        case PaymentType.COD:
        {
            this.CodPaymentView.SaveViewToModel();
        } break;

        case PaymentType.CheckoutByAmazon:
        {
            this.CheckOutByAmazonPaymentView.SaveViewToModel();
        } break;

        case PaymentType.PayPalEmbeddedCheckout:
        {
            this.PayPalEmbeddedCheckoutPaymentView.SaveViewToModel();
        } break;

        case PaymentType.MoneybookersQuickCheckout:
        {
            MoneybookersQuickCheckoutPaymentView.SaveViewToModel();
        } break;
        }
    }