Please enable JavaScript to view this site.

WebOffice  2.66 Complete Guide

This chapter describes the SOA service request and response if a custom Ongoing Purchase Provider for an external system is used.

 

Using SmartFormat

SmartFormat sets a value to a variable by using a true/false selection.

the format is: variable to test : variable to use if true | variable to use if not true.

Using it in XML or JSON as a variable it will become: {var1:{var2}|{var3}}.

if var2 has a value (= is true) this variable will be used for var1 otherwise var3 will be used.

In the example "<m:RateId>{39:{39}|{4}}</m:rateId>" the variable 39 (Tariff external ID) will get its value variable 39 if that variable contains a value. Otherwise the vale from variable 4 (Tariff ID) will be used.

 

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:RateId>{39:{39}|{4}}</m:rateId>
  </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

0

Purchase Guid

Unique purchase ID

Guid

1

Terminal Guid

Unique Terminal ID

Guid

2

Terminal ID

Terminal name

nvarchar(50)

3

Article ID

Article used in this purchase

int32

4

Tariff ID

Tariff package used in this purchase

int32

5

VAT %

VAT for the purchase

float

6

Amount

Amount for the purchase. 2 decimals, separator can be ',' or '.' (per customer setup)

float

7

Currency ID

Numeric Currency code (ISO), example 752 for Swedish krona

nchar(3)

8

Date Created UTC

Date when the customer started the purchase in UTC.

Format: yyyy-MM-ddTHH:mm:ss

example 2010-11-10T00:00:00

DateTime

9

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

10

End Date Utc

End date for the purchase, example parking time ending point in UTC.

Format: yyyy-MM-ddTHH:mm:ss

DateTime

11

Code

Manual input in the CWT. Typically used for Vehicle registration number input.

nvarchar(20)

12

Node Name

Name of the node in Terminal Command Center where the terminal is located.

nvarchar(50)

13

Parking Space ID

ID of the parking space.

nvarchar(50)

14

Start Date Local

Starting date for purchase payment time. Example parking time starting point (after initial free time) in Local Time.

Format: yyyy-MM-ddTHH:mm:ss

DateTime

15

End Date Local

End date for the purchase, example parking time ending point in Local Time.

Format: yyyy-MM-ddTHH:mm:ss

DateTime

16

Card Fee Amount

Card fee amount for the purchase.  2 decimals, separator can be ',' or '.' (per customer setup)

float

17

Masked PAN

Masked card number (6 first and four last)

Example: 554501*5623

(Only for CWT terminals that uses ongoing purchase version 3)

char(11)

18

Transaction Reference

Reference information for the card transaction.

(Only for CWT terminals that uses ongoing purchase version 3)

nvarchar(128)

19

Units

The number of units/minutes sold

int32

20

Syncronization Mode

Only applicable when the CWT is configured for synchronous ongoing purchase with offline fallback. Either Online or Offline

nvarchar(20)

21

Pay Unit ID

CWT Pay Unit ID. Sample

ID    Description

Coin

Card

Bill

External Payunit 0

External Payunit 1

11     Arcontia Contactless Reader

14     Ponferrada Contactless Reader

18     Santa Monica Contactless Reader

 

(Only for CWT terminals that uses ongoing purchase version 3)

int32

22

Card ID

Card id e.g. Mifare card id

(Only for CWT terminals that uses ongoing purchase version 3)

nvarchar(50)

23

Balance After Debit

Balance After Debit for the purchase when MiFare contactless cards are used.  2 decimals, separator can be ',' or '.' (Only for CWT terminals that uses ongoing purchase version 3)

float

24

Parking Space Location

Location for the Parking Space

nvarchar(50)

25

Article Name

Article name for the article used in this purchase

nvarchar(50)

26

Response External ID at update

If it is a purchase update the response external id for the original purchase is stored in this variable. If it is not an update an empty string is used.

nvarchar(50)

27

Parking Zone Name

Name for the parking zone used in this purchase.

nvarchar(50)

28

Parking Zone Number

Number for the parking zone used in this purchase.

int32

29

Parking ID

Parking ID in WebOffice

int16

30

Ticket Number

Ticket Number used in this purchase

int32

31

Net Amount

Net Amount inclusive VAT for the purchase. 2 decimals, separator can be ',' or '.' (per customer setup)

float

32

Net Amount Excluding VAT

(Article VAT %)

Net Amount excluding the VAT for the purchase. 2 decimals, separator can be ',' or '.' (per customer setup).

Calculation: Net Amount Excluding VAT = (Amount – Card Fee Amount) / 1.0 + VAT % / 1000)

float

33

Net Amount VAT

(Article VAT %)

Net Amount VAT for the purchase. 2 decimals, separator can be ',' or '.' (per customer setup).

Calculation: Net Amount VAT = (Amount – Card Fee Amount) - Net Amount Excluding VAT

float

34

Purchase PreRequisites External Reference

External reference that will be saved in Purchases

 

35

Purchase Date UTC

 

 

36

Purchase Date Local

 

 

37

Post Payment Transaction Guid

The Guid identifier for the post payment transaction. This value is Null when the purchase is not of a post payment type.

 

38

Origin Country/State

the origin country or state from the owner of the vehicle

 

39

Tariff External ID

Third party Tariff ID connected to the Tariff Package

 

40

Hourly Rate Description

the hourly rate (e.g. $2.00)

nvarchar(20)

41

Date Changed UTC

The date the record was changed in UTC time

 

42

Enforcement Terminal Group Name

 

nvarchar

43

Amount (Sub Units)

 

 

44

Units (Second)

 

 

45

User ID

 

 

46

Phone number

 

 

 

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