Skip to content

Instantly share code, notes, and snippets.

@zaynkorai
Created July 28, 2021 10:18
Show Gist options
  • Save zaynkorai/4523958abe7123d7b9a41596395e0034 to your computer and use it in GitHub Desktop.
Save zaynkorai/4523958abe7123d7b9a41596395e0034 to your computer and use it in GitHub Desktop.
type Header struct {
LicenseId int `xml:"hps:LicenseId"`
SiteId int `xml:"hps:SiteId"`
DeviceId int `xml:"hps:DeviceId"`
UserName string `xml:"hps:UserName,omitempty"`
Password string `xml:"hps:Password,omitempty"`
CredentialToken string `xml:"hps:CredentialToken,omitempty"`
SiteTrace string `xml:"hps:SiteTrace,omitempty"`
DeveloperID string `xml:"hps:DeveloperID,omitempty"`
VersionNbr string `xml:"hps:VersionNbr,omitempty"`
ClerkID string `xml:"hps:ClerkID,omitempty"`
ClientTxnId int64 `xml:"hps:ClientTxnId,omitempty"`
UniqueDeviceId string `xml:"hps:UniqueDeviceId,omitempty"`
ServiceUri string `default:"https://cert.api2.heartlandportico.com/Hps.Exchange.PosGateway/PosGatewayService.asmx"`
}
type Transaction struct {
CreditAuth CreditAuth `xml:"hps:CreditAuth"`
CreditSale CreditSale `xml:"hps:CreditSale"`
}
type CreditAuth struct {
Block1 Block1 `xml:"hps:Block1"`
}
type CreditSale struct {
Block1 Block1 `xml:"hps:Block1"`
}
type Block1 struct {
Text string `xml:",chardata"`
CardData CardData `xml:"hps:CardData"`
Amt string `xml:"hps:Amt"`
AllowDup string `xml:"hps:AllowDup"`
TagData TagData `xml:"hps:TagData"`
}
type CardData struct {
TrackData TrackData `xml:"hps:TrackData"`
}
type TagData struct {
TagValues `xml:"hps:TagValues"`
}
type TagValues struct {
Text string `xml:",chardata"`
Source string `xml:"hps:source,attr"`
}
type TrackData struct {
Text string `xml:",chardata"`
Method string `xml:"hps:method,attr,omitempty"`
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment