Method PostPayment

Summary

Records Payment information into NaviLine

Remarks

Post a payment to NaviLine Cash Receipts. The ApplCode, OrigCode, and Modifier must match an existing batch payment in cash receipts.

XML Data

Requires

Input Parameters

NameTypeLengthDescription
ApplCode System.String 2 [Required] Application Code. The 2 letter code indicating the application. ‘**’ = GeneralLedger (non-Central Square) ‘GM’=GMBA or InfiSys ‘BP’=Building Permits ‘CE’=Code Enforcement ‘CS’=Case Management ‘CX’=Customer Information Systems ‘MR’=Miscellaneous Receivables ‘OL’=Business Licenses ‘OR’=Business Licenses (Renewal) ‘PT’=Parking Tickets ‘PZ’Planning and Engineering ‘TX’=Tax Billing
OrigCode numeric 2 [Required] Origination code used to map to batch payments. Defaults to 11 for 3rd Party payments. OrigCode ‘00’ – ‘10’ Reserved for SPS applications ‘01’=Click2Gov or Naviline ‘02’=Kiosk ‘03’=IVR ‘04’=Recurring credit card ‘05’=Point of sale ‘06’=Park mobile ‘11’ – ‘99’ third party interfaces ‘11’=3rd party payments (Default)
Modifier System.String 1 Modifier code used to separate payment batches by payment type or point of origin. Defaults to Blank for 3rd Party payments. Must match batch creation defaults.
ForeignKey System.String 36 [Required] 3rd Party Transaction ID. Must be unique for each call to this method.
ReferenceNumber System.String 15 Reference number. Used with voiding payments
CustomerID numeric 9 [Required] Customer ID. ‘**’ = G/L (non-Central Square) Not used ‘GM’=GMBA or InfiSys Not used ‘BP’=Building Permits 2-digit Application Year ‘CE’=Code Enforcement 2-digit Case Year ‘CS’=Case Management MR 9-digit Customer Master ID ‘CX’=Customer Information 9-digit Customer ID ‘MR’=Miscellaneous Receivables 9-digit Customer Master ID ‘OL’=Business Licenses 2-digit License Year ‘OR’=Business Licenses (Renewal) 2-digit License Year ‘PT’=Parking Tickets MR 9-digit Customer Master ID ‘PZ’Planning and Engineering 2-digit Project Year ‘TX’=Tax Billing Not used
LocationID numeric 9 [Required] Location ID. ‘**’ = G/L (non-Central Square) Not used‘GM’=GMBA or InfiSys Not used ‘BP’=Building Permits 8-digit Application Number ‘CE’=Code Enforcement 8-digit Case Number ‘CS’=Case Management MR 9-digit Customer ID ‘CX’=Customer Information 9-digit Location ID ‘MR’=Miscellaneous Receivables 9-digit Customer ID ‘OL’=Business Licenses 8-digit License Number ‘OR’=Business Licenses (Renewal) 8-digit License Number ‘PT’=Parking Tickets MR 9-digit Customer ID ‘PZ’Planning and Engineering 8-digit Project Number ‘TX’=Tax Billing 9-digit Tax Account
PaymentAmount System.String 14 [Required] The Dollar amount of the payment being paid.
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.
PaymentDate yyyymmdd 8 The Date the payment was paid. Format=yyyyMMdd. Defaults to current date
PaymentTime hhmmss 6 The Time the payment was paid. Format=HHMMss. Defaults to current time
PaymentStatus numeric 2 ‘00’ – ‘10’ Reserved for SPS applications ‘00’ = Settled ‘01’ = Authorized ‘02’ = Denied ‘03’ = Held ‘04’ = Initial Entry ‘05’ = Credit ‘99’ Reserved for 3rd party payments (Default)
PaymentDesc System.String 25 The payment description
LinkedForeignKey System.String 15 Optional linked Foreign Key used by 3rd party to link a transaction to previously reported transaction’s ReferenceNumber.
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.
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
AuthCode System.String 6 Credit card authorization code
CardType System.String 10 Credit card vendor
CardNumber System.String 25 Credit card number. If reported, all but the last 4-digits of card number must be blocked-out.
OperatorID System.String 10 Operator ID
BatchDate cyymmdd 8 Batch Date for the cash receipts batch that the payment will go into. Format=CyyMMdd. Defaults to current batch.
BatchNbr numeric 2 Batch number for the cash receipts batch that the payment will go into. Defaults to current batch.
ReceiptNbr numeric 7 Receipt number.
TenderSeqNbr numeric 11 Tender Sequence number.
OtherKeyFld System.String 30 See the BP, CS, and MR payment methods for additional requirements on this field
CommentSpcInstr System.String 30 A comment for special instructions to include with the payment. Reserved for future use.
Quantity decimal2 9 Quantity. Decimal. Defaults to 1.00.
ServiceCode System.String 2 ‘CX’=Customer Information Service Code ‘TX’=Tax Billing Bill Type Code
LienableNonlienableCode System.String 1 Lienable non-lienable code
LienNbr numeric 9 Reserved for future use.
CitationNbr System.String 10 Parking Tickets Citation number. Required for Parking Ticket, ApplCode=PT
CaseNbr System.String 30 The Case Number the payment is for. Required for Courts Payment, ApplCode=CS
StockNbr System.String 11 Reserved for future use.
BankCode System.String 2 Valid for the following applications: ‘**’ = G/L (non-Central Square) ‘GM’=GMBA or InfiSys ‘MR’=Miscellaneous Receivables
ProjectNbr System.String 6 Valid for the following applications: ‘**’ = G/L (non-Central Square) ‘GM’=GMBA or InfiSys ‘MR’=Miscellaneous Receivables
CreditAcct System.String 50 Valid and required for the following applications: ‘**’ = G/L (non-Central Square) ‘GM’=GMBA or InfiSys
DebitAcct System.String 50 Valid for the following applications: ‘**’ = G/L (non-Central Square) ‘GM’=GMBA or InfiSys
PaymentComment System.String 25 A comment to include with the payment

