Implement the callback
create_tender_CB and pass this as a parameter of the
create_tender call. For more information on how to do this, see Implement callbacks.
The callback function declaration is:
Allocate request structure
create_tender_allocate to allocate memory for an
create_tender_request structure. Populate the request by performing string duplication and filling heap allocated strings. If you want the data for later use, retain it, or it will be released automatically.
Call the create_tender Function
create_tender function to initiate the sale transaction, which triggers any relevant callbacks. The POS waits for the final state and the
status_tender_final callback to report the final result of the transaction, even if a cancel request has been issued. The reason for this is that the transaction might already be in a state in which a cancel is not possible. The sale transaction includes the merchant account information, as this is used to register PEDs for multiple merchant accounts, and transactions can be performed on more than one of these merchant accounts.
||Pointer to the
||Pointer to the callback function in the POS that will be called with the results of the create tender call|
||Pointer to a POS defined struct. Returned in the callback. It can be used to share a POS data struct between the call to the library and the callback from the library.|
The declaration of the call to start a transaction is as follows:
Handle the callback
The POS needs to wait for the
create_tender_CB to happen, before it can continue with other functions. After the
create_tender_cb is returned, the system returns a number of other callbacks. Finally, the system returns the
tender_finished_cb callback that contains the final transaction result. Another transaction can only be started when the final transaction result is received.
||A unique reference for the transaction that is generated by the PED device. This reference is used for subsequent actions on the transaction. For a list of parameters, see create_tender_response.|
||Pointer to a user-defined structure. Returned in the callback. It can be used to share a POS data struct between the call to the library and the callback from the library in response to the call.|
create_tender_CB is a callback to the creation of a tender, but does not represent the status or result of the transaction. The result is returned in