Why is there a NULL settlement message on a credit card batch?

NOTE: This article was intended for database administrators only.

When Cloud Retailer settles one batch on a payment terminal it checks the last batch settled on the terminal as well and if that does not match with the last settlement on the register then it will create a row with a null value for the settlement message 

You can find a list of terminals and where they moved by running this query:

SELECT b1.DeviceID, b2.DeviceId FROM ElectronicPaymentBatch b1 inner join ElectronicPaymentBatch b2 on b1.Timestamp = b2.Timestamp and b1.DeviceID != b2.DeviceID where b1.SettlementMessage is null and b1.DateCreated > '2016-01-01'

You can see a list of the batches these relate to here (the two queries line up):

SELECT  *
FROM         ElectronicPaymentBatch b1
WHERE    SettlementMessage is null
and b1.DateCreated > '2016-01-01'
Comments