Example

POST http://localhost/FusionServices/v2/NaviLine/Payment/Utilities

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/Utilities";
   System.Collections.Specialized.NameValueCollection postParms = 
     new System.Collections.Specialized.NameValueCollection(); 
   // Set paramater values
   postParms.Add("ApplCode",System.Web.HttpUtility.UrlEncode("CX"));
   postParms.Add("OrigCode",System.Web.HttpUtility.UrlEncode("11"));
   postParms.Add("Modifier",System.Web.HttpUtility.UrlEncode(""));
   postParms.Add("ForeignKey",System.Web.HttpUtility.UrlEncode("201707181507122"));
   postParms.Add("PaymentDate",System.Web.HttpUtility.UrlEncode("20140504"));
   postParms.Add("PaymentTime",System.Web.HttpUtility.UrlEncode("160130"));
   postParms.Add("PaymentStatus",System.Web.HttpUtility.UrlEncode("99"));
   postParms.Add("PaymentAmount",System.Web.HttpUtility.UrlEncode("100.50"));
   postParms.Add("PaymentDesc",System.Web.HttpUtility.UrlEncode("Payment Desc"));
   postParms.Add("CustomerID",System.Web.HttpUtility.UrlEncode("101"));
   postParms.Add("LocationID",System.Web.HttpUtility.UrlEncode("33028"));
   postParms.Add("ReferenceNumber",System.Web.HttpUtility.UrlEncode("306613221507122"));

   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")
   {
         // 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 PostPayment
   {
       // Add property for each input param in order to map a field to it
       [Required(ErrorMessage = "Required")]
       [RegularExpression("^(?=.{0,2}$).*", ErrorMessage = "Must be 2 characters or less. ")]
       public string ApplCode{get; set;}

       [Required(ErrorMessage = "Required")]
       [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,36}$).*", ErrorMessage = "Must be 36 characters or less. ")]
       public string ForeignKey{get; set;}

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

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

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

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

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

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

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

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

       [RegularExpression("^(?=.{0,25}$).*", ErrorMessage = "Must be 25 characters or less. ")]
       public string PaymentDesc{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,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;}

       [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,10}$).*", ErrorMessage = "Must be 10 characters or less. ")]
       public string OperatorID{get; set;}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

       public PostPayment()
       {
           //Set any defaults here
       }
   }
}
@* NOTE: Use Add->View to add the View. *@
@* NOTE: Check the 'Create strongly-typed view checkbox, and select the PostPayment 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.PostPayment

@{
   ViewBag.Title = "PostPayment";
}

