public static void Configure() { // Configure the Mellat gateway var mellatConfig = new MellatGatewayConfiguration(1111, "my user name", "my password"); ParbadConfiguration.Gateways.ConfigureMellat(mellatConfig); // Configure the Parbad Virtual gateway ParbadConfiguration.Gateways.ConfigureParbadVirtualGateway(new ParbadVirtualGatewayConfiguration("Parbad.axd")); // Configure Logger var logFilePath = HostingEnvironment.MapPath("~/App_Data/PaymentLogs/"); ParbadConfiguration.Logger.LogViewerHandlerPath = "ParbadLog.axd"; ParbadConfiguration.Logger.Provider = new XmlFileLogger(logFilePath); // Temporary Memory Storage (the default Storage. no need to set) //ParbadConfiguration.Storage = new TemporaryMemoryStorage(TemporaryMemoryStorage.DefaultInvoiceLifetime); // SQL Server Storage //ParbadConfiguration.Storage = new SqlServerStorage("Connection String", "TbPayments"); // Custom Storage //ParbadConfiguration.Storage = new MyStorage(); }
/// <summary> /// Configure Mellat gateway /// </summary> public void ConfigureMellat(MellatGatewayConfiguration mellatGatewayConfiguration) { if (mellatGatewayConfiguration == null) { throw new ArgumentNullException(nameof(mellatGatewayConfiguration)); } AddOrUpdate(Gateway.Mellat, mellatGatewayConfiguration); }