Method PostPaymentCSCase

Summary

Make a payment for Courts (CS) by Case Number

Remarks

Makes a court (CS) payment using the case number

You need to enter:

For an additional fee, such as a convenience fee, you need to ALSO enter:

Input Parameters

NameTypeLengthDescription
ApplCode System.String 2 Application Code. The 2 letter code indicating the application. Defaults to CS.
ForeignKey System.String 15 [Required] 3rd Party Transaction ID. Must be unique for each call to this method.
OrigCode numeric 2 Origination code used to map to batch payments. Defaults to 11 for 3rd Party payments.
Modifier System.String 1 Modifier code used to map to batch payments. Defaults to blank for 3rd Party payments.
PaymentAmount System.String 14 [Required] The Dollar amount of the fee being paid.
PaymentDesc System.String 25 The payment description
CaseNumber System.String 30 [Required] The Case Number the payment is for.
MRNUM numeric 9 9 digit, MR Master ID. This is the MRNUM from GetCaseByCaseNum. Can also be sent with CustomerID as the field name. Not required for payment plans.
MRCSID numeric 9 9 digit, MR Cust ID. This is the MRCSID from GetCaseByCaseNum. Can also be sent with LocationID as the field name. Not required for payment plans.
AddtlFeeCode System.String 5 [Optional] Additional Fee Code. The 2 letter code indicating the type of fee. This is for an additional fee being charged such as a convenience fee.
AddtlFeeAmount System.String 14 The Dollar amount of the additional fee. Only used if AddtlFeeCode is entered.
TotalPaidAmount System.String 14 The total Dollar amount being paid. This includes any additional fees. If no additional fees, this will use the value of PaymentAmount.
PaymentComment System.String 25 A comment to include with the payment
LinkedForeignKey System.String 15 Optional linked Foreign Key used by 3rd party to identify payment
SpecialNote System.String 30 Optional Control field reserved for SPS applications for special processing. A ‘Y’ specified in column 1 indicates a Building Permits Application “approval” and payment ready to process. A ‘Y’ specified in column 2 indicates the overrideTenderMethod code should be applied when transaction is created in NaviLine Cash Receipts. Should not be reported by 3rd party processors
TenderProcessFlag System.String 1 Optional. Control field reserved for SPS applications for special processing . Should not be reported by 3rd party processors.
OverrideTenderMethod System.String 2 Optional. When specialNote field has a ‘Y’ specified in the 2nd position, used to override the default Tender Method Code defined in the NaviLine Application Interface batch creation defaults table. Used to show the different tender methods used for payment.
AuthCode System.String 6 Authorization code
CardType System.String 10 Credit card vendor
CardNumber System.String 25 Last 4 digits of the credit card
PaymentDate System.String 8 Date payment was made. Format: yyyyMMdd. Defaults to current date.
PaymentTime hhmmss 0 Time payment was made. Format: HHmmss. Defaults to current time.
Comment1 System.String 30 Additional comment 1
Comment2 System.String 30 Additional comment 2
Comment3 System.String 30 Additional comment 3
Comment4 System.String 30 Additional comment 4

Example

POST http://localhost/FusionServices/v2/NaviLine/Payment/CS/Case

Return Values

NameDescription
ErrorCode 0000 for success
ErrorMessage Message sent back from the payment service
ErrorResponse Status sent back from the payment service OK/FAIL
RoutingID Routing ID generated by the payment service if successful

Sample Responses

Sample Code

using System.Net;
using Newtonsoft.Json.Linq;