<h2>PostPayment</h2>
@using (Html.BeginForm()) {
   @Html.AntiForgeryToken()
   @Html.ValidationSummary(true)
   <fieldset>
   <legend>PostPayment</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.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.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.ReferenceNumber)
       </div>
       <div class="editor-field">
           @Html.EditorFor(model => model.ReferenceNumber)
           @Html.ValidationMessageFor(model => model.ReferenceNumber)
       </div>
       <div class="editor-label">
           @Html.LabelFor(model => model.CustomerID)
       </div>
       <div class="editor-field">
           @Html.EditorFor(model => model.CustomerID)
           @Html.ValidationMessageFor(model => model.CustomerID)
       </div>
       <div class="editor-label">
           @Html.LabelFor(model => model.LocationID)
       </div>
       <div class="editor-field">
           @Html.EditorFor(model => model.LocationID)
           @Html.ValidationMessageFor(model => model.LocationID)
       </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.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.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.PaymentStatus)
       </div>
       <div class="editor-field">
           @Html.EditorFor(model => model.PaymentStatus)
           @Html.ValidationMessageFor(model => model.PaymentStatus)
       </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.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.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>
       <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.OperatorID)
       </div>
       <div class="editor-field">
           @Html.EditorFor(model => model.OperatorID)
           @Html.ValidationMessageFor(model => model.OperatorID)
       </div>
       <div class="editor-label">
           @Html.LabelFor(model => model.BatchDate)
       </div>
       <div class="editor-field">
           @Html.EditorFor(model => model.BatchDate)
           @Html.ValidationMessageFor(model => model.BatchDate)
       </div>
       <div class="editor-label">
           @Html.LabelFor(model => model.BatchNbr)
       </div>
       <div class="editor-field">
           @Html.EditorFor(model => model.BatchNbr)
           @Html.ValidationMessageFor(model => model.BatchNbr)
       </div>
       <div class="editor-label">
           @Html.LabelFor(model => model.ReceiptNbr)
       </div>
       <div class="editor-field">
           @Html.EditorFor(model => model.ReceiptNbr)
           @Html.ValidationMessageFor(model => model.ReceiptNbr)
       </div>
       <div class="editor-label">
           @Html.LabelFor(model => model.TenderSeqNbr)
       </div>
       <div class="editor-field">
           @Html.EditorFor(model => model.TenderSeqNbr)
           @Html.ValidationMessageFor(model => model.TenderSeqNbr)
       </div>
       <div class="editor-label">
           @Html.LabelFor(model => model.OtherKeyFld)
       </div>
       <div class="editor-field">
           @Html.EditorFor(model => model.OtherKeyFld)
           @Html.ValidationMessageFor(model => model.OtherKeyFld)
       </div>
       <div class="editor-label">
           @Html.LabelFor(model => model.CommentSpcInstr)
       </div>
       <div class="editor-field">
           @Html.EditorFor(model => model.CommentSpcInstr)
           @Html.ValidationMessageFor(model => model.CommentSpcInstr)
       </div>
       <div class="editor-label">
           @Html.LabelFor(model => model.Quantity)
       </div>
       <div class="editor-field">
           @Html.EditorFor(model => model.Quantity)
           @Html.ValidationMessageFor(model => model.Quantity)
       </div>
       <div class="editor-label">
           @Html.LabelFor(model => model.ServiceCode)
       </div>
       <div class="editor-field">
           @Html.EditorFor(model => model.ServiceCode)
           @Html.ValidationMessageFor(model => model.ServiceCode)
       </div>
       <div class="editor-label">
           @Html.LabelFor(model => model.LienableNonlienableCode)
       </div>
       <div class="editor-field">
           @Html.EditorFor(model => model.LienableNonlienableCode)
           @Html.ValidationMessageFor(model => model.LienableNonlienableCode)
       </div>
       <div class="editor-label">
           @Html.LabelFor(model => model.LienNbr)
       </div>
       <div class="editor-field">
           @Html.EditorFor(model => model.LienNbr)
           @Html.ValidationMessageFor(model => model.LienNbr)
       </div>
       <div class="editor-label">
           @Html.LabelFor(model => model.CitationNbr)
       </div>
       <div class="editor-field">
           @Html.EditorFor(model => model.CitationNbr)
           @Html.ValidationMessageFor(model => model.CitationNbr)
       </div>
       <div class="editor-label">
           @Html.LabelFor(model => model.CaseNbr)
       </div>
       <div class="editor-field">
           @Html.EditorFor(model => model.CaseNbr)
           @Html.ValidationMessageFor(model => model.CaseNbr)
       </div>
       <div class="editor-label">
           @Html.LabelFor(model => model.StockNbr)
       </div>
       <div class="editor-field">
           @Html.EditorFor(model => model.StockNbr)
           @Html.ValidationMessageFor(model => model.StockNbr)
       </div>
       <div class="editor-label">
           @Html.LabelFor(model => model.BankCode)
       </div>
       <div class="editor-field">
           @Html.EditorFor(model => model.BankCode)
           @Html.ValidationMessageFor(model => model.BankCode)
       </div>
       <div class="editor-label">
           @Html.LabelFor(model => model.ProjectNbr)
       </div>
       <div class="editor-field">
           @Html.EditorFor(model => model.ProjectNbr)
           @Html.ValidationMessageFor(model => model.ProjectNbr)
       </div>
       <div class="editor-label">
           @Html.LabelFor(model => model.CreditAcct)
       </div>
       <div class="editor-field">
           @Html.EditorFor(model => model.CreditAcct)
           @Html.ValidationMessageFor(model => model.CreditAcct)
       </div>
       <div class="editor-label">
           @Html.LabelFor(model => model.DebitAcct)
       </div>
       <div class="editor-field">
           @Html.EditorFor(model => model.DebitAcct)
           @Html.ValidationMessageFor(model => model.DebitAcct)
       </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>
       <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/PostPayment
