This chapter describes the SOA service request and response if a custom Ongoing Purchase Provider for an external system is used.
Note: This description works with a Service Request Type in XML format |
Formatting a Request
In the path field insert the path the service: e.g. http://xxx.mipermit.net/Services/wsExtPayDisplay.asmx
In the Post Format field insert a request like the example below:
<m:OngoingPurchase xmlns:m="http://xxx.mipermit.net">
<m:Parking>
<m:PurchaseGuid>{0}</m:PurchaseGuid>
<m:TerminalGuid>{1}</m:TerminalGuid>
<m:TerminalID>{2}</m:TerminalID>
<m:ArticleID>{3}</m:ArticleID>
<m:TariffPackageID>{4}</m:TariffPackageID>
<m:VAT>{5}</m:VAT>
<m:Amount>{6}</m:Amount>
<m:Currency>{7}</m:Currency>
<m:CreateDate>{8}</m:CreateDate>
<m:StartDate>{9}</m:StartDate>
<m:EndDate>{10}</m:EndDate>
<m:Code>{11}</m:Code>
</m:Parking>
</m:OngoingPurchase>
Dynamic variables that can be used in the Post Format for an Ongoing Purchase Provider:
Variable {n} |
Variable Name |
Description |
Data Type |
WebOffice Version |
---|---|---|---|---|
0 |
Pre-Requisites Identifier |
Predefined payment reference, license plate, booking code etc. These fields are not supported in the CWT app 4.4-0 and later but are internally populated for backward compatibility. |
String |
1 |
1 |
Pre-Requisites Identifier Type |
Specifies the content type of used identifier, 1 = Text 2 = Card Serial Number 3 = Hashed Pan These fields are not supported in the CWT app 4.4-0 and later but are internally populated for backward compatibility. |
Int |
1 |
2 |
Payment Service ID |
|
Int |
|
3 |
ArticleID |
Article used in this purchase |
Int |
|
4 |
GUID Message Identifier |
|
Guid |
|
5 |
Terminal ID |
Terminal name |
String |
|
6 |
Payment Date UTC |
When request was received in WebOffice Format: yyyy-MM-ddTHH:mm:ss |
dateTime |
|
7 |
Start Date UTC |
Starting date for purchase payment time. Example parking time starting point (after initial free time) in UTC Format: yyyy-MM-ddTHH:mm:ss |
dateTime |
|
8 |
End Date UTC |
End date for the purchase, example parking time ending point in UTC Format: yyyy-MM-ddTHH:mm:ss |
dateTime |
|
9 |
Parking Zone Name |
Name for the parking zone used in this purchase. |
String |
|
10 |
Parking Zone Number |
Number for the parking zone used in this purchase. |
Int |
|
11 |
Parking ID |
Parking ID in WebOffice |
Int |
|
12 |
Code |
Predefined payment reference, license plate, booking code etc. |
String |
2 |
13 |
Card Serial Number |
Specifies Hashed Pan |
String |
2 |
14 |
Hashed PAN |
Specifies Card Serial Number |
String |
2 |
15 |
Login Authorization Token |
Specifies Login Authorization Token This field is received from a CWT Purchase PreRequisites message version 2. |
String |
2 |
When sending the request WebOffice will insert the request in a SOAP envelope like done below
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Body>
<m:OngoingPurchase xmlns:m="http://xxx.mipermit.net">
<m:Parking>
<m:PurchaseGuid>{0}</m:PurchaseGuid>
<m:TerminalGuid>{1}</m:TerminalGuid>
<m:TerminalID>{2}</m:TerminalID>
<m:ArticleID>{3}</m:ArticleID>
<m:TariffPackageID>{4}</m:TariffPackageID>
<m:VAT>{5}</m:VAT>
<m:Amount>{6}</m:Amount>
<m:Currency>{7}</m:Currency>
<m:CreateDate>{8}</m:CreateDate>
<m:StartDate>{9}</m:StartDate>
<m:EndDate>{10}</m:EndDate>
<m:Code>{11}</m:Code>
</m:Parking>
</m:OngoingPurchase>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
The response
Requirements of the response
1.Must contain a tag with name OngoingPurchaseResponse.
2.The tag OngoingPurchaseResponse must have a child tag with the name Purchase with an attribute ExternalID if the fields Response Node XPath, Response External ID Attribute, and Response External Description Attribute in form Ongoing purchase provider details are empty. Otherwise these parameters can be used for defining where to find the external id and description in the response message,
Example
<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<processResponse>
<processResult>
<OngoingPurchaseResponse>
<Purchase ExternalID="1" ExternalDescription="7a6d7366-ec1d-d663-d10d-cba52ea3a0fb"/>
</OngoingPurchaseResponse>
</processResult>
</processResponse>
</soap:Body>
</soap:Envelope>
Description of variables in response from ongoing purchase provider
Nr |
Attribute Name |
Description |
Data Type |
0 |
ExternalID |
Unique purchase identifier in the external system, will be sent to terminal. If no external ID is received the purchase is cancelled. |
nvarchar(50) |
1 |
ExternalDescription |
Description (Option). Will be sent to terminal if terminal uses ongoing purchase version >1. |
nvarchar(255) |
2 |
ResultCode |
Result code from third party. Result code can be set to one of following values: 1 = Accepted (request is accepted at third party) 2 = No respons (No response from third party) 3 = Denied (The request is actively denied at third party) |
byte |