Exemplo n.º 1
0
        /// <summary>
        /// Initializes the controller.
        /// </summary>
        private void Initialize()
        {
            var provider = GatewayContext.Payment.GetProviderByKey(Guid.Parse(Constants.GatewayProviderSettingsKey)) as CardConnectPaymentGatewayProvider;

            if (provider == null)
            {
                var nullRef = new NullReferenceException("CardConnectPaymentGatewayProvider is not activated or has not been resolved.");
                LogHelper.Error <CardConnectPaymentController>("Failed to find active CardConnectPaymentGatewayProvider", nullRef);

                throw nullRef;
            }

            // instantiate the service
            _cardConnectServices = new CardConnectService(provider.ExtendedData.GetProcessorSettings());

            CardConnectProcessorSettings settings = provider.ExtendedData.GetProcessorSettings();

            _successUrl = settings.SuccessUrl;
            _cancelUrl  = settings.CancelUrl;
            //_deleteInvoiceOnCancel = settings.DeleteInvoiceOnCancel;
        }
Exemplo n.º 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="CardConnectPaymentGatewayMethod"/> class.
 /// </summary>
 /// <param name="gatewayProviderService">
 /// The gateway provider service.
 /// </param>
 /// <param name="paymentMethod">
 /// The payment method.
 /// </param>
 public CardConnectPaymentGatewayMethod(IGatewayProviderService gatewayProviderService, IPaymentMethod paymentMethod, ICardConnectService cardConnectService)
     : base(gatewayProviderService, paymentMethod)
 {
     // New instance of the CardConnect payment processor
     _processor = new CardConnectPaymentProcessor(cardConnectService);
 }
 public CardConnectPaymentProcessor(ICardConnectService cardConnectService) : base(cardConnectService)
 {
 }
Exemplo n.º 4
0
 public CardConnectPaymentProcessorBase(ICardConnectService cardConnectService)
 {
     CardConnectService = cardConnectService;
     MerchId            = cardConnectService.MerchId;
 }