public ActionResult PostPayment()
{
   // Create a new instance of the model to pick up any default values.
   PostPayment model =  new PostPayment();

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

// 
// POST: /MyController/PostPayment
[HttpPost]
public ActionResult PostPayment(FormCollection collection)
{
   string url = "v2/NaviLine/Payment/Utilities";
   // Get the value from each input field
   NameValueCollection inputParms = new NameValueCollection();
   inputParms.Add("ApplCode", collection["ApplCode"]);
   inputParms.Add("OrigCode", collection["OrigCode"]);
   inputParms.Add("Modifier", collection["Modifier"]);
   inputParms.Add("ForeignKey", collection["ForeignKey"]);
   inputParms.Add("ReferenceNumber", collection["ReferenceNumber"]);
   inputParms.Add("CustomerID", collection["CustomerID"]);
   inputParms.Add("LocationID", collection["LocationID"]);
   inputParms.Add("PaymentAmount", collection["PaymentAmount"]);
   inputParms.Add("TotalPaidAmount", collection["TotalPaidAmount"]);
   inputParms.Add("PaymentDate", collection["PaymentDate"]);
   inputParms.Add("PaymentTime", collection["PaymentTime"]);
   inputParms.Add("PaymentStatus", collection["PaymentStatus"]);
   inputParms.Add("PaymentDesc", collection["PaymentDesc"]);
   inputParms.Add("LinkedForeignKey", collection["LinkedForeignKey"]);
   inputParms.Add("SpecialNote", collection["SpecialNote"]);
   inputParms.Add("TenderProcessFlag", collection["TenderProcessFlag"]);
   inputParms.Add("OverrideTenderMethod", collection["OverrideTenderMethod"]);
   inputParms.Add("Comment1", collection["Comment1"]);
   inputParms.Add("Comment2", collection["Comment2"]);
   inputParms.Add("Comment3", collection["Comment3"]);
   inputParms.Add("Comment4", collection["Comment4"]);
   inputParms.Add("AuthCode", collection["AuthCode"]);
   inputParms.Add("CardType", collection["CardType"]);
   inputParms.Add("CardNumber", collection["CardNumber"]);
   inputParms.Add("OperatorID", collection["OperatorID"]);
   inputParms.Add("BatchDate", collection["BatchDate"]);
   inputParms.Add("BatchNbr", collection["BatchNbr"]);
   inputParms.Add("ReceiptNbr", collection["ReceiptNbr"]);
   inputParms.Add("TenderSeqNbr", collection["TenderSeqNbr"]);
   inputParms.Add("OtherKeyFld", collection["OtherKeyFld"]);
   inputParms.Add("CommentSpcInstr", collection["CommentSpcInstr"]);
   inputParms.Add("Quantity", collection["Quantity"]);
   inputParms.Add("ServiceCode", collection["ServiceCode"]);
   inputParms.Add("LienableNonlienableCode", collection["LienableNonlienableCode"]);
   inputParms.Add("LienNbr", collection["LienNbr"]);
   inputParms.Add("CitationNbr", collection["CitationNbr"]);
   inputParms.Add("CaseNbr", collection["CaseNbr"]);
   inputParms.Add("StockNbr", collection["StockNbr"]);
   inputParms.Add("BankCode", collection["BankCode"]);
   inputParms.Add("ProjectNbr", collection["ProjectNbr"]);
   inputParms.Add("CreditAcct", collection["CreditAcct"]);
   inputParms.Add("DebitAcct", collection["DebitAcct"]);
   inputParms.Add("PaymentComment", collection["PaymentComment"]);

   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", "PostPayment");
       return View("Error", info);
   }
}