public void MethodName(parms)
{
   string uri = "http://localhost/FusionServices/v2/NaviLine/Payment/CS/Case";
   System.Collections.Specialized.NameValueCollection postParms = 
     new System.Collections.Specialized.NameValueCollection(); 
   // Set paramater values
   postParms.Add("ForeignKey",System.Web.HttpUtility.UrlEncode("201708181208593"));
   postParms.Add("PaymentAmount",System.Web.HttpUtility.UrlEncode("15.02"));
   postParms.Add("PaymentDesc",System.Web.HttpUtility.UrlEncode("FUSION URL Payment Desc"));
   postParms.Add("MRNUM",System.Web.HttpUtility.UrlEncode("888888888"));
   postParms.Add("MRCSID",System.Web.HttpUtility.UrlEncode("38795"));
   postParms.Add("CaseNumber",System.Web.HttpUtility.UrlEncode("M00001-09-11"));
   postParms.Add("CaseID",System.Web.HttpUtility.UrlEncode("237395"));
   postParms.Add("PaymentComment",System.Web.HttpUtility.UrlEncode("FUSION Payment/CSCase URL"));

   WebClient req = new WebClient();
   wc.Headers.Add("Content-Type", "application/x-www-form-urlencoded");
   wc.Headers.Set("X-APPID", "YOURID");
   wc.Headers.Set("X-APPKEY", "YOURKEY");

   byte[] responseBytes = wc.UploadValues(new Uri(uri), "POST", postParms);
   string stringResult = Encoding.UTF8.GetString(responseBytes); 
   JObject response = JObject.Parse(stringResult);
   string error = response["OutputParms"]["ErrorCode"].ToString();
   if (error == "0000")
   {
         string routingID = response["OutputParms"]["RoutingID"].ToString();
         int receiptNum = Convert.ToInt32(routingID);
         // TODO - YOUR CODE HERE
   }
}

C# Razor MVC Sample Code

using System;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;
using System.Collections.Specialized;
using FusionServiceHelper.Models;

// NOTE: Use the namespace generated when you add the class, so that it is correct.
namespace FusionRazor.Models
{
   public class PostPaymentCSCase
   {
       // Add property for each input param in order to map a field to it
       [RegularExpression("^(?=.{0,2}$).*", ErrorMessage = "Must be 2 characters or less. ")]
       public string ApplCode{get; set;}

       [Required(ErrorMessage = "Required")]
       [RegularExpression("^(?=.{0,15}$).*", ErrorMessage = "Must be 15 characters or less. ")]
       public string ForeignKey{get; set;}

       [RegularExpression("[0-9]{0,2}", ErrorMessage = "Numeric values only. Must be 2 digits or less. ")]
       public string OrigCode{get; set;}

       [RegularExpression("^(?=.{0,1}$).*", ErrorMessage = "Must be 1 characters or less. ")]
       public string Modifier{get; set;}

       [Required(ErrorMessage = "Required")]
       [RegularExpression("^(?=.{0,14}$).*", ErrorMessage = "Must be 14 characters or less. ")]
       public string PaymentAmount{get; set;}

       [RegularExpression("^(?=.{0,25}$).*", ErrorMessage = "Must be 25 characters or less. ")]
       public string PaymentDesc{get; set;}

       [Required(ErrorMessage = "Required")]
       [RegularExpression("^(?=.{0,30}$).*", ErrorMessage = "Must be 30 characters or less. ")]
       public string CaseNumber{get; set;}

       [RegularExpression("[0-9]{0,9}", ErrorMessage = "Numeric values only. Must be 9 digits or less. ")]
       public string MRNUM{get; set;}

       [RegularExpression("[0-9]{0,9}", ErrorMessage = "Numeric values only. Must be 9 digits or less. ")]
       public string MRCSID{get; set;}

       [RegularExpression("^(?=.{0,5}$).*", ErrorMessage = "Must be 5 characters or less. ")]
       public string AddtlFeeCode{get; set;}

       [RegularExpression("^(?=.{0,14}$).*", ErrorMessage = "Must be 14 characters or less. ")]
       public string AddtlFeeAmount{get; set;}

       [RegularExpression("^(?=.{0,14}$).*", ErrorMessage = "Must be 14 characters or less. ")]
       public string TotalPaidAmount{get; set;}

       [RegularExpression("^(?=.{0,25}$).*", ErrorMessage = "Must be 25 characters or less. ")]
       public string PaymentComment{get; set;}

       [RegularExpression("^(?=.{0,15}$).*", ErrorMessage = "Must be 15 characters or less. ")]
       public string LinkedForeignKey{get; set;}

       [RegularExpression("^(?=.{0,30}$).*", ErrorMessage = "Must be 30 characters or less. ")]
       public string SpecialNote{get; set;}

