Basic Payment operations
It is recommended to implement transaction payment operations, because they provide more control over output data processing.
Processing process
In the first step it is needed to execute the payment at the terminal, this is possible using script commands:
cardPayment
cardPayment2
cardRefund
The payment command is executed and in case of:
error - error code is returned
completion of a payment transaction - the resulting error code is returned and all information about the payment operation are stored internally (payment details, receipts for the merchant and the customer). Information about the payment is stored persistently.
Subsequently, it is necessary to read or print the receipts: for this you can use the commands:
cardGetMerchantParagon
cardGetCustomerParagon
cardGetAllConfirmations
cardPrintMerchantParagon
cardPrintCustomerParagon
cardPrintAllConfirmations
After printing/reading the receipt is this receipt deleted from the memory.
For the commands:
cardGetMerchantParagon
cardGetCustomerParagon
cardPrintMerchantParagon
cardPrintCustomerParagon
applies that the oldest receipt is always read. This means that if the receipts are not read continuously they will accumulate in the memory. It is therefore recommended to read/print all previous receipts using command cardPrintAllConfirmations / cardGetAllConfirmations before invoking payment functions.
Typical use
cardPayment2: // Executes the paymentcardGetMerchantParagon: // Reads the last receipt and deletes it from the memorycardGetCustomerParagon: // Reads the last receipt and deletes it from the memorycardGetLastReceipt: // Returns compelete information about the last payment. In case that cardPayment is executed, we will get information about the payment that was made in the step 1.