Package com.avoka.fc.core.util
Class ReceiptUtils
java.lang.Object
com.avoka.fc.core.util.ReceiptUtils
Provides PDF Receipt utility methods.
- Since:
- 4.0.0
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic byte[]
getPdfReceiptWithEmbeddedData
(Submission submission) Return a PDF receipt file for the given submission, with the associated transaction form XML and file attachments included in the PDF receipt document.static byte[]
renderPdfReceipt
(Submission submission) Render the submissions customer PDF receipt and return the PDF byte data.static void
renderPdfReceipt
(Submission submission, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) Render a temporary PDF receipt for the given submission to the provided servlet response.
-
Constructor Details
-
ReceiptUtils
public ReceiptUtils()
-
-
Method Details
-
renderPdfReceipt
Render the submissions customer PDF receipt and return the PDF byte data.- Parameters:
submission
- the submission record (not null)- Returns:
- the customer PDF byte data
- Since:
- 4.2.0
-
renderPdfReceipt
public static void renderPdfReceipt(Submission submission, jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response) Render a temporary PDF receipt for the given submission to the provided servlet response. This method will- Parameters:
submission
- the submission providing the XML data and receipt template to render (required)request
- the servlet request (required)response
- the servlet response (required)
-
getPdfReceiptWithEmbeddedData
Return a PDF receipt file for the given submission, with the associated transaction form XML and file attachments included in the PDF receipt document. This type of PDF is useful for a document of record storage.- Parameters:
submission
- the submission, must be in Receipt Complete status and transaction data must not be deleted (required)- Returns:
- the PDF document byte array
- Throws:
IOException
- if an rendering error occurs- Since:
- 4.1.8
-