       [RegularExpression("^(?=.{0,1}$).*", ErrorMessage = "Must be 1 characters or less. ")]
       public string TenderProcessFlag{get; set;}

       [RegularExpression("^(?=.{0,2}$).*", ErrorMessage = "Must be 2 characters or less. ")]
       public string OverrideTenderMethod{get; set;}

       [RegularExpression("^(?=.{0,6}$).*", ErrorMessage = "Must be 6 characters or less. ")]
       public string AuthCode{get; set;}

       [RegularExpression("^(?=.{0,10}$).*", ErrorMessage = "Must be 10 characters or less. ")]
       public string CardType{get; set;}

       [RegularExpression("^(?=.{0,25}$).*", ErrorMessage = "Must be 25 characters or less. ")]
       public string CardNumber{get; set;}

       [RegularExpression("^(?=.{0,8}$).*", ErrorMessage = "Must be 8 characters or less. ")]
       public string PaymentDate{get; set;}

       
       public string PaymentTime{get; set;}

       [RegularExpression("^(?=.{0,30}$).*", ErrorMessage = "Must be 30 characters or less. ")]
       public string Comment1{get; set;}

       [RegularExpression("^(?=.{0,30}$).*", ErrorMessage = "Must be 30 characters or less. ")]
       public string Comment2{get; set;}

       [RegularExpression("^(?=.{0,30}$).*", ErrorMessage = "Must be 30 characters or less. ")]
       public string Comment3{get; set;}

       [RegularExpression("^(?=.{0,30}$).*", ErrorMessage = "Must be 30 characters or less. ")]
       public string Comment4{get; set;}

       public PostPaymentCSCase()
       {
           //Set any defaults here
       }
   }
}
@* NOTE: Use Add->View to add the View. *@
@* NOTE: Check the 'Create strongly-typed view checkbox, and select the PostPaymentCSCase class. *@
@* NOTE: Select Edit as the Scaffold template. *@
@* NOTE: Use the @model line that is generated at the top.  Replace the rest with the lines below.
@model FusionRazor.Models.PostPaymentCSCase

@{
   ViewBag.Title = "PostPaymentCSCase";
}

