public ActionResult SendToPaymentProvider(
            PaymentProviderConfiguration configuration,
            GeneralisedPaymentTransfer transferObject,
            Action <PaymentProviderConfiguration, GeneralisedPaymentTransfer, string> saveProviderReference)
        {
            var civicaXfer = new CivicaPaymentTransfer()
            {
                ProviderUrl          = Shared.Civica.Default.CivicaPostUrl,
                ReturnUrl            = transferObject.ReturnUrl,
                CallingApplicationId = Shared.Civica.Default.CivicaAppId,
                CallingApplicationTransactionReference = transferObject.TransactionId,
                GeneralLedgerCode = $"{transferObject.GeneralLedgerCode}-{transferObject.ProductId}",
                //PaymentSourceCode = transferObject.PaymentSourceCode,
                PaymentSourceCode = transferObject.IsMediated ? "02" : "01",
                PaymentTotal      = transferObject.Amount,
                PaymentLines      = new List <string>()
            };

            foreach (var item in transferObject.LineItems)
            {
                civicaXfer.PaymentLines.Add(FormatPaymentLine(item));
            }
            var resultView = PaymentFrameworkUtility.CreateView("~/Views/Payment/SendToCivica.cshtml", civicaXfer);

            var sendToPaymentLogMessage = PaymentFrameworkUtility.DescribeActionResultForLogging(resultView, true);

            this.Logger.CreateEntry(typeof(CivicaPaymentProvider), LogLevel.Info, sendToPaymentLogMessage);
            return(resultView);
        }
Beispiel #2
0
 // GET: Payment
 public ActionResult SendToCivica(CivicaPaymentTransfer model)
 {
     return(View(model));
 }