IPWorks EDI 2020 macOS Edition

Questions / Feedback?

VerifyReceipt Method

Verifies an MDN receipt.

Syntax

public func verifyReceipt() throws -> Void

Remarks

VerifyReceipt verifies the receipt in MDNReceipt against the values of OriginalContentMIC and MessageId and the preferences specified in MDNOptions. The method operates similarly to Post: After the method finishes, the MDNReceipt, ReceiptSigningProtocol, and ReceiptSignerCert properties will be populated with the appropriate values.

The method operates synchronously, and will throw an exception if any errors or warnings occur. Errors might include a failure to decrypt or authenticate the receipt, the absence of an MDN when one was requested, TCP/IP errors, or any errors reported by the server in the MDN. Warnings might include the return of an unsigned receipt when a signed receipt was requested, or other warnings reported by the server in the MDN.

If an exception is thrown the error code will correspond to the severity of the warning or error, allowing client software to determine whether or not to accept the reply. If multiple errors occur, the exception will return a special error code, and the error message will contain a line for each error's code and description; i.e. "423: Failed to authenticate sender". If the error(s) is/are not fatal processing will not be interrupted, and the relevant properties will be populated as normal.

You should first invoke ReadReceipt when it is not known which message the receipt is in response to. This will allow you to determine the original MessageId and originator of the receipt before trying to verify it.

Copyright (c) 2022 /n software inc. - All rights reserved.
IPWorks EDI 2020 macOS Edition - Version 20.0 [Build 8203]