realex-payments-api

How to show the payment amount in the Realex HPP post?


I want the end-user to know what amount they are paying when entering their credit-card details, and this seems only possible through supplying Realex with a template file with a <hpp:body /> embedded tag. I'd rather not have to get into that, so is there a way to have the standard Realex form display the amount being charged?

My application is in ASP VB.net. My class that constructs the post is:

Public Class RemotePost
Private Inputs As System.Collections.Specialized.NameValueCollection = New System.Collections.Specialized.NameValueCollection()

Public Url As String = ""
Public Method As String = "post"
Public FormName As String = "Mypost"

Public Sub Add(name As String, value As String)
    Inputs.Add(name, value)
End Sub

Public Sub Post()
    System.Web.HttpContext.Current.Response.Clear()
    System.Web.HttpContext.Current.Response.Write("<html><head>")
    System.Web.HttpContext.Current.Response.Write(String.Format("</head><body onload='document.{0}.submit()'>", FormName))
    System.Web.HttpContext.Current.Response.Write(String.Format("<form name='{0}' method='{1}' action='{2}' >", FormName, Method, Url))
    For i = 0 To Inputs.Keys.Count - 1
        HttpContext.Current.Response.Write(String.Format("<input name='{0}' type='hidden' value='{1}'>", Inputs.Keys(i), Inputs(Inputs.Keys(i))))
    Next i
    System.Web.HttpContext.Current.Response.Write("</form>")
    System.Web.HttpContext.Current.Response.Write("</body></html>")
    System.Web.HttpContext.Current.Response.End()
End Sub
End Class

Solution

  • Thanks for your question. You don't need a template to display the amount to the cardholder. This can be acheived in our reporting and configuration tool - RealControl.

    From the navigation menu under Administration select Client Settings. On this screen you'll see a section called Redirect Text Configuration. From the drop-down, choose the account you wish to implement this for.

    In the Info Text box you'll see the option to configure text to display on the HPP. Click on the i symbol to see the various transaction variables you can use, one of them is <#TOTAL#> which you can use to display the amount to the cardholder.

    Best,

    Seán

    Realex Payments