<h2>PostPaymentCSCase</h2>
@using (Html.BeginForm()) {
   @Html.AntiForgeryToken()
   @Html.ValidationSummary(true)
   <fieldset>
   <legend>PostPaymentCSCase</legend>
       <div class="editor-label">
           @Html.LabelFor(model => model.ApplCode)
       </div>
       <div class="editor-field">
           @Html.EditorFor(model => model.ApplCode)
           @Html.ValidationMessageFor(model => model.ApplCode)
       </div>
       <div class="editor-label">
           @Html.LabelFor(model => model.ForeignKey)
       </div>
       <div class="editor-field">
           @Html.EditorFor(model => model.ForeignKey)
           @Html.ValidationMessageFor(model => model.ForeignKey)
       </div>
       <div class="editor-label">
           @Html.LabelFor(model => model.OrigCode)
       </div>
       <div class="editor-field">
           @Html.EditorFor(model => model.OrigCode)
           @Html.ValidationMessageFor(model => model.OrigCode)
       </div>
       <div class="editor-label">
           @Html.LabelFor(model => model.Modifier)
       </div>
       <div class="editor-field">
           @Html.EditorFor(model => model.Modifier)
           @Html.ValidationMessageFor(model => model.Modifier)
       </div>
       <div class="editor-label">
           @Html.LabelFor(model => model.PaymentAmount)
       </div>
       <div class="editor-field">
           @Html.EditorFor(model => model.PaymentAmount)
           @Html.ValidationMessageFor(model => model.PaymentAmount)
       </div>
       <div class="editor-label">
           @Html.LabelFor(model => model.PaymentDesc)
       </div>
       <div class="editor-field">
           @Html.EditorFor(model => model.PaymentDesc)
           @Html.ValidationMessageFor(model => model.PaymentDesc)
       </div>
       <div class="editor-label">
           @Html.LabelFor(model => model.CaseNumber)
       </div>
       <div class="editor-field">
           @Html.EditorFor(model => model.CaseNumber)
           @Html.ValidationMessageFor(model => model.CaseNumber)
       </div>
       <div class="editor-label">
           @Html.LabelFor(model => model.MRNUM)
       </div>
       <div class="editor-field">
           @Html.EditorFor(model => model.MRNUM)
           @Html.ValidationMessageFor(model => model.MRNUM)
       </div>
       <div class="editor-label">
           @Html.LabelFor(model => model.MRCSID)
       </div>
       <div class="editor-field">
           @Html.EditorFor(model => model.MRCSID)
           @Html.ValidationMessageFor(model => model.MRCSID)
       </div>
       <div class="editor-label">
           @Html.LabelFor(model => model.AddtlFeeCode)
       </div>
       <div class="editor-field">
           @Html.EditorFor(model => model.AddtlFeeCode)
           @Html.ValidationMessageFor(model => model.AddtlFeeCode)
       </div>
       <div class="editor-label">
           @Html.LabelFor(model => model.AddtlFeeAmount)
       </div>
       <div class="editor-field">
           @Html.EditorFor(model => model.AddtlFeeAmount)
           @Html.ValidationMessageFor(model => model.AddtlFeeAmount)
       </div>
       <div class="editor-label">
           @Html.LabelFor(model => model.TotalPaidAmount)
       </div>
       <div class="editor-field">
           @Html.EditorFor(model => model.TotalPaidAmount)
           @Html.ValidationMessageFor(model => model.TotalPaidAmount)
       </div>
       <div class="editor-label">
           @Html.LabelFor(model => model.PaymentComment)
       </div>
       <div class="editor-field">
           @Html.EditorFor(model => model.PaymentComment)
           @Html.ValidationMessageFor(model => model.PaymentComment)
       </div>
       <div class="editor-label">
           @Html.LabelFor(model => model.LinkedForeignKey)
       </div>
       <div class="editor-field">
           @Html.EditorFor(model => model.LinkedForeignKey)
           @Html.ValidationMessageFor(model => model.LinkedForeignKey)
       </div>
       <div class="editor-label">
           @Html.LabelFor(model => model.SpecialNote)
       </div>
       <div class="editor-field">
           @Html.EditorFor(model => model.SpecialNote)
           @Html.ValidationMessageFor(model => model.SpecialNote)
       </div>
       <div class="editor-label">
           @Html.LabelFor(model => model.TenderProcessFlag)
       </div>
       <div class="editor-field">
           @Html.EditorFor(model => model.TenderProcessFlag)
           @Html.ValidationMessageFor(model => model.TenderProcessFlag)
       </div>
       <div class="editor-label">
           @Html.LabelFor(model => model.OverrideTenderMethod)
       </div>
       <div class="editor-field">
           @Html.EditorFor(model => model.OverrideTenderMethod)
           @Html.ValidationMessageFor(model => model.OverrideTenderMethod)
       </div>
       <div class="editor-label">
           @Html.LabelFor(model => model.AuthCode)
       </div>
       <div class="editor-field">
           @Html.EditorFor(model => model.AuthCode)
           @Html.ValidationMessageFor(model => model.AuthCode)
       </div>
       <div class="editor-label">
           @Html.LabelFor(model => model.CardType)
       </div>
       <div class="editor-field">
           @Html.EditorFor(model => model.CardType)
           @Html.ValidationMessageFor(model => model.CardType)
       </div>
       <div class="editor-label">
           @Html.LabelFor(model => model.CardNumber)
       </div>
       <div class="editor-field">
           @Html.EditorFor(model => model.CardNumber)
           @Html.ValidationMessageFor(model => model.CardNumber)
       </div>
       <div class="editor-label">
           @Html.LabelFor(model => model.PaymentDate)
       </div>
       <div class="editor-field">
           @Html.EditorFor(model => model.PaymentDate)
           @Html.ValidationMessageFor(model => model.PaymentDate)
       </div>
       <div class="editor-label">
           @Html.LabelFor(model => model.PaymentTime)
       </div>
       <div class="editor-field">
           @Html.EditorFor(model => model.PaymentTime)
           @Html.ValidationMessageFor(model => model.PaymentTime)
       </div>
       <div class="editor-label">
           @Html.LabelFor(model => model.Comment1)
       </div>
       <div class="editor-field">
           @Html.EditorFor(model => model.Comment1)
           @Html.ValidationMessageFor(model => model.Comment1)
       </div>
       <div class="editor-label">
           @Html.LabelFor(model => model.Comment2)
       </div>
       <div class="editor-field">
           @Html.EditorFor(model => model.Comment2)
           @Html.ValidationMessageFor(model => model.Comment2)
       </div>
       <div class="editor-label">
           @Html.LabelFor(model => model.Comment3)
       </div>
       <div class="editor-field">
           @Html.EditorFor(model => model.Comment3)
           @Html.ValidationMessageFor(model => model.Comment3)
       </div>
       <div class="editor-label">
           @Html.LabelFor(model => model.Comment4)
       </div>
       <div class="editor-field">
           @Html.EditorFor(model => model.Comment4)
           @Html.ValidationMessageFor(model => model.Comment4)
       </div>
       <p>
       <input type="submit" value="Submit"/>
       </p>
   </fieldset>

}

@section Scripts {
   @Scripts.Render("~/bundles/jqueryval")
}
using System;
using System.Collections.Specialized;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using FusionServiceHelper.Models;

// NOTE: Replace 'MyController' with the name of your controller.

// 
// GET: /MyController/PostPaymentCSCase
public ActionResult PostPaymentCSCase()
{
   // Create a new instance of the model to pick up any default values.
   PostPaymentCSCase model =  new PostPaymentCSCase();

   // pass model to set to default values
   // NOTE: Change 'MyFolderPath' to the path to the .cshtml file.
   return View("~/Views/MyFolderPath/PostPaymentCSCase.cshtml", model);
}

// 
// POST: /MyController/PostPaymentCSCase
[HttpPost]
public ActionResult PostPaymentCSCase(FormCollection collection)
{
   string url = "v2/NaviLine/Payment/CS/Case";
   // Get the value from each input field
   NameValueCollection inputParms = new NameValueCollection();
   inputParms.Add("ApplCode", collection["ApplCode"]);
   inputParms.Add("ForeignKey", collection["ForeignKey"]);
   inputParms.Add("OrigCode", collection["OrigCode"]);
   inputParms.Add("Modifier", collection["Modifier"]);
   inputParms.Add("PaymentAmount", collection["PaymentAmount"]);
   inputParms.Add("PaymentDesc", collection["PaymentDesc"]);
   inputParms.Add("CaseNumber", collection["CaseNumber"]);
   inputParms.Add("MRNUM", collection["MRNUM"]);
   inputParms.Add("MRCSID", collection["MRCSID"]);
   inputParms.Add("AddtlFeeCode", collection["AddtlFeeCode"]);
   inputParms.Add("AddtlFeeAmount", collection["AddtlFeeAmount"]);
   inputParms.Add("TotalPaidAmount", collection["TotalPaidAmount"]);
   inputParms.Add("PaymentComment", collection["PaymentComment"]);
   inputParms.Add("LinkedForeignKey", collection["LinkedForeignKey"]);
   inputParms.Add("SpecialNote", collection["SpecialNote"]);
   inputParms.Add("TenderProcessFlag", collection["TenderProcessFlag"]);
   inputParms.Add("OverrideTenderMethod", collection["OverrideTenderMethod"]);
   inputParms.Add("AuthCode", collection["AuthCode"]);
   inputParms.Add("CardType", collection["CardType"]);
   inputParms.Add("CardNumber", collection["CardNumber"]);
   inputParms.Add("PaymentDate", collection["PaymentDate"]);
   inputParms.Add("PaymentTime", collection["PaymentTime"]);
   inputParms.Add("Comment1", collection["Comment1"]);
   inputParms.Add("Comment2", collection["Comment2"]);
   inputParms.Add("Comment3", collection["Comment3"]);
   inputParms.Add("Comment4", collection["Comment4"]);

   try
   {
       // Send the request
       FusionServiceRequest request = new FusionServiceRequest();
       FusionServiceResult result = request.Post(url, inputParms);

       return View("Result", result);
   }
   catch(Exception e)
   {
       HandleErrorInfo info = new HandleErrorInfo(e, "MyController", "PostPaymentCSCase");
       return View("Error", info);
   }
}