From b1392e8366373f7ec3e439d23a0870db8e9e510b Mon Sep 17 00:00:00 2001 From: Michael Date: Thu, 6 Feb 2014 09:36:24 +0100 Subject: [PATCH] Initial commit --- Controllers/PaymentEPayController.cs | 237 +++ Description.txt | 8 + EPayHelper.cs | 430 ++++ EPayPaymentProcessor.cs | 484 +++++ EPayPaymentSettings.cs | 27 + Models/ConfigurationModel.cs | 35 + Models/EWindowModel.cs | 39 + Models/PaymentInfoModel.cs | 8 + Nop.Plugin.Payments.EPay.csproj | 253 +++ Properties/AssemblyInfo.cs | 35 + Properties/Settings.Designer.cs | 36 + Properties/Settings.settings | 9 + RouteProvider.cs | 48 + Views/PaymentePay/Configure.cshtml | 99 + Views/PaymentePay/EWindow.cshtml | 33 + Views/PaymentePay/PaymentInfo.cshtml | 14 + Views/Web.config | 58 + .../CardType1.datasource | 10 + .../Reference.cs | 1771 +++++++++++++++++ .../Reference.map | 7 + .../TransactionInformationType1.datasource | 10 + .../payment.disco | 6 + .../payment.wsdl | 749 +++++++ Web.Debug.config | 30 + Web.Release.config | 31 + Web.config | 45 + app.config | 35 + packages.config | 16 + 28 files changed, 4563 insertions(+) create mode 100644 Controllers/PaymentEPayController.cs create mode 100644 Description.txt create mode 100644 EPayHelper.cs create mode 100644 EPayPaymentProcessor.cs create mode 100644 EPayPaymentSettings.cs create mode 100644 Models/ConfigurationModel.cs create mode 100644 Models/EWindowModel.cs create mode 100644 Models/PaymentInfoModel.cs create mode 100644 Nop.Plugin.Payments.EPay.csproj create mode 100644 Properties/AssemblyInfo.cs create mode 100644 Properties/Settings.Designer.cs create mode 100644 Properties/Settings.settings create mode 100644 RouteProvider.cs create mode 100644 Views/PaymentePay/Configure.cshtml create mode 100644 Views/PaymentePay/EWindow.cshtml create mode 100644 Views/PaymentePay/PaymentInfo.cshtml create mode 100644 Views/Web.config create mode 100644 Web References/dk.ditonlinebetalingssystem.ssl/CardType1.datasource create mode 100644 Web References/dk.ditonlinebetalingssystem.ssl/Reference.cs create mode 100644 Web References/dk.ditonlinebetalingssystem.ssl/Reference.map create mode 100644 Web References/dk.ditonlinebetalingssystem.ssl/TransactionInformationType1.datasource create mode 100644 Web References/dk.ditonlinebetalingssystem.ssl/payment.disco create mode 100644 Web References/dk.ditonlinebetalingssystem.ssl/payment.wsdl create mode 100644 Web.Debug.config create mode 100644 Web.Release.config create mode 100644 Web.config create mode 100644 app.config create mode 100644 packages.config diff --git a/Controllers/PaymentEPayController.cs b/Controllers/PaymentEPayController.cs new file mode 100644 index 0000000..ab145ce --- /dev/null +++ b/Controllers/PaymentEPayController.cs @@ -0,0 +1,237 @@ +using System; +using System.Text; +using System.Collections.Generic; +using System.Web.Mvc; +using System.Security.Cryptography; +using Nop.Core; +using Nop.Core.Domain.Orders; +using Nop.Core.Domain.Payments; +using Nop.Plugin.Payments.EPay.Models; +using Nop.Services.Configuration; +using Nop.Services.Orders; +using Nop.Services.Payments; +using Nop.Web.Framework.Controllers; +using System.Collections.Specialized; + +namespace Nop.Plugin.Payments.EPay.Controllers +{ + public class PaymentEPayController : BaseNopPaymentController + { + private readonly ISettingService settingService; + private readonly IPaymentService paymentService; + private readonly IOrderService orderService; + private readonly IOrderProcessingService orderProcessingService; + + private readonly IWebHelper webHelper; + private readonly EPayPaymentSettings ePayPaymentSettings; + private readonly PaymentSettings paymentSettings; + + public PaymentEPayController(ISettingService settingService, + IPaymentService paymentService, IOrderService orderService, + IOrderProcessingService orderProcessingService, + IWebHelper webHelper, + EPayPaymentSettings ePayPaymentSettings, + PaymentSettings paymentSettings) + { + this.settingService = settingService; + this.paymentService = paymentService; + this.orderService = orderService; + this.orderProcessingService = orderProcessingService; + this.webHelper = webHelper; + this.ePayPaymentSettings = ePayPaymentSettings; + this.paymentSettings = paymentSettings; + } + + public string GetMD5(string inputStr) + { + byte[] textBytes = Encoding.Default.GetBytes(inputStr); + try + { + MD5CryptoServiceProvider cryptHandler = new MD5CryptoServiceProvider(); + byte[] hash = cryptHandler.ComputeHash(textBytes); + string ret = ""; + foreach (byte a in hash) + { + if (a < 16) + ret += "0" + a.ToString("x"); + else + ret += a.ToString("x"); + } + return ret; + } + catch + { + throw; + } + } + + public ActionResult Configure() + { + var model = new ConfigurationModel(); + model.MerchantId = ePayPaymentSettings.MerchantId; + model.Group = ePayPaymentSettings.Group; + model.Md5Secret = ePayPaymentSettings.Md5Secret; + model.AuthMail = ePayPaymentSettings.AuthMail; + model.InstantCapture = ePayPaymentSettings.Instantcapture; + model.OwnReceipt = ePayPaymentSettings.OwnReceipt; + model.UseRemoteInterface = ePayPaymentSettings.UseRemoteInterface; + model.RemotePassword = ePayPaymentSettings.RemotePassword; + + return View("Nop.Plugin.Payments.ePay.Views.PaymentePay.Configure", model); + } + + [HttpPost] + public ActionResult Configure(ConfigurationModel model) + { + if (!ModelState.IsValid) + return Configure(); + + //save settings + ePayPaymentSettings.MerchantId = model.MerchantId; + ePayPaymentSettings.Group = model.Group; + ePayPaymentSettings.Md5Secret = model.Md5Secret; + ePayPaymentSettings.AuthMail = model.AuthMail; + ePayPaymentSettings.Instantcapture = model.InstantCapture; + ePayPaymentSettings.OwnReceipt = model.OwnReceipt; + ePayPaymentSettings.UseRemoteInterface = model.UseRemoteInterface; + ePayPaymentSettings.RemotePassword = model.RemotePassword; + settingService.SaveSetting(ePayPaymentSettings); + + return View("Nop.Plugin.Payments.ePay.Views.PaymentePay.Configure", model); + } + + [ChildActionOnly] + public ActionResult PaymentInfo() + { + var model = new PaymentInfoModel(); + return View("Nop.Plugin.Payments.ePay.Views.PaymentePay.PaymentInfo", model); + } + + [NonAction] + public override IList ValidatePaymentForm(FormCollection form) + { + var warnings = new List(); + return warnings; + } + + [NonAction] + public override ProcessPaymentRequest GetPaymentInfo(FormCollection form) + { + var paymentInfo = new ProcessPaymentRequest(); + return paymentInfo; + } + + [ValidateInput(false)] + public ActionResult Open(FormCollection form) + { + var model = new EWindowModel(); + + //Provide properties with values + model.AcceptUrl = form["accepturl"]; + model.Amount = form["amount"]; + model.AuthMail = form["authmail"]; + model.CallbackUrl = form["callbackurl"]; + model.Cms = form["cms"]; + model.Currency = form["currency"]; + model.DeclineUrl = form["declineurl"]; + model.Group = form["group"]; + model.InstantCapture = form["instantcapture"]; + model.Language = form["language"]; + model.MerchantNumber = form["merchantnumber"]; + model.OrderId = form["orderid"]; + model.OwnReceipt = form["ownreceipt"]; + model.WindowState = form["windowstate"]; + model.Md5Check = form["md5key"]; + + return View("Nop.Plugin.Payments.ePay.Views.PaymentePay.EWindow", model); + } + + [ValidateInput(false)] + public ActionResult PdtHandler() + { + // Get the 3 strings from ePay + string transactionOrderId = webHelper.QueryString("orderid"); + string transactionTxnId = webHelper.QueryString("txnid"); + string transactionHash = webHelper.QueryString("hash"); + + // Check if ePay module is alive + var processor = paymentService.LoadPaymentMethodBySystemName("Payments.EPay") as EPayPaymentProcessor; + if (processor == null || + !processor.IsPaymentMethodActive(paymentSettings) || !processor.PluginDescriptor.Installed) + throw new NopException("Error. The ePay module couldn't be loaded!"); + + // Get order from OrderNumer + int orderNumber = 0; + orderNumber = Convert.ToInt32(transactionOrderId); + + // build md5string + string hash = ""; + NameValueCollection getParameters = HttpContext.Request.QueryString; + foreach (string key in getParameters) + { + if (key != "hash") + hash += getParameters[key]; + } + + var order = orderService.GetOrderById(orderNumber); + + // Validate payment + string md5Secret = ePayPaymentSettings.Md5Secret; + string stringToMd5 = string.Concat(hash, md5Secret); + string md5Check = GetMD5(stringToMd5); + + bool validated = (md5Check == transactionHash || md5Secret.Length == 0); + // If order is ok then proceed + + if (order != null) + { + var sb = new StringBuilder(); + sb.AppendLine("ePay transaction:"); + sb.AppendLine("Transaction ID: " + transactionTxnId); + sb.AppendLine("Validated transaction : " + validated); + + //order note + order.OrderNotes.Add(new OrderNote() + { + Note = sb.ToString(), + DisplayToCustomer = false, + CreatedOnUtc = DateTime.UtcNow + }); + orderService.UpdateOrder(order); + + if (validated) + { + if (ePayPaymentSettings.Instantcapture) + { + if (orderProcessingService.CanMarkOrderAsPaid(order)) + { + order.AuthorizationTransactionId = transactionTxnId; + orderProcessingService.MarkOrderAsPaid(order); + orderService.UpdateOrder(order); + } + } + else + { + if (orderProcessingService.CanMarkOrderAsAuthorized(order)) + { + order.AuthorizationTransactionId = transactionTxnId; + orderProcessingService.MarkAsAuthorized(order); + orderService.UpdateOrder(order); + } + } + } + else + { + throw new NopException("MD5 is not valid."); + } + } + + return RedirectToRoute("CheckoutCompleted", new { orderId = order.Id }); + } + + public ActionResult CancelOrder(FormCollection form) + { + return RedirectToAction("Index", "Home", new { area = "" }); + } + } +} \ No newline at end of file diff --git a/Description.txt b/Description.txt new file mode 100644 index 0000000..2cd14fb --- /dev/null +++ b/Description.txt @@ -0,0 +1,8 @@ +Group: Payment methods +FriendlyName: ePay Payment Solutions +SystemName: Payments.EPay +Version: 1.4 +SupportedVersions: 3.20 +Author: ePay - Michael Korsgaard +DisplayOrder: 1 +FileName: Nop.Plugin.Payments.EPay.dll \ No newline at end of file diff --git a/EPayHelper.cs b/EPayHelper.cs new file mode 100644 index 0000000..104c3ce --- /dev/null +++ b/EPayHelper.cs @@ -0,0 +1,430 @@ +using System; +using Nop.Core.Domain.Payments; +using System.Globalization; + +namespace Nop.Plugin.Payments.EPay +{ + /// + /// Represents paypal helper + /// + public class EPayHelper + { + /// + /// Gets a payment status + /// + /// ePay payment status + /// ePay pending reason + /// Payment status + public static PaymentStatus GetPaymentStatus(string paymentStatus, string pendingReason) + { + var result = PaymentStatus.Pending; + + if (paymentStatus == null) + paymentStatus = string.Empty; + + if (pendingReason == null) + pendingReason = string.Empty; + + switch (paymentStatus.ToLowerInvariant()) + { + case "pending": + switch (pendingReason.ToLowerInvariant()) + { + case "authorization": + result = PaymentStatus.Authorized; + break; + default: + result = PaymentStatus.Pending; + break; + } + break; + case "processed": + case "completed": + case "canceled_reversal": + result = PaymentStatus.Paid; + break; + case "denied": + case "expired": + case "failed": + case "voided": + result = PaymentStatus.Voided; + break; + case "refunded": + case "reversed": + result = PaymentStatus.Refunded; + break; + default: + break; + } + return result; + } + + public static int GetLangauge(CultureInfo cultureinfo) + { + switch (cultureinfo.ToString()) + { + case "en-US": + return 2; + case "da-DK": + return 1; + case "sv-SE": + return 3; + default: + return 0; + } + } + + public static string GetIsoCode(string code) + { + switch(code.ToUpper()) + { + case "ADP": + return "020"; + case "AED": + return "784"; + case "AFA": + return "004"; + case "ALL": + return "008"; + case "AMD": + return "051"; + case "ANG": + return "532"; + case "AOA": + return "973"; + case "ARS": + return "032"; + case "AUD": + return "036"; + case "AWG": + return "533"; + case "AZM": + return "031"; + case "BAM": + return "977"; + case "BBD": + return "052"; + case "BDT": + return "050"; + case "BGL": + return "100"; + case "BGN": + return "975"; + case "BHD": + return "048"; + case "BIF": + return "108"; + case "BMD": + return "060"; + case "BND": + return "096"; + case "BOB": + return "068"; + case "BOV": + return "984"; + case "BRL": + return "986"; + case "BSD": + return "044"; + case "BTN": + return "064"; + case "BWP": + return "072"; + case "BYR": + return "974"; + case "BZD": + return "084"; + case "CAD": + return "124"; + case "CDF": + return "976"; + case "CHF": + return "756"; + case "CLF": + return "990"; + case "CLP": + return "152"; + case "CNY": + return "156"; + case "COP": + return "170"; + case "CRC": + return "188"; + case "CUP": + return "192"; + case "CVE": + return "132"; + case "CYP": + return "196"; + case "CZK": + return "203"; + case "DJF": + return "262"; + case "DKK": + return "208"; + case "DOP": + return "214"; + case "DZD": + return "012"; + case "ECS": + return "218"; + case "ECV": + return "983"; + case "EEK": + return "233"; + case "EGP": + return "818"; + case "ERN": + return "232"; + case "ETB": + return "230"; + case "EUR": + return "978"; + case "FJD": + return "242"; + case "FKP": + return "238"; + case "GBP": + return "826"; + case "GEL": + return "981"; + case "GHC": + return "288"; + case "GIP": + return "292"; + case "GMD": + return "270"; + case "GNF": + return "324"; + case "GTQ": + return "320"; + case "GWP": + return "624"; + case "GYD": + return "328"; + case "HKD": + return "344"; + case "HNL": + return "340"; + case "HRK": + return "191"; + case "HTG": + return "332"; + case "HUF": + return "348"; + case "IDR": + return "360"; + case "ILS": + return "376"; + case "INR": + return "356"; + case "IQD": + return "368"; + case "IRR": + return "364"; + case "ISK": + return "352"; + case "JMD": + return "388"; + case "JOD": + return "400"; + case "JPY": + return "392"; + case "KES": + return "404"; + case "KGS": + return "417"; + case "KHR": + return "116"; + case "KMF": + return "174"; + case "KPW": + return "408"; + case "KRW": + return "410"; + case "KWD": + return "414"; + case "KYD": + return "136"; + case "KZT": + return "398"; + case "LAK": + return "418"; + case "LBP": + return "422"; + case "LKR": + return "144"; + case "LRD": + return "430"; + case "LSL": + return "426"; + case "LTL": + return "440"; + case "LVL": + return "428"; + case "LYD": + return "434"; + case "MAD": + return "504"; + case "MDL": + return "498"; + case "MGF": + return "450"; + case "MKD": + return "807"; + case "MMK": + return "104"; + case "MNT": + return "496"; + case "MOP": + return "446"; + case "MRO": + return "478"; + case "MTL": + return "470"; + case "MUR": + return "480"; + case "MVR": + return "462"; + case "MWK": + return "454"; + case "MXN": + return "484"; + case "MXV": + return "979"; + case "MYR": + return "458"; + case "MZM": + return "508"; + case "NAD": + return "516"; + case "NGN": + return "566"; + case "NIO": + return "558"; + case "NOK": + return "578"; + case "NPR": + return "524"; + case "NZD": + return "554"; + case "OMR": + return "512"; + case "PAB": + return "590"; + case "PEN": + return "604"; + case "PGK": + return "598"; + case "PHP": + return "608"; + case "PKR": + return "586"; + case "PLN": + return "985"; + case "PYG": + return "600"; + case "QAR": + return "634"; + case "ROL": + return "642"; + case "RUB": + return "643"; + case "RUR": + return "810"; + case "RWF": + return "646"; + case "SAR": + return "682"; + case "SBD": + return "090"; + case "SCR": + return "690"; + case "SDD": + return "736"; + case "SEK": + return "752"; + case "SGD": + return "702"; + case "SHP": + return "654"; + case "SIT": + return "705"; + case "SKK": + return "703"; + case "SLL": + return "694"; + case "SOS": + return "706"; + case "SRG": + return "740"; + case "STD": + return "678"; + case "SVC": + return "222"; + case "SYP": + return "760"; + case "SZL": + return "748"; + case "THB": + return "764"; + case "TJS": + return "972"; + case "TMM": + return "795"; + case "TND": + return "788"; + case "TOP": + return "776"; + case "TPE": + return "626"; + case "TRL": + return "792"; + case "TRY": + return "949"; + case "TTD": + return "780"; + case "TWD": + return "901"; + case "TZS": + return "834"; + case "UAH": + return "980"; + case "UGX": + return "800"; + case "USD": + return "840"; + case "UYU": + return "858"; + case "UZS": + return "860"; + case "VEB": + return "862"; + case "VND": + return "704"; + case "VUV": + return "548"; + case "XAF": + return "950"; + case "XCD": + return "951"; + case "XOF": + return "952"; + case "XPF": + return "953"; + case "YER": + return "886"; + case "YUM": + return "891"; + case "ZAR": + return "710"; + case "ZMK": + return "894"; + case "ZWD": + return "716"; + } + + return "208"; + } + } +} \ No newline at end of file diff --git a/EPayPaymentProcessor.cs b/EPayPaymentProcessor.cs new file mode 100644 index 0000000..6c899db --- /dev/null +++ b/EPayPaymentProcessor.cs @@ -0,0 +1,484 @@ +using System; +using System.Security.Cryptography; +using System.Globalization; +using System.Text; +using System.Web.Routing; +using Nop.Core; +using Nop.Core.Domain.Orders; +using Nop.Core.Domain.Payments; +using Nop.Core.Plugins; +using Nop.Plugin.Payments.EPay.Controllers; +using Nop.Services.Configuration; +using Nop.Services.Payments; +using System.Threading; +using System.Collections.Generic; +using Nop.Web.Framework; + +namespace Nop.Plugin.Payments.EPay +{ + /// + /// ePay payment processor + /// + public class EPayPaymentProcessor : BasePlugin, IPaymentMethod + { + #region Fields + + private readonly EPayPaymentSettings ePayPaymentSettings; + private readonly ISettingService settingService; + private readonly IWebHelper webHelper; + + #endregion + + #region Ctor + + public EPayPaymentProcessor(EPayPaymentSettings ePayPaymentSettings, + ISettingService settingService, IWebHelper webHelper) + { + this.ePayPaymentSettings = ePayPaymentSettings; + this.settingService = settingService; + this.webHelper = webHelper; + } + + #endregion + + #region Utilities + + #endregion + + #region Methods + + public decimal GetAdditionalHandlingFee(IList cart) + { + return decimal.Zero; + } + + public string GetMD5(string inputStr) + { + byte[] textBytes = Encoding.Default.GetBytes(inputStr); + try + { + MD5CryptoServiceProvider cryptHandler = new MD5CryptoServiceProvider(); + byte[] hash = cryptHandler.ComputeHash(textBytes); + string ret = ""; + foreach (byte a in hash) + { + if (a < 16) + ret += "0" + a.ToString("x"); + else + ret += a.ToString("x"); + } + return ret; + } + catch + { + throw; + } + } + + /// + /// Process a payment + /// + /// Payment info required for an order processing + /// Process payment result + public ProcessPaymentResult ProcessPayment(ProcessPaymentRequest processPaymentRequest) + { + var result = new ProcessPaymentResult(); + result.NewPaymentStatus = PaymentStatus.Pending; + return result; + } + + /// + /// Post process payment (used by payment gateways that require redirecting to a third-party URL) + /// + /// Payment info required for an order processing + public void PostProcessPayment(PostProcessPaymentRequest postProcessPaymentRequest) + { + string lang = EPayHelper.GetLangauge(Thread.CurrentThread.CurrentCulture).ToString(); + + var orderTotal = Math.Round(postProcessPaymentRequest.Order.OrderTotal, 2); + string amount = (orderTotal * 100).ToString("0", CultureInfo.InvariantCulture); + string currency = EPayHelper.GetIsoCode(postProcessPaymentRequest.Order.CustomerCurrencyCode); + string itemurl = this.webHelper.GetStoreLocation(false); + string continueurl = itemurl + "Plugins/PaymentePay/PDTHandler"; + string cancelurl = itemurl + "Plugins/PaymentePay/CancelOrder"; + string merchant = ePayPaymentSettings.MerchantId; + + string ordernumber = postProcessPaymentRequest.Order.Id.ToString("D2"); + // ordernumber 1-9 must be with 0 in front, e.g. 01 + if (ordernumber.Length == 1) + ordernumber = "0" + ordernumber; + + var remotePostHelper = new RemotePost(); + remotePostHelper.FormName = "ePay"; + remotePostHelper.Url = itemurl + "Plugins/PaymentePay/Open"; + + remotePostHelper.Add("merchantnumber", merchant); + remotePostHelper.Add("orderid", ordernumber); + remotePostHelper.Add("amount", amount); + + if (ePayPaymentSettings.FullScreen) + remotePostHelper.Add("windowstate", "3"); + else + remotePostHelper.Add("windowstate", "1"); + + remotePostHelper.Add("language", lang); + remotePostHelper.Add("currency", currency); + + remotePostHelper.Add("accepturl", continueurl); + remotePostHelper.Add("callbackurl", continueurl); + remotePostHelper.Add("declineurl", cancelurl); + + remotePostHelper.Add("authmail", ePayPaymentSettings.AuthMail); + remotePostHelper.Add("authsms", ePayPaymentSettings.AuthSms); + remotePostHelper.Add("group", ePayPaymentSettings.Group); + + remotePostHelper.Add("instantcapture", Convert.ToByte(ePayPaymentSettings.Instantcapture).ToString()); + remotePostHelper.Add("ownreceipt", Convert.ToByte(ePayPaymentSettings.OwnReceipt).ToString()); + + remotePostHelper.Add("cms", "nopcommerce"); + + string stringToMd5 = ""; + foreach (string key in remotePostHelper.Params) + { + stringToMd5 += "" + remotePostHelper.Params[key].ToString(); + } + + string md5Check = GetMD5(stringToMd5 + ePayPaymentSettings.Md5Secret); + remotePostHelper.Add("md5key", md5Check); + + remotePostHelper.Post(); + } + + /// + /// Gets additional handling fee + /// + /// Additional handling fee + public decimal GetAdditionalHandlingFee() + { + return 0; + } + + /// + /// Captures payment + /// + /// Capture payment request + /// Capture payment result + public CapturePaymentResult Capture(CapturePaymentRequest capturePaymentRequest) + { + var result = new CapturePaymentResult(); + + if (ePayPaymentSettings.UseRemoteInterface) + { + int pbsResponse = -1; + int epayresponse = -1; + + try + { + var orderTotal = Math.Round(capturePaymentRequest.Order.OrderTotal, 2); + string amount = (orderTotal * 100).ToString("0", CultureInfo.InvariantCulture); + + dk.ditonlinebetalingssystem.ssl.Payment payment = new dk.ditonlinebetalingssystem.ssl.Payment(); + payment.capture(Convert.ToInt32(ePayPaymentSettings.MerchantId), Convert.ToInt32(capturePaymentRequest.Order.AuthorizationTransactionId), Convert.ToInt32(amount), "", ePayPaymentSettings.RemotePassword, ref pbsResponse, ref epayresponse); + + if (epayresponse == -1) + { + result.NewPaymentStatus = PaymentStatus.Paid; + } + else + { + result.AddError("Could not capture: pbsResponse:" + pbsResponse.ToString() + " epayresponse: " + epayresponse.ToString()); + } + } + catch (Exception error) + { + result.AddError("Could not capture: " + error.Message); + } + } + else + { + result.AddError("Remote interface is not activated."); + } + + return result; + } + + /// + /// Refunds a payment + /// + /// Request + /// Result + public RefundPaymentResult Refund(RefundPaymentRequest refundPaymentRequest) + { + var result = new RefundPaymentResult(); + + if (ePayPaymentSettings.UseRemoteInterface) + { + int pbsresponse = -1; + int epayresponse = -1; + + try + { + var orderTotal = Math.Round(refundPaymentRequest.AmountToRefund, 2); + string amount = (orderTotal * 100).ToString("0", CultureInfo.InvariantCulture); + + dk.ditonlinebetalingssystem.ssl.Payment payment = new dk.ditonlinebetalingssystem.ssl.Payment(); + payment.credit(Convert.ToInt32(ePayPaymentSettings.MerchantId), Convert.ToInt32(refundPaymentRequest.Order.AuthorizationTransactionId), Convert.ToInt32(amount), "", ePayPaymentSettings.RemotePassword, ref pbsresponse, ref epayresponse); + + if (epayresponse == -1) + { + if (refundPaymentRequest.Order.OrderTotal == refundPaymentRequest.Order.RefundedAmount + refundPaymentRequest.AmountToRefund) + { + result.NewPaymentStatus = PaymentStatus.Refunded; + } + else + { + result.NewPaymentStatus = PaymentStatus.PartiallyRefunded; + } + } + else + { + result.AddError("Could not refund: pbsResponse:" + pbsresponse.ToString() + " epayresponse: " + epayresponse.ToString()); + } + } + catch (Exception error) + { + result.AddError("Could not refund: " + error.Message); + } + } + else + { + result.AddError("Remote interface is not activated."); + } + + return result; + } + + /// + /// Voids a payment + /// + /// Request + /// Result + public VoidPaymentResult Void(VoidPaymentRequest voidPaymentRequest) + { + var result = new VoidPaymentResult(); + + if (ePayPaymentSettings.UseRemoteInterface) + { + int epayresponse = -1; + + try + { + dk.ditonlinebetalingssystem.ssl.Payment payment = new dk.ditonlinebetalingssystem.ssl.Payment(); + payment.delete(Convert.ToInt32(ePayPaymentSettings.MerchantId), Convert.ToInt32(voidPaymentRequest.Order.AuthorizationTransactionId), "", ePayPaymentSettings.RemotePassword, ref epayresponse); + + if (epayresponse == -1) + { + result.NewPaymentStatus = PaymentStatus.Voided; + } + else + { + result.AddError("Could not void: epayresponse:" + epayresponse.ToString()); + } + } + catch (Exception error) + { + result.AddError("Could not void: " + error.Message); + } + } + else + { + result.AddError("Remote interface is not activated."); + } + + return result; + } + + /// + /// Process recurring payment + /// + /// Payment info required for an order processing + /// Process payment result + public ProcessPaymentResult ProcessRecurringPayment(ProcessPaymentRequest processPaymentRequest) + { + var result = new ProcessPaymentResult(); + result.AddError("Recurring payment not supported"); + return result; + } + + /// + /// Cancels a recurring payment + /// + /// Request + /// Result + public CancelRecurringPaymentResult CancelRecurringPayment(CancelRecurringPaymentRequest cancelPaymentRequest) + { + var result = new CancelRecurringPaymentResult(); + result.AddError("Recurring payment not supported"); + return result; + } + + public bool CanRePostProcessPayment(Order order) + { + if (order == null) + throw new ArgumentNullException("order"); + + //ePay is the redirection payment method + //It also validates whether order is also paid (after redirection) so customers will not be able to pay twice + + //payment status should be Pending + if (order.PaymentStatus != PaymentStatus.Pending) + return false; + + //let's ensure that at least 1 minute passed after order is placed + if ((DateTime.UtcNow - order.CreatedOnUtc).TotalMinutes < 1) + return false; + + return true; + } + + /// + /// Gets a route for provider configuration + /// + /// Action name + /// Controller name + /// Route values + public void GetConfigurationRoute(out string actionName, out string controllerName, out RouteValueDictionary routeValues) + { + actionName = "Configure"; + controllerName = "PaymentePay"; + routeValues = new RouteValueDictionary() { { "Namespaces", "Nop.Plugin.Payments.EPay.Controllers" }, { "area", null } }; + } + + /// + /// Gets a route for payment info + /// + /// Action name + /// Controller name + /// Route values + public void GetPaymentInfoRoute(out string actionName, out string controllerName, out RouteValueDictionary routeValues) + { + actionName = "PaymentInfo"; + controllerName = "PaymentEPay"; + routeValues = new RouteValueDictionary() { { "Namespaces", "Nop.Plugin.Payments.EPay.Controllers" }, { "area", null } }; + } + + public Type GetControllerType() + { + return typeof(PaymentEPayController); + } + + public override void Install() + { + var settings = new EPayPaymentSettings() + { + MerchantId = "Oplyses på din ePay konto", + Group = "", + Md5Secret = "", + AuthMail = "", + AuthSms = "", + Instantcapture = false, + OwnReceipt = false, + UseRemoteInterface = false, + RemotePassword = "" + }; + settingService.SaveSetting(settings); + + base.Install(); + } + + #endregion + + #region Properies + + /// + /// Gets a value indicating whether capture is supported + /// + public bool SupportCapture + { + get + { + if (ePayPaymentSettings.UseRemoteInterface) + return true; + else + return false; + } + } + + /// + /// Gets a value indicating whether partial refund is supported + /// + public bool SupportPartiallyRefund + { + get + { + if (ePayPaymentSettings.UseRemoteInterface) + return true; + else + return false; + } + } + + /// + /// Gets a value indicating whether refund is supported + /// + public bool SupportRefund + { + get + { + if (ePayPaymentSettings.UseRemoteInterface) + return true; + else + return false; + } + } + + /// + /// Gets a value indicating whether void is supported + /// + public bool SupportVoid + { + get + { + if (ePayPaymentSettings.UseRemoteInterface) + return true; + else + return false; + } + } + + /// + /// Gets a recurring payment type of payment method + /// + public RecurringPaymentType RecurringPaymentType + { + get + { + return RecurringPaymentType.NotSupported; + } + } + + /// + /// Gets a payment method type + /// + public PaymentMethodType PaymentMethodType + { + get + { + return PaymentMethodType.Redirection; + } + } + + /// + /// Gets a value indicating whether we should display a payment information page for this plugin + /// + public bool SkipPaymentInfo + { + get + { + return true; + } + } + + #endregion + } +} \ No newline at end of file diff --git a/EPayPaymentSettings.cs b/EPayPaymentSettings.cs new file mode 100644 index 0000000..41ddb44 --- /dev/null +++ b/EPayPaymentSettings.cs @@ -0,0 +1,27 @@ +using Nop.Core.Configuration; + +namespace Nop.Plugin.Payments.EPay +{ + public class EPayPaymentSettings : ISettings + { + public string MerchantId { get; set; } + + public bool FullScreen { get; set; } + + public string Group { get; set; } + + public string Md5Secret { get; set; } + + public string AuthMail { get; set; } + + public string AuthSms { get; set; } + + public bool Instantcapture { get; set; } + + public bool OwnReceipt { get; set; } + + public bool UseRemoteInterface { get; set; } + + public string RemotePassword { get; set; } + } +} \ No newline at end of file diff --git a/Models/ConfigurationModel.cs b/Models/ConfigurationModel.cs new file mode 100644 index 0000000..78c93ac --- /dev/null +++ b/Models/ConfigurationModel.cs @@ -0,0 +1,35 @@ +using System.ComponentModel; +using Nop.Web.Framework.Mvc; + +namespace Nop.Plugin.Payments.EPay.Models +{ + public class ConfigurationModel : BaseNopModel + { + [DisplayName("Merchantnumber")] + public string MerchantId { get; set; } + + [DisplayName("Use full screen")] + public bool FullScreen { get; set; } + + [DisplayName("Group")] + public string Group { get; set; } + + [DisplayName("MD5 Key")] + public string Md5Secret { get; set; } + + [DisplayName("Auth Mail")] + public string AuthMail { get; set; } + + [DisplayName("Instant capture")] + public bool InstantCapture { get; set; } + + [DisplayName("Own receipt")] + public bool OwnReceipt { get; set; } + + [DisplayName("Use Remote Interface")] + public bool UseRemoteInterface { get; set; } + + [DisplayName("Remote Password")] + public string RemotePassword { get; set; } + } +} \ No newline at end of file diff --git a/Models/EWindowModel.cs b/Models/EWindowModel.cs new file mode 100644 index 0000000..d5c5eb5 --- /dev/null +++ b/Models/EWindowModel.cs @@ -0,0 +1,39 @@ +using System; +using System.Linq; +using Nop.Web.Framework.Mvc; + +namespace Nop.Plugin.Payments.EPay.Models +{ + public class EWindowModel : BaseNopModel + { + public string MerchantNumber { get; set; } + + public string OrderId { get; set; } + + public string Amount { get; set; } + + public string WindowState { get; set; } + + public string Language { get; set; } + + public string Currency { get; set; } + + public string AcceptUrl { get; set; } + + public string CallbackUrl { get; set; } + + public string DeclineUrl { get; set; } + + public string AuthMail { get; set; } + + public string Group { get; set; } + + public string InstantCapture { get; set; } + + public string OwnReceipt { get; set; } + + public string Cms { get; set; } + + public string Md5Check { get; set; } + } +} \ No newline at end of file diff --git a/Models/PaymentInfoModel.cs b/Models/PaymentInfoModel.cs new file mode 100644 index 0000000..6a2dc38 --- /dev/null +++ b/Models/PaymentInfoModel.cs @@ -0,0 +1,8 @@ +using Nop.Web.Framework.Mvc; + +namespace Nop.Plugin.Payments.EPay.Models +{ + public class PaymentInfoModel : BaseNopModel + { + } +} \ No newline at end of file diff --git a/Nop.Plugin.Payments.EPay.csproj b/Nop.Plugin.Payments.EPay.csproj new file mode 100644 index 0000000..2722092 --- /dev/null +++ b/Nop.Plugin.Payments.EPay.csproj @@ -0,0 +1,253 @@ + + + + Debug + x86 + 8.0.30703 + 2.0 + {38C6006E-AB6C-4B29-8ED2-2C26EBFB38EB} + Library + Properties + Nop.Plugin.Payments.EPay + Nop.Plugin.Payments.EPay + v4.5 + + + 512 + publish\ + true + Disk + false + Foreground + 7 + Days + false + false + true + 0 + 1.0.0.%2a + false + false + true + ..\..\..\..\..\..\dev\NopCommerce3.20\ + true + + + AnyCPU + true + full + true + ..\..\Presentation\Nop.Web\Plugins\Payments.ePay\ + TRACE + prompt + 4 + false + + + AnyCPU + pdbonly + true + ..\..\Presentation\Nop.Web\Plugins\Payments.ePay\ + TRACE + prompt + 4 + false + + + + + + AnyCPU + bin\Debug\ + false + + + AnyCPU + bin\Release\ + false + + + + True + ..\..\..\..\..\..\dev\NopCommerce3.20\packages\Microsoft.Web.Infrastructure.1.0.0.0\lib\net40\Microsoft.Web.Infrastructure.dll + + + + + + + ..\..\..\..\..\..\dev\NopCommerce3.20\packages\Microsoft.Net.Http.2.2.18\lib\net45\System.Net.Http.Extensions.dll + + + ..\..\..\..\..\..\dev\NopCommerce3.20\packages\Microsoft.Net.Http.2.2.18\lib\net45\System.Net.Http.Primitives.dll + + + + + False + ..\..\..\..\..\..\dev\NopCommerce3.20\packages\Microsoft.AspNet.WebPages.3.0.0\lib\net45\System.Web.Helpers.dll + + + False + ..\..\..\..\..\..\dev\NopCommerce3.20\packages\Microsoft.AspNet.Mvc.5.0.0\lib\net45\System.Web.Mvc.dll + + + False + ..\..\..\..\..\..\dev\NopCommerce3.20\packages\Microsoft.AspNet.Razor.3.0.0\lib\net45\System.Web.Razor.dll + + + + False + ..\..\..\..\..\..\dev\NopCommerce3.20\packages\Microsoft.AspNet.WebPages.3.0.0\lib\net45\System.Web.WebPages.dll + + + False + ..\..\..\..\..\..\dev\NopCommerce3.20\packages\Microsoft.AspNet.WebPages.3.0.0\lib\net45\System.Web.WebPages.Deployment.dll + + + False + ..\..\..\..\..\..\dev\NopCommerce3.20\packages\Microsoft.AspNet.WebPages.3.0.0\lib\net45\System.Web.WebPages.Razor.dll + + + + + + + + + + + + + + + Code + + + + + True + True + Settings.settings + + + + True + True + Reference.map + + + + + + + + + + + PreserveNewest + + + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + + Reference.map + + + + + + + + MSDiscoCodeGenerator + Reference.cs + + + Reference.map + + + + + + + + + + + + Dynamic + Web References\dk.ditonlinebetalingssystem.ssl\ + https://ssl.ditonlinebetalingssystem.dk/remote/payment.asmx + + + + + Settings + Nop_Plugin_Payments_ePay_dk_ditonlinebetalingssystem_ssl_Payment + + + + + False + Microsoft .NET Framework 4 %28x86 and x64%29 + true + + + False + .NET Framework 3.5 SP1 Client Profile + false + + + False + .NET Framework 3.5 SP1 + false + + + False + Windows Installer 3.1 + true + + + + + {6bda8332-939f-45b7-a25e-7a797260ae59} + Nop.Core + + + {210541ad-f659-47da-8763-16f36c5cd2f4} + Nop.Services + + + {75fd4163-333c-4dd5-854d-2ef294e45d94} + Nop.Web.Framework + + + {4f1f649c-1020-45be-a487-f416d9297ff3} + Nop.Web + + + + + + + This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + + + + + + + \ No newline at end of file diff --git a/Properties/AssemblyInfo.cs b/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..496d7ad --- /dev/null +++ b/Properties/AssemblyInfo.cs @@ -0,0 +1,35 @@ +using System.Reflection; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Nop.Plugin.Payments.ePay")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Microsoft")] +[assembly: AssemblyProduct("Nop.Plugin.Payments.ePay")] +[assembly: AssemblyCopyright("Copyright © Microsoft 2012")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("57717c54-ffdb-4bb8-8af1-ef08cb91b515")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Properties/Settings.Designer.cs b/Properties/Settings.Designer.cs new file mode 100644 index 0000000..f85fbb5 --- /dev/null +++ b/Properties/Settings.Designer.cs @@ -0,0 +1,36 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.17929 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace Nop.Plugin.Payments.EPay.Properties { + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default { + get { + return defaultInstance; + } + } + + [global::System.Configuration.ApplicationScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.SpecialSettingAttribute(global::System.Configuration.SpecialSetting.WebServiceUrl)] + [global::System.Configuration.DefaultSettingValueAttribute("https://ssl.ditonlinebetalingssystem.dk/remote/payment.asmx")] + public string Nop_Plugin_Payments_ePay_dk_ditonlinebetalingssystem_ssl_Payment { + get { + return ((string)(this["Nop_Plugin_Payments_ePay_dk_ditonlinebetalingssystem_ssl_Payment"])); + } + } + } +} diff --git a/Properties/Settings.settings b/Properties/Settings.settings new file mode 100644 index 0000000..888592a --- /dev/null +++ b/Properties/Settings.settings @@ -0,0 +1,9 @@ + + + + + + https://ssl.ditonlinebetalingssystem.dk/remote/payment.asmx + + + \ No newline at end of file diff --git a/RouteProvider.cs b/RouteProvider.cs new file mode 100644 index 0000000..8a612b9 --- /dev/null +++ b/RouteProvider.cs @@ -0,0 +1,48 @@ +using System.Web.Mvc; +using System.Web.Routing; +using Nop.Web.Framework.Mvc.Routes; + +namespace Nop.Plugin.Payments.EPay +{ + public partial class RouteProvider : IRouteProvider + { + public void RegisterRoutes(RouteCollection routes) + { + routes.MapRoute("Plugin.Payments.EPay.Configure", + "Plugins/PaymentePay/Configure", + new { controller = "PaymentEPay", action = "Configure" }, + new[] { "Nop.Plugin.Payments.EPay.Controllers" }); + + routes.MapRoute("Plugin.Payments.EPay.PaymentInfo", + "Plugins/PaymentePay/PaymentInfo", + new { controller = "PaymentEPay", action = "PaymentInfo" }, + new[] { "Nop.Plugin.Payments.EPay.Controllers" }); + + //PDT + routes.MapRoute("Plugin.Payments.EPay.PDTHandler", + "Plugins/PaymentePay/PDTHandler", + new { controller = "PaymentEPay", action = "PDTHandler" }, + new[] { "Nop.Plugin.Payments.EPay.Controllers" }); + + //Open + routes.MapRoute("Plugin.Payments.EPay.Open", + "Plugins/PaymentePay/Open", + new { controller = "PaymentEPay", action = "Open" }, + new[] { "Nop.Plugin.Payments.EPay.Controllers" }); + + //Cancel + routes.MapRoute("Plugin.Payments.EPay.CancelOrder", + "Plugins/PaymentePay/CancelOrder", + new { controller = "PaymentEPay", action = "CancelOrder" }, + new[] { "Nop.Plugin.Payments.EPay.Controllers" }); + } + + public int Priority + { + get + { + return 0; + } + } + } +} \ No newline at end of file diff --git a/Views/PaymentePay/Configure.cshtml b/Views/PaymentePay/Configure.cshtml new file mode 100644 index 0000000..f8fda00 --- /dev/null +++ b/Views/PaymentePay/Configure.cshtml @@ -0,0 +1,99 @@ +@{ + Layout = ""; +} +@model ConfigurationModel +@using Nop.Plugin.Payments.EPay.Models; +@using Nop.Web.Framework; +@using (Html.BeginForm()) +{ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ @Html.NopLabelFor(model => model.MerchantId): + + @Html.EditorFor(model => model.MerchantId) + @Html.ValidationMessageFor(model => model.MerchantId) +
+ @Html.NopLabelFor(model => model.Fullscreen): + + @Html.EditorFor(model => model.Fullscreen) + @Html.ValidationMessageFor(model => model.Fullscreen) +
+ @Html.NopLabelFor(model => model.Group): + + @Html.EditorFor(model => model.Group) + @Html.ValidationMessageFor(model => model.Group) +
+ @Html.NopLabelFor(model => model.MD5Secret): + + @Html.EditorFor(model => model.MD5Secret) + @Html.ValidationMessageFor(model => model.MD5Secret) +
+ @Html.NopLabelFor(model => model.AuthMail): + + @Html.EditorFor(model => model.AuthMail) + @Html.ValidationMessageFor(model => model.AuthMail) +
+ @Html.NopLabelFor(model => model.Instantcapture): + + @Html.EditorFor(model => model.Instantcapture) + @Html.ValidationMessageFor(model => model.Instantcapture) +
+ @Html.NopLabelFor(model => model.Ownreceipt): + + @Html.EditorFor(model => model.Ownreceipt) + @Html.ValidationMessageFor(model => model.Ownreceipt) +
+ @Html.NopLabelFor(model => model.UseRemoteInterface): + + @Html.EditorFor(model => model.UseRemoteInterface) + @Html.ValidationMessageFor(model => model.UseRemoteInterface) +
+ @Html.NopLabelFor(model => model.RemotePassword): + + @Html.EditorFor(model => model.RemotePassword) + @Html.ValidationMessageFor(model => model.RemotePassword) +
+ +
+ +} \ No newline at end of file diff --git a/Views/PaymentePay/EWindow.cshtml b/Views/PaymentePay/EWindow.cshtml new file mode 100644 index 0000000..4bbadbd --- /dev/null +++ b/Views/PaymentePay/EWindow.cshtml @@ -0,0 +1,33 @@ +@{ + Layout = "~/Views/Shared/_ColumnsThree.cshtml"; +} +@model Nop.Plugin.Payments.EPay.Models.EWindowModel +@using Nop.Web.Framework; + + + + + + + + \ No newline at end of file diff --git a/Views/PaymentePay/PaymentInfo.cshtml b/Views/PaymentePay/PaymentInfo.cshtml new file mode 100644 index 0000000..9b753f9 --- /dev/null +++ b/Views/PaymentePay/PaymentInfo.cshtml @@ -0,0 +1,14 @@ +@{ + Layout = ""; +} +@model Nop.Plugin.Payments.EPay.Models.PaymentInfoModel +@using Nop.Web.Framework; + + + + + +
+ @T("Plugin.Payments.EPay") +
+ diff --git a/Views/Web.config b/Views/Web.config new file mode 100644 index 0000000..a4def2a --- /dev/null +++ b/Views/Web.config @@ -0,0 +1,58 @@ + + + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Web References/dk.ditonlinebetalingssystem.ssl/CardType1.datasource b/Web References/dk.ditonlinebetalingssystem.ssl/CardType1.datasource new file mode 100644 index 0000000..589fc0a --- /dev/null +++ b/Web References/dk.ditonlinebetalingssystem.ssl/CardType1.datasource @@ -0,0 +1,10 @@ + + + + Nop.Plugin.Payments.EPay.dk.ditonlinebetalingssystem.ssl.CardType, Web References.dk.ditonlinebetalingssystem.ssl.Reference.cs, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null + \ No newline at end of file diff --git a/Web References/dk.ditonlinebetalingssystem.ssl/Reference.cs b/Web References/dk.ditonlinebetalingssystem.ssl/Reference.cs new file mode 100644 index 0000000..ef0d281 --- /dev/null +++ b/Web References/dk.ditonlinebetalingssystem.ssl/Reference.cs @@ -0,0 +1,1771 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.17929 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +// +// This source code was auto-generated by Microsoft.VSDesigner, Version 4.0.30319.17929. +// +#pragma warning disable 1591 + +namespace Nop.Plugin.Payments.EPay.dk.ditonlinebetalingssystem.ssl { + using System; + using System.Web.Services; + using System.Diagnostics; + using System.Web.Services.Protocols; + using System.Xml.Serialization; + using System.ComponentModel; + + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.17929")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Web.Services.WebServiceBindingAttribute(Name="PaymentSoap", Namespace="https://ssl.ditonlinebetalingssystem.dk/remote/payment")] + public partial class Payment : System.Web.Services.Protocols.SoapHttpClientProtocol { + + private System.Threading.SendOrPostCallback getPbsErrorOperationCompleted; + + private System.Threading.SendOrPostCallback getEpayErrorOperationCompleted; + + private System.Threading.SendOrPostCallback captureOperationCompleted; + + private System.Threading.SendOrPostCallback move_as_capturedOperationCompleted; + + private System.Threading.SendOrPostCallback deleteOperationCompleted; + + private System.Threading.SendOrPostCallback creditOperationCompleted; + + private System.Threading.SendOrPostCallback getcardtypeOperationCompleted; + + private System.Threading.SendOrPostCallback gettransactionOperationCompleted; + + private System.Threading.SendOrPostCallback gettransactionlistOperationCompleted; + + private System.Threading.SendOrPostCallback getcardinfoOperationCompleted; + + private System.Threading.SendOrPostCallback renewOperationCompleted; + + private System.Threading.SendOrPostCallback movetransactiontogroupOperationCompleted; + + private bool useDefaultCredentialsSetExplicitly; + + /// + public Payment() { + this.Url = global::Nop.Plugin.Payments.EPay.Properties.Settings.Default.Nop_Plugin_Payments_ePay_dk_ditonlinebetalingssystem_ssl_Payment; + if ((this.IsLocalFileSystemWebService(this.Url) == true)) { + this.UseDefaultCredentials = true; + this.useDefaultCredentialsSetExplicitly = false; + } + else { + this.useDefaultCredentialsSetExplicitly = true; + } + } + + public new string Url { + get { + return base.Url; + } + set { + if ((((this.IsLocalFileSystemWebService(base.Url) == true) + && (this.useDefaultCredentialsSetExplicitly == false)) + && (this.IsLocalFileSystemWebService(value) == false))) { + base.UseDefaultCredentials = false; + } + base.Url = value; + } + } + + public new bool UseDefaultCredentials { + get { + return base.UseDefaultCredentials; + } + set { + base.UseDefaultCredentials = value; + this.useDefaultCredentialsSetExplicitly = true; + } + } + + /// + public event getPbsErrorCompletedEventHandler getPbsErrorCompleted; + + /// + public event getEpayErrorCompletedEventHandler getEpayErrorCompleted; + + /// + public event captureCompletedEventHandler captureCompleted; + + /// + public event move_as_capturedCompletedEventHandler move_as_capturedCompleted; + + /// + public event deleteCompletedEventHandler deleteCompleted; + + /// + public event creditCompletedEventHandler creditCompleted; + + /// + public event getcardtypeCompletedEventHandler getcardtypeCompleted; + + /// + public event gettransactionCompletedEventHandler gettransactionCompleted; + + /// + public event gettransactionlistCompletedEventHandler gettransactionlistCompleted; + + /// + public event getcardinfoCompletedEventHandler getcardinfoCompleted; + + /// + public event renewCompletedEventHandler renewCompleted; + + /// + public event movetransactiontogroupCompletedEventHandler movetransactiontogroupCompleted; + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("https://ssl.ditonlinebetalingssystem.dk/remote/payment/getPbsError", RequestNamespace="https://ssl.ditonlinebetalingssystem.dk/remote/payment", ResponseNamespace="https://ssl.ditonlinebetalingssystem.dk/remote/payment", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public bool getPbsError(int merchantnumber, int language, int pbsresponsecode, string pwd, ref string pbsresponsestring, ref int epayresponse) { + object[] results = this.Invoke("getPbsError", new object[] { + merchantnumber, + language, + pbsresponsecode, + pwd, + pbsresponsestring, + epayresponse}); + pbsresponsestring = ((string)(results[1])); + epayresponse = ((int)(results[2])); + return ((bool)(results[0])); + } + + /// + public void getPbsErrorAsync(int merchantnumber, int language, int pbsresponsecode, string pwd, string pbsresponsestring, int epayresponse) { + this.getPbsErrorAsync(merchantnumber, language, pbsresponsecode, pwd, pbsresponsestring, epayresponse, null); + } + + /// + public void getPbsErrorAsync(int merchantnumber, int language, int pbsresponsecode, string pwd, string pbsresponsestring, int epayresponse, object userState) { + if ((this.getPbsErrorOperationCompleted == null)) { + this.getPbsErrorOperationCompleted = new System.Threading.SendOrPostCallback(this.OngetPbsErrorOperationCompleted); + } + this.InvokeAsync("getPbsError", new object[] { + merchantnumber, + language, + pbsresponsecode, + pwd, + pbsresponsestring, + epayresponse}, this.getPbsErrorOperationCompleted, userState); + } + + private void OngetPbsErrorOperationCompleted(object arg) { + if ((this.getPbsErrorCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.getPbsErrorCompleted(this, new getPbsErrorCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("https://ssl.ditonlinebetalingssystem.dk/remote/payment/getEpayError", RequestNamespace="https://ssl.ditonlinebetalingssystem.dk/remote/payment", ResponseNamespace="https://ssl.ditonlinebetalingssystem.dk/remote/payment", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public bool getEpayError(int merchantnumber, int language, int epayresponsecode, string pwd, ref string epayresponsestring, ref int epayresponse) { + object[] results = this.Invoke("getEpayError", new object[] { + merchantnumber, + language, + epayresponsecode, + pwd, + epayresponsestring, + epayresponse}); + epayresponsestring = ((string)(results[1])); + epayresponse = ((int)(results[2])); + return ((bool)(results[0])); + } + + /// + public void getEpayErrorAsync(int merchantnumber, int language, int epayresponsecode, string pwd, string epayresponsestring, int epayresponse) { + this.getEpayErrorAsync(merchantnumber, language, epayresponsecode, pwd, epayresponsestring, epayresponse, null); + } + + /// + public void getEpayErrorAsync(int merchantnumber, int language, int epayresponsecode, string pwd, string epayresponsestring, int epayresponse, object userState) { + if ((this.getEpayErrorOperationCompleted == null)) { + this.getEpayErrorOperationCompleted = new System.Threading.SendOrPostCallback(this.OngetEpayErrorOperationCompleted); + } + this.InvokeAsync("getEpayError", new object[] { + merchantnumber, + language, + epayresponsecode, + pwd, + epayresponsestring, + epayresponse}, this.getEpayErrorOperationCompleted, userState); + } + + private void OngetEpayErrorOperationCompleted(object arg) { + if ((this.getEpayErrorCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.getEpayErrorCompleted(this, new getEpayErrorCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("https://ssl.ditonlinebetalingssystem.dk/remote/payment/capture", RequestNamespace="https://ssl.ditonlinebetalingssystem.dk/remote/payment", ResponseNamespace="https://ssl.ditonlinebetalingssystem.dk/remote/payment", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public bool capture(int merchantnumber, long transactionid, int amount, string group, string pwd, ref int pbsResponse, ref int epayresponse) { + object[] results = this.Invoke("capture", new object[] { + merchantnumber, + transactionid, + amount, + group, + pwd, + pbsResponse, + epayresponse}); + pbsResponse = ((int)(results[1])); + epayresponse = ((int)(results[2])); + return ((bool)(results[0])); + } + + /// + public void captureAsync(int merchantnumber, long transactionid, int amount, string group, string pwd, int pbsResponse, int epayresponse) { + this.captureAsync(merchantnumber, transactionid, amount, group, pwd, pbsResponse, epayresponse, null); + } + + /// + public void captureAsync(int merchantnumber, long transactionid, int amount, string group, string pwd, int pbsResponse, int epayresponse, object userState) { + if ((this.captureOperationCompleted == null)) { + this.captureOperationCompleted = new System.Threading.SendOrPostCallback(this.OncaptureOperationCompleted); + } + this.InvokeAsync("capture", new object[] { + merchantnumber, + transactionid, + amount, + group, + pwd, + pbsResponse, + epayresponse}, this.captureOperationCompleted, userState); + } + + private void OncaptureOperationCompleted(object arg) { + if ((this.captureCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.captureCompleted(this, new captureCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("https://ssl.ditonlinebetalingssystem.dk/remote/payment/move_as_captured", RequestNamespace="https://ssl.ditonlinebetalingssystem.dk/remote/payment", ResponseNamespace="https://ssl.ditonlinebetalingssystem.dk/remote/payment", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public bool move_as_captured(int merchantnumber, long transactionid, string group, string pwd, ref int epayresponse) { + object[] results = this.Invoke("move_as_captured", new object[] { + merchantnumber, + transactionid, + group, + pwd, + epayresponse}); + epayresponse = ((int)(results[1])); + return ((bool)(results[0])); + } + + /// + public void move_as_capturedAsync(int merchantnumber, long transactionid, string group, string pwd, int epayresponse) { + this.move_as_capturedAsync(merchantnumber, transactionid, group, pwd, epayresponse, null); + } + + /// + public void move_as_capturedAsync(int merchantnumber, long transactionid, string group, string pwd, int epayresponse, object userState) { + if ((this.move_as_capturedOperationCompleted == null)) { + this.move_as_capturedOperationCompleted = new System.Threading.SendOrPostCallback(this.Onmove_as_capturedOperationCompleted); + } + this.InvokeAsync("move_as_captured", new object[] { + merchantnumber, + transactionid, + group, + pwd, + epayresponse}, this.move_as_capturedOperationCompleted, userState); + } + + private void Onmove_as_capturedOperationCompleted(object arg) { + if ((this.move_as_capturedCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.move_as_capturedCompleted(this, new move_as_capturedCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("https://ssl.ditonlinebetalingssystem.dk/remote/payment/delete", RequestNamespace="https://ssl.ditonlinebetalingssystem.dk/remote/payment", ResponseNamespace="https://ssl.ditonlinebetalingssystem.dk/remote/payment", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public bool delete(int merchantnumber, long transactionid, string group, string pwd, ref int epayresponse) { + object[] results = this.Invoke("delete", new object[] { + merchantnumber, + transactionid, + group, + pwd, + epayresponse}); + epayresponse = ((int)(results[1])); + return ((bool)(results[0])); + } + + /// + public void deleteAsync(int merchantnumber, long transactionid, string group, string pwd, int epayresponse) { + this.deleteAsync(merchantnumber, transactionid, group, pwd, epayresponse, null); + } + + /// + public void deleteAsync(int merchantnumber, long transactionid, string group, string pwd, int epayresponse, object userState) { + if ((this.deleteOperationCompleted == null)) { + this.deleteOperationCompleted = new System.Threading.SendOrPostCallback(this.OndeleteOperationCompleted); + } + this.InvokeAsync("delete", new object[] { + merchantnumber, + transactionid, + group, + pwd, + epayresponse}, this.deleteOperationCompleted, userState); + } + + private void OndeleteOperationCompleted(object arg) { + if ((this.deleteCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.deleteCompleted(this, new deleteCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("https://ssl.ditonlinebetalingssystem.dk/remote/payment/credit", RequestNamespace="https://ssl.ditonlinebetalingssystem.dk/remote/payment", ResponseNamespace="https://ssl.ditonlinebetalingssystem.dk/remote/payment", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public bool credit(int merchantnumber, long transactionid, int amount, string group, string pwd, ref int pbsresponse, ref int epayresponse) { + object[] results = this.Invoke("credit", new object[] { + merchantnumber, + transactionid, + amount, + group, + pwd, + pbsresponse, + epayresponse}); + pbsresponse = ((int)(results[1])); + epayresponse = ((int)(results[2])); + return ((bool)(results[0])); + } + + /// + public void creditAsync(int merchantnumber, long transactionid, int amount, string group, string pwd, int pbsresponse, int epayresponse) { + this.creditAsync(merchantnumber, transactionid, amount, group, pwd, pbsresponse, epayresponse, null); + } + + /// + public void creditAsync(int merchantnumber, long transactionid, int amount, string group, string pwd, int pbsresponse, int epayresponse, object userState) { + if ((this.creditOperationCompleted == null)) { + this.creditOperationCompleted = new System.Threading.SendOrPostCallback(this.OncreditOperationCompleted); + } + this.InvokeAsync("credit", new object[] { + merchantnumber, + transactionid, + amount, + group, + pwd, + pbsresponse, + epayresponse}, this.creditOperationCompleted, userState); + } + + private void OncreditOperationCompleted(object arg) { + if ((this.creditCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.creditCompleted(this, new creditCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("https://ssl.ditonlinebetalingssystem.dk/remote/payment/getcardtype", RequestNamespace="https://ssl.ditonlinebetalingssystem.dk/remote/payment", ResponseNamespace="https://ssl.ditonlinebetalingssystem.dk/remote/payment", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public bool getcardtype(int merchantnumber, string cardnumber, ref int cardtypeid, ref string cardname, ref int epayresponse) { + object[] results = this.Invoke("getcardtype", new object[] { + merchantnumber, + cardnumber, + cardtypeid, + cardname, + epayresponse}); + cardtypeid = ((int)(results[1])); + cardname = ((string)(results[2])); + epayresponse = ((int)(results[3])); + return ((bool)(results[0])); + } + + /// + public void getcardtypeAsync(int merchantnumber, string cardnumber, int cardtypeid, string cardname, int epayresponse) { + this.getcardtypeAsync(merchantnumber, cardnumber, cardtypeid, cardname, epayresponse, null); + } + + /// + public void getcardtypeAsync(int merchantnumber, string cardnumber, int cardtypeid, string cardname, int epayresponse, object userState) { + if ((this.getcardtypeOperationCompleted == null)) { + this.getcardtypeOperationCompleted = new System.Threading.SendOrPostCallback(this.OngetcardtypeOperationCompleted); + } + this.InvokeAsync("getcardtype", new object[] { + merchantnumber, + cardnumber, + cardtypeid, + cardname, + epayresponse}, this.getcardtypeOperationCompleted, userState); + } + + private void OngetcardtypeOperationCompleted(object arg) { + if ((this.getcardtypeCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.getcardtypeCompleted(this, new getcardtypeCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("https://ssl.ditonlinebetalingssystem.dk/remote/payment/gettransaction", RequestNamespace="https://ssl.ditonlinebetalingssystem.dk/remote/payment", ResponseNamespace="https://ssl.ditonlinebetalingssystem.dk/remote/payment", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public bool gettransaction(int merchantnumber, long transactionid, string pwd, ref TransactionInformationType transactionInformation, ref int epayresponse) { + object[] results = this.Invoke("gettransaction", new object[] { + merchantnumber, + transactionid, + pwd, + transactionInformation, + epayresponse}); + transactionInformation = ((TransactionInformationType)(results[1])); + epayresponse = ((int)(results[2])); + return ((bool)(results[0])); + } + + /// + public void gettransactionAsync(int merchantnumber, long transactionid, string pwd, TransactionInformationType transactionInformation, int epayresponse) { + this.gettransactionAsync(merchantnumber, transactionid, pwd, transactionInformation, epayresponse, null); + } + + /// + public void gettransactionAsync(int merchantnumber, long transactionid, string pwd, TransactionInformationType transactionInformation, int epayresponse, object userState) { + if ((this.gettransactionOperationCompleted == null)) { + this.gettransactionOperationCompleted = new System.Threading.SendOrPostCallback(this.OngettransactionOperationCompleted); + } + this.InvokeAsync("gettransaction", new object[] { + merchantnumber, + transactionid, + pwd, + transactionInformation, + epayresponse}, this.gettransactionOperationCompleted, userState); + } + + private void OngettransactionOperationCompleted(object arg) { + if ((this.gettransactionCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.gettransactionCompleted(this, new gettransactionCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("https://ssl.ditonlinebetalingssystem.dk/remote/payment/gettransactionlist", RequestNamespace="https://ssl.ditonlinebetalingssystem.dk/remote/payment", ResponseNamespace="https://ssl.ditonlinebetalingssystem.dk/remote/payment", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public bool gettransactionlist(int merchantnumber, TransactionStatus status, System.DateTime searchdatestart, System.DateTime searchdateend, string searchorderid, string searchgroup, string pwd, ref TransactionInformationType[] transactionInformationAry, ref int epayresponse) { + object[] results = this.Invoke("gettransactionlist", new object[] { + merchantnumber, + status, + searchdatestart, + searchdateend, + searchorderid, + searchgroup, + pwd, + transactionInformationAry, + epayresponse}); + transactionInformationAry = ((TransactionInformationType[])(results[1])); + epayresponse = ((int)(results[2])); + return ((bool)(results[0])); + } + + /// + public void gettransactionlistAsync(int merchantnumber, TransactionStatus status, System.DateTime searchdatestart, System.DateTime searchdateend, string searchorderid, string searchgroup, string pwd, TransactionInformationType[] transactionInformationAry, int epayresponse) { + this.gettransactionlistAsync(merchantnumber, status, searchdatestart, searchdateend, searchorderid, searchgroup, pwd, transactionInformationAry, epayresponse, null); + } + + /// + public void gettransactionlistAsync(int merchantnumber, TransactionStatus status, System.DateTime searchdatestart, System.DateTime searchdateend, string searchorderid, string searchgroup, string pwd, TransactionInformationType[] transactionInformationAry, int epayresponse, object userState) { + if ((this.gettransactionlistOperationCompleted == null)) { + this.gettransactionlistOperationCompleted = new System.Threading.SendOrPostCallback(this.OngettransactionlistOperationCompleted); + } + this.InvokeAsync("gettransactionlist", new object[] { + merchantnumber, + status, + searchdatestart, + searchdateend, + searchorderid, + searchgroup, + pwd, + transactionInformationAry, + epayresponse}, this.gettransactionlistOperationCompleted, userState); + } + + private void OngettransactionlistOperationCompleted(object arg) { + if ((this.gettransactionlistCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.gettransactionlistCompleted(this, new gettransactionlistCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("https://ssl.ditonlinebetalingssystem.dk/remote/payment/getcardinfo", RequestNamespace="https://ssl.ditonlinebetalingssystem.dk/remote/payment", ResponseNamespace="https://ssl.ditonlinebetalingssystem.dk/remote/payment", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public bool getcardinfo(int merchantnumber, string cardno_prefix, int amount, int currency, ref int acquirer, ref int fee, ref CardType cardtype, ref string cardtypetext, ref int epayresponse) { + object[] results = this.Invoke("getcardinfo", new object[] { + merchantnumber, + cardno_prefix, + amount, + currency, + acquirer, + fee, + cardtype, + cardtypetext, + epayresponse}); + acquirer = ((int)(results[1])); + fee = ((int)(results[2])); + cardtype = ((CardType)(results[3])); + cardtypetext = ((string)(results[4])); + epayresponse = ((int)(results[5])); + return ((bool)(results[0])); + } + + /// + public void getcardinfoAsync(int merchantnumber, string cardno_prefix, int amount, int currency, int acquirer, int fee, CardType cardtype, string cardtypetext, int epayresponse) { + this.getcardinfoAsync(merchantnumber, cardno_prefix, amount, currency, acquirer, fee, cardtype, cardtypetext, epayresponse, null); + } + + /// + public void getcardinfoAsync(int merchantnumber, string cardno_prefix, int amount, int currency, int acquirer, int fee, CardType cardtype, string cardtypetext, int epayresponse, object userState) { + if ((this.getcardinfoOperationCompleted == null)) { + this.getcardinfoOperationCompleted = new System.Threading.SendOrPostCallback(this.OngetcardinfoOperationCompleted); + } + this.InvokeAsync("getcardinfo", new object[] { + merchantnumber, + cardno_prefix, + amount, + currency, + acquirer, + fee, + cardtype, + cardtypetext, + epayresponse}, this.getcardinfoOperationCompleted, userState); + } + + private void OngetcardinfoOperationCompleted(object arg) { + if ((this.getcardinfoCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.getcardinfoCompleted(this, new getcardinfoCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("https://ssl.ditonlinebetalingssystem.dk/remote/payment/renew", RequestNamespace="https://ssl.ditonlinebetalingssystem.dk/remote/payment", ResponseNamespace="https://ssl.ditonlinebetalingssystem.dk/remote/payment", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public bool renew(int merchantnumber, long transactionid, string group, string pwd, ref int pbsResponse, ref int epayresponse) { + object[] results = this.Invoke("renew", new object[] { + merchantnumber, + transactionid, + group, + pwd, + pbsResponse, + epayresponse}); + pbsResponse = ((int)(results[1])); + epayresponse = ((int)(results[2])); + return ((bool)(results[0])); + } + + /// + public void renewAsync(int merchantnumber, long transactionid, string group, string pwd, int pbsResponse, int epayresponse) { + this.renewAsync(merchantnumber, transactionid, group, pwd, pbsResponse, epayresponse, null); + } + + /// + public void renewAsync(int merchantnumber, long transactionid, string group, string pwd, int pbsResponse, int epayresponse, object userState) { + if ((this.renewOperationCompleted == null)) { + this.renewOperationCompleted = new System.Threading.SendOrPostCallback(this.OnrenewOperationCompleted); + } + this.InvokeAsync("renew", new object[] { + merchantnumber, + transactionid, + group, + pwd, + pbsResponse, + epayresponse}, this.renewOperationCompleted, userState); + } + + private void OnrenewOperationCompleted(object arg) { + if ((this.renewCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.renewCompleted(this, new renewCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + [System.Web.Services.Protocols.SoapDocumentMethodAttribute("https://ssl.ditonlinebetalingssystem.dk/remote/payment/movetransactiontogroup", RequestNamespace="https://ssl.ditonlinebetalingssystem.dk/remote/payment", ResponseNamespace="https://ssl.ditonlinebetalingssystem.dk/remote/payment", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)] + public bool movetransactiontogroup(int merchantnumber, long transactionid, string group, string pwd, ref int epayresponse) { + object[] results = this.Invoke("movetransactiontogroup", new object[] { + merchantnumber, + transactionid, + group, + pwd, + epayresponse}); + epayresponse = ((int)(results[1])); + return ((bool)(results[0])); + } + + /// + public void movetransactiontogroupAsync(int merchantnumber, long transactionid, string group, string pwd, int epayresponse) { + this.movetransactiontogroupAsync(merchantnumber, transactionid, group, pwd, epayresponse, null); + } + + /// + public void movetransactiontogroupAsync(int merchantnumber, long transactionid, string group, string pwd, int epayresponse, object userState) { + if ((this.movetransactiontogroupOperationCompleted == null)) { + this.movetransactiontogroupOperationCompleted = new System.Threading.SendOrPostCallback(this.OnmovetransactiontogroupOperationCompleted); + } + this.InvokeAsync("movetransactiontogroup", new object[] { + merchantnumber, + transactionid, + group, + pwd, + epayresponse}, this.movetransactiontogroupOperationCompleted, userState); + } + + private void OnmovetransactiontogroupOperationCompleted(object arg) { + if ((this.movetransactiontogroupCompleted != null)) { + System.Web.Services.Protocols.InvokeCompletedEventArgs invokeArgs = ((System.Web.Services.Protocols.InvokeCompletedEventArgs)(arg)); + this.movetransactiontogroupCompleted(this, new movetransactiontogroupCompletedEventArgs(invokeArgs.Results, invokeArgs.Error, invokeArgs.Cancelled, invokeArgs.UserState)); + } + } + + /// + public new void CancelAsync(object userState) { + base.CancelAsync(userState); + } + + private bool IsLocalFileSystemWebService(string url) { + if (((url == null) + || (url == string.Empty))) { + return false; + } + System.Uri wsUri = new System.Uri(url); + if (((wsUri.Port >= 1024) + && (string.Compare(wsUri.Host, "localHost", System.StringComparison.OrdinalIgnoreCase) == 0))) { + return true; + } + return false; + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.17929")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace="https://ssl.ditonlinebetalingssystem.dk/remote/payment")] + public partial class TransactionInformationType { + + private string groupField; + + private int authamountField; + + private int currencyField; + + private int cardtypeidField; + + private int capturedamountField; + + private int creditedamountField; + + private string orderidField; + + private string descriptionField; + + private System.DateTime authdateField; + + private System.DateTime captureddateField; + + private System.DateTime deleteddateField; + + private System.DateTime crediteddateField; + + private TransactionStatus statusField; + + private TransactionHistoryInfo[] historyField; + + private long transactionidField; + + private string cardholderField; + + private PayMode modeField; + + private bool mscField; + + private int fraudStatusField; + + private string fraudMessageField; + + private string payerCountryCodeField; + + private string issuedCountryCodeField; + + private int feeField; + + private bool splitpaymentField; + + private AcquirerType acquirerField; + + private string tcardnoField; + + private int expmonthField; + + private int expyearField; + + /// + public string group { + get { + return this.groupField; + } + set { + this.groupField = value; + } + } + + /// + public int authamount { + get { + return this.authamountField; + } + set { + this.authamountField = value; + } + } + + /// + public int currency { + get { + return this.currencyField; + } + set { + this.currencyField = value; + } + } + + /// + public int cardtypeid { + get { + return this.cardtypeidField; + } + set { + this.cardtypeidField = value; + } + } + + /// + public int capturedamount { + get { + return this.capturedamountField; + } + set { + this.capturedamountField = value; + } + } + + /// + public int creditedamount { + get { + return this.creditedamountField; + } + set { + this.creditedamountField = value; + } + } + + /// + public string orderid { + get { + return this.orderidField; + } + set { + this.orderidField = value; + } + } + + /// + public string description { + get { + return this.descriptionField; + } + set { + this.descriptionField = value; + } + } + + /// + public System.DateTime authdate { + get { + return this.authdateField; + } + set { + this.authdateField = value; + } + } + + /// + public System.DateTime captureddate { + get { + return this.captureddateField; + } + set { + this.captureddateField = value; + } + } + + /// + public System.DateTime deleteddate { + get { + return this.deleteddateField; + } + set { + this.deleteddateField = value; + } + } + + /// + public System.DateTime crediteddate { + get { + return this.crediteddateField; + } + set { + this.crediteddateField = value; + } + } + + /// + public TransactionStatus status { + get { + return this.statusField; + } + set { + this.statusField = value; + } + } + + /// + public TransactionHistoryInfo[] history { + get { + return this.historyField; + } + set { + this.historyField = value; + } + } + + /// + public long transactionid { + get { + return this.transactionidField; + } + set { + this.transactionidField = value; + } + } + + /// + public string cardholder { + get { + return this.cardholderField; + } + set { + this.cardholderField = value; + } + } + + /// + public PayMode mode { + get { + return this.modeField; + } + set { + this.modeField = value; + } + } + + /// + public bool msc { + get { + return this.mscField; + } + set { + this.mscField = value; + } + } + + /// + public int fraudStatus { + get { + return this.fraudStatusField; + } + set { + this.fraudStatusField = value; + } + } + + /// + public string FraudMessage { + get { + return this.fraudMessageField; + } + set { + this.fraudMessageField = value; + } + } + + /// + public string payerCountryCode { + get { + return this.payerCountryCodeField; + } + set { + this.payerCountryCodeField = value; + } + } + + /// + public string issuedCountryCode { + get { + return this.issuedCountryCodeField; + } + set { + this.issuedCountryCodeField = value; + } + } + + /// + public int fee { + get { + return this.feeField; + } + set { + this.feeField = value; + } + } + + /// + public bool splitpayment { + get { + return this.splitpaymentField; + } + set { + this.splitpaymentField = value; + } + } + + /// + public AcquirerType acquirer { + get { + return this.acquirerField; + } + set { + this.acquirerField = value; + } + } + + /// + public string tcardno { + get { + return this.tcardnoField; + } + set { + this.tcardnoField = value; + } + } + + /// + public int expmonth { + get { + return this.expmonthField; + } + set { + this.expmonthField = value; + } + } + + /// + public int expyear { + get { + return this.expyearField; + } + set { + this.expyearField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.17929")] + [System.SerializableAttribute()] + [System.Xml.Serialization.XmlTypeAttribute(Namespace="https://ssl.ditonlinebetalingssystem.dk/remote/payment")] + public enum TransactionStatus { + + /// + PAYMENT_UNDEFINED, + + /// + PAYMENT_NEW, + + /// + PAYMENT_CAPTURED, + + /// + PAYMENT_DELETED, + + /// + PAYMENT_INSTANT_CAPTURE_FAILED, + + /// + PAYMENT_SUBSCRIPTION_INI, + + /// + PAYMENT_RENEW, + + /// + PAYMENT_EUROLINE_WAIT_CAPTURE, + + /// + PAYMENT_EUROLINE_WAIT_CREDIT, + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.17929")] + [System.SerializableAttribute()] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + [System.Xml.Serialization.XmlTypeAttribute(Namespace="https://ssl.ditonlinebetalingssystem.dk/remote/payment")] + public partial class TransactionHistoryInfo { + + private long transactionHistoryIDField; + + private int logonIDField; + + private string usernameField; + + private string eventMsgField; + + private System.DateTime createdField; + + /// + public long transactionHistoryID { + get { + return this.transactionHistoryIDField; + } + set { + this.transactionHistoryIDField = value; + } + } + + /// + public int logonID { + get { + return this.logonIDField; + } + set { + this.logonIDField = value; + } + } + + /// + public string username { + get { + return this.usernameField; + } + set { + this.usernameField = value; + } + } + + /// + public string eventMsg { + get { + return this.eventMsgField; + } + set { + this.eventMsgField = value; + } + } + + /// + public System.DateTime created { + get { + return this.createdField; + } + set { + this.createdField = value; + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.17929")] + [System.SerializableAttribute()] + [System.Xml.Serialization.XmlTypeAttribute(Namespace="https://ssl.ditonlinebetalingssystem.dk/remote/payment")] + public enum PayMode { + + /// + MODE_PRODUCTION, + + /// + MODE_TEST, + + /// + MODE_EPAY, + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.17929")] + [System.SerializableAttribute()] + [System.Xml.Serialization.XmlTypeAttribute(Namespace="https://ssl.ditonlinebetalingssystem.dk/remote/payment")] + public enum AcquirerType { + + /// + UNKNOWN, + + /// + PBS, + + /// + EUROLINE, + + /// + DANSKE_BANK, + + /// + NORDEA, + + /// + EWIRE, + + /// + SWEDBANK, + + /// + PAYPAL, + + /// + BABS_SWEDBANK, + + /// + MOBILPENGE, + + /// + KLARNA, + + /// + SVEA, + + /// + HANDELSBANKEN, + + /// + EPAY, + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.17929")] + [System.SerializableAttribute()] + [System.Xml.Serialization.XmlTypeAttribute(Namespace="https://ssl.ditonlinebetalingssystem.dk/remote/payment")] + public enum CardType { + + /// + ALL, + + /// + DANKORT, + + /// + VISA_DANKORT, + + /// + VISA_ELECTRON_FOREIGN, + + /// + MASTERCARD, + + /// + MASTERCARD_FOREIGN, + + /// + VISA_ELECTRON, + + /// + JCB, + + /// + DINERS, + + /// + MAESTRO, + + /// + AMERICAN_EXPRESS, + + /// + UNKNOWN, + + /// + EDK, + + /// + DINERS_FOREIGN, + + /// + AMERICAN_EXPRESS_FOREIGN, + + /// + MAESTRO_FOREIGN, + + /// + FORBRUGSFORENINGEN, + + /// + EWIRE, + + /// + VISA, + + /// + IKANO, + + /// + OTHERS, + + /// + NORDEA_SOLO, + + /// + DANSKE_BANK, + + /// + BG_BANK, + + /// + LIC_MASTERCARD, + + /// + LIC_MASTERCARD_FOREIGN, + + /// + PAYPAL, + + /// + MOBILPENGE, + + /// + KLARNA, + + /// + SVEA, + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.17929")] + public delegate void getPbsErrorCompletedEventHandler(object sender, getPbsErrorCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.17929")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class getPbsErrorCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal getPbsErrorCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { + this.results = results; + } + + /// + public bool Result { + get { + this.RaiseExceptionIfNecessary(); + return ((bool)(this.results[0])); + } + } + + /// + public string pbsresponsestring { + get { + this.RaiseExceptionIfNecessary(); + return ((string)(this.results[1])); + } + } + + /// + public int epayresponse { + get { + this.RaiseExceptionIfNecessary(); + return ((int)(this.results[2])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.17929")] + public delegate void getEpayErrorCompletedEventHandler(object sender, getEpayErrorCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.17929")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class getEpayErrorCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal getEpayErrorCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { + this.results = results; + } + + /// + public bool Result { + get { + this.RaiseExceptionIfNecessary(); + return ((bool)(this.results[0])); + } + } + + /// + public string epayresponsestring { + get { + this.RaiseExceptionIfNecessary(); + return ((string)(this.results[1])); + } + } + + /// + public int epayresponse { + get { + this.RaiseExceptionIfNecessary(); + return ((int)(this.results[2])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.17929")] + public delegate void captureCompletedEventHandler(object sender, captureCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.17929")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class captureCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal captureCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { + this.results = results; + } + + /// + public bool Result { + get { + this.RaiseExceptionIfNecessary(); + return ((bool)(this.results[0])); + } + } + + /// + public int pbsResponse { + get { + this.RaiseExceptionIfNecessary(); + return ((int)(this.results[1])); + } + } + + /// + public int epayresponse { + get { + this.RaiseExceptionIfNecessary(); + return ((int)(this.results[2])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.17929")] + public delegate void move_as_capturedCompletedEventHandler(object sender, move_as_capturedCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.17929")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class move_as_capturedCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal move_as_capturedCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { + this.results = results; + } + + /// + public bool Result { + get { + this.RaiseExceptionIfNecessary(); + return ((bool)(this.results[0])); + } + } + + /// + public int epayresponse { + get { + this.RaiseExceptionIfNecessary(); + return ((int)(this.results[1])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.17929")] + public delegate void deleteCompletedEventHandler(object sender, deleteCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.17929")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class deleteCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal deleteCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { + this.results = results; + } + + /// + public bool Result { + get { + this.RaiseExceptionIfNecessary(); + return ((bool)(this.results[0])); + } + } + + /// + public int epayresponse { + get { + this.RaiseExceptionIfNecessary(); + return ((int)(this.results[1])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.17929")] + public delegate void creditCompletedEventHandler(object sender, creditCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.17929")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class creditCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal creditCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { + this.results = results; + } + + /// + public bool Result { + get { + this.RaiseExceptionIfNecessary(); + return ((bool)(this.results[0])); + } + } + + /// + public int pbsresponse { + get { + this.RaiseExceptionIfNecessary(); + return ((int)(this.results[1])); + } + } + + /// + public int epayresponse { + get { + this.RaiseExceptionIfNecessary(); + return ((int)(this.results[2])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.17929")] + public delegate void getcardtypeCompletedEventHandler(object sender, getcardtypeCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.17929")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class getcardtypeCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal getcardtypeCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { + this.results = results; + } + + /// + public bool Result { + get { + this.RaiseExceptionIfNecessary(); + return ((bool)(this.results[0])); + } + } + + /// + public int cardtypeid { + get { + this.RaiseExceptionIfNecessary(); + return ((int)(this.results[1])); + } + } + + /// + public string cardname { + get { + this.RaiseExceptionIfNecessary(); + return ((string)(this.results[2])); + } + } + + /// + public int epayresponse { + get { + this.RaiseExceptionIfNecessary(); + return ((int)(this.results[3])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.17929")] + public delegate void gettransactionCompletedEventHandler(object sender, gettransactionCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.17929")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class gettransactionCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal gettransactionCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { + this.results = results; + } + + /// + public bool Result { + get { + this.RaiseExceptionIfNecessary(); + return ((bool)(this.results[0])); + } + } + + /// + public TransactionInformationType transactionInformation { + get { + this.RaiseExceptionIfNecessary(); + return ((TransactionInformationType)(this.results[1])); + } + } + + /// + public int epayresponse { + get { + this.RaiseExceptionIfNecessary(); + return ((int)(this.results[2])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.17929")] + public delegate void gettransactionlistCompletedEventHandler(object sender, gettransactionlistCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.17929")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class gettransactionlistCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal gettransactionlistCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { + this.results = results; + } + + /// + public bool Result { + get { + this.RaiseExceptionIfNecessary(); + return ((bool)(this.results[0])); + } + } + + /// + public TransactionInformationType[] transactionInformationAry { + get { + this.RaiseExceptionIfNecessary(); + return ((TransactionInformationType[])(this.results[1])); + } + } + + /// + public int epayresponse { + get { + this.RaiseExceptionIfNecessary(); + return ((int)(this.results[2])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.17929")] + public delegate void getcardinfoCompletedEventHandler(object sender, getcardinfoCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.17929")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class getcardinfoCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal getcardinfoCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { + this.results = results; + } + + /// + public bool Result { + get { + this.RaiseExceptionIfNecessary(); + return ((bool)(this.results[0])); + } + } + + /// + public int acquirer { + get { + this.RaiseExceptionIfNecessary(); + return ((int)(this.results[1])); + } + } + + /// + public int fee { + get { + this.RaiseExceptionIfNecessary(); + return ((int)(this.results[2])); + } + } + + /// + public CardType cardtype { + get { + this.RaiseExceptionIfNecessary(); + return ((CardType)(this.results[3])); + } + } + + /// + public string cardtypetext { + get { + this.RaiseExceptionIfNecessary(); + return ((string)(this.results[4])); + } + } + + /// + public int epayresponse { + get { + this.RaiseExceptionIfNecessary(); + return ((int)(this.results[5])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.17929")] + public delegate void renewCompletedEventHandler(object sender, renewCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.17929")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class renewCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal renewCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { + this.results = results; + } + + /// + public bool Result { + get { + this.RaiseExceptionIfNecessary(); + return ((bool)(this.results[0])); + } + } + + /// + public int pbsResponse { + get { + this.RaiseExceptionIfNecessary(); + return ((int)(this.results[1])); + } + } + + /// + public int epayresponse { + get { + this.RaiseExceptionIfNecessary(); + return ((int)(this.results[2])); + } + } + } + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.17929")] + public delegate void movetransactiontogroupCompletedEventHandler(object sender, movetransactiontogroupCompletedEventArgs e); + + /// + [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "4.0.30319.17929")] + [System.Diagnostics.DebuggerStepThroughAttribute()] + [System.ComponentModel.DesignerCategoryAttribute("code")] + public partial class movetransactiontogroupCompletedEventArgs : System.ComponentModel.AsyncCompletedEventArgs { + + private object[] results; + + internal movetransactiontogroupCompletedEventArgs(object[] results, System.Exception exception, bool cancelled, object userState) : + base(exception, cancelled, userState) { + this.results = results; + } + + /// + public bool Result { + get { + this.RaiseExceptionIfNecessary(); + return ((bool)(this.results[0])); + } + } + + /// + public int epayresponse { + get { + this.RaiseExceptionIfNecessary(); + return ((int)(this.results[1])); + } + } + } +} + +#pragma warning restore 1591 \ No newline at end of file diff --git a/Web References/dk.ditonlinebetalingssystem.ssl/Reference.map b/Web References/dk.ditonlinebetalingssystem.ssl/Reference.map new file mode 100644 index 0000000..3b30764 --- /dev/null +++ b/Web References/dk.ditonlinebetalingssystem.ssl/Reference.map @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/Web References/dk.ditonlinebetalingssystem.ssl/TransactionInformationType1.datasource b/Web References/dk.ditonlinebetalingssystem.ssl/TransactionInformationType1.datasource new file mode 100644 index 0000000..074b3f0 --- /dev/null +++ b/Web References/dk.ditonlinebetalingssystem.ssl/TransactionInformationType1.datasource @@ -0,0 +1,10 @@ + + + + Nop.Plugin.Payments.EPay.dk.ditonlinebetalingssystem.ssl.TransactionInformationType, Web References.dk.ditonlinebetalingssystem.ssl.Reference.cs, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null + \ No newline at end of file diff --git a/Web References/dk.ditonlinebetalingssystem.ssl/payment.disco b/Web References/dk.ditonlinebetalingssystem.ssl/payment.disco new file mode 100644 index 0000000..ae284dc --- /dev/null +++ b/Web References/dk.ditonlinebetalingssystem.ssl/payment.disco @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/Web References/dk.ditonlinebetalingssystem.ssl/payment.wsdl b/Web References/dk.ditonlinebetalingssystem.ssl/payment.wsdl new file mode 100644 index 0000000..4aee385 --- /dev/null +++ b/Web References/dk.ditonlinebetalingssystem.ssl/payment.wsdl @@ -0,0 +1,749 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Converts an error from PBS to a string description. If the returning value is false check for error codes in the pbsresponse and epayresponse reference attributes for information about errors from ePay or PBS. + + + + + Converts an errorcode from ePay to a string. If the returning value is false check for error codes in the pbsresponse and epayresponse reference attributes for information about errors from ePay or PBS. + + + + + To capture a payment. If the returning value is false check for error codes in the pbsresponse and epayresponse reference attributes for information about errors from ePay or PBS. + + + + + + + + + To delete a payment. If the returning value is false check for error codes in the epayresponse reference attribute for information about errors from ePay or PBS. + + + + + To credit a payment. If the returning value is false check for error codes in the pbsresponse and epayresponse reference attributes for information about errors from ePay or PBS. + + + + + To calculate a card type. If the returning value is false check for error code in the epayresponse reference attribute for information about errors from ePay. The cardtype returned are defined when logged on to the www.epay.dk website. + + + + + Returns information about a transaction by its transactionid. If the returning value is false check for error code in the epayresponse reference attribute for information about errors from ePay. + + + + + Returns a list of TransactionInformationType objects with information of transactions. If the returning value is false check for error code in the epayresponse reference attribute for information about errors from ePay. + + + + + Returns a list of TransactionInformationType objects with information of transactions. If the returning value is false check for error code in the epayresponse reference attribute for information about errors from ePay. + + + + + To renew an EWIRE payment. If the returning value is false check for error codes in the pbsresponse (EWIRE result) and epayresponse reference attributes for information about errors from ePay or EWIRE. + + + + + Use this function to move a transaction to a specific group. If the function returns true then the transaction was successfully moved to the group. If the function returns false then look at the parameter 'epayresponse' in order to determine why the transaction could not be moved to the Group. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Web.Debug.config b/Web.Debug.config new file mode 100644 index 0000000..2c6dd51 --- /dev/null +++ b/Web.Debug.config @@ -0,0 +1,30 @@ + + + + + + + + + + \ No newline at end of file diff --git a/Web.Release.config b/Web.Release.config new file mode 100644 index 0000000..4122d79 --- /dev/null +++ b/Web.Release.config @@ -0,0 +1,31 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/Web.config b/Web.config new file mode 100644 index 0000000..97c83ba --- /dev/null +++ b/Web.config @@ -0,0 +1,45 @@ + + + + + +
+
+ + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + https://ssl.ditonlinebetalingssystem.dk/remote/payment.asmx + + + + diff --git a/app.config b/app.config new file mode 100644 index 0000000..daa3390 --- /dev/null +++ b/app.config @@ -0,0 +1,35 @@ + + + + +
+ + + + + + https://ssl.ditonlinebetalingssystem.dk/remote/payment.asmx + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/packages.config b/packages.config new file mode 100644 index 0000000..7b5abbe --- /dev/null +++ b/packages.config @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + \ No newline at end of file