This interface is used to update 'Pending Transaction' tables in the database. It consists of a single method.
HRESULT Insert ( BSTR bstrXmlPt, BOOL bUpdate, BSTR *bstrXmlPtResult )
This method is used to insert or update pending transaction data into the PT tables. The mandatory fields listed in the XML data have to be defined.
|
String containing an XML document, structured according to a defined template (schema) for pending transactions. The schema conforms to proposed standards from W3C. |
|
'FALSE' indicates that a new record is being inserted in the database and (therefore) duplicate keys are an error. 'TRUE' indicates that duplicate key errors should be ignored. |
|
On return it contains either NULL or an XML document containing detailed, item-specific error information. |
|
If the transaction was successfully recorded in the database. In this case, |
|
One or more required fields were missing. |
|
If there is a communication error before any data is written to the database. |
|
If there is some other error before any data is written to the database. |
|
Failed to write all items to the database. |
|
One or more items were not written as they already exist in the database. |
The XML data fields are divided into two separate sections: the PT Transaction level, and the Item Detail level. The PT Transaction level includes data required to add a single record into PT tables. The Item Detail level includes data required to add multiple records into PT detail tables,
such as the PT_merch_entry
table.
The following fields are required for all PT tables (except ptd_summary
):
StoreNumber (same as ptd_summary
)
TransNum (same as ptd_admin
)
ItemNum (increment on ptd_admin
for detailed items)
The transaction level related mandatory and optional fields are:
Mandatory |
Optional |
---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The following list the mandatory and optional fields required for ptd_merch_entry
and ptd_non_merch_sale
tables.
Mandatory |
Optional |
---|---|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|