Voucher printing
printReceipt()¶
This method must be called to print the receipt when the transaction is confirmed. Once the receipt has been successfully printed, only reprints are allowed.
Parameters
| Name | Type | Mandatory | Description |
|---|---|---|---|
request |
PrintReceiptRequest |
Yes | Data transfer object that will contain the payment request information. Note that not all parameters are required. |
callback |
PaymentCallback |
Yes | Interface that will be executed for notifications of success or error of the payment process. |
Detail of the Parameters
request (PrintReceiptRequest)
| Name | Type | Mandatory | Description |
|---|---|---|---|
ApplicationInfo.credentials |
Credentials |
Yes | Credentials of the application that is requesting the operation, as registered at PayStore. Basically, it's about the application ID and the access token. |
ApplicationInfo.softwareVersion |
String |
Yes | Version of the application that is requesting payment. |
paymentId |
String |
Yes | Transaction identifier for the payment application. This is the information to use for commit and undo. |
printMerchantReceipt |
Boolean |
No | Indicates whether or not the merchant's receipt should be printed. |
printCustomerReceipt |
Boolean |
No | Indicates whether or not the customer receipt should be printed. |
previewMerchantReceipt |
Boolean |
No | Indicates whether the merchant voucher preview screen should be displayed after confirming the transaction. The default value is true, which means the voucher will be displayed. |
previewCustomerReceipt |
Boolean |
No | Indicates whether the customer voucher preview screen should be displayed after confirming the transaction. The default value is true, which means the voucher will be displayed. |
callback (PaymentCallback)
| Name | Type | Mandatory | Description |
|---|---|---|---|
onSuccess |
Method for notification on success. | ||
onError |
Method for notification in case of error. | ||
ErrorData.paymentsResponseCode |
String |
Yes | Response code for the error that occurred. See Response Codes |
ErrorData.acquirerResponseCode |
String |
No | Response code for the occurred error returned by the acquirer. Note that this error will only be returned if the transaction is not authorized by the acquirer. |
ErrorData.responseMessage |
String |
Yes | Descriptive message of the reason for the non-authorization. If the transaction was denied by the acquirer, it will contain the message returned by the acquirer. |
ErrorData.acquirerAdditionalMessage |
String |
No | Additional message sent by the acquirer in the transaction response. |