Returns the Payer Authentication Request packet that is to be sent to the ACS.
public func getAuthenticationPacket() throws -> String
This method builds the Payer Authentication Request (PAReq) message from the data contained in the class's properties. The message is then compressed, encoded, and returned by this method. This packet should then be sent to the URL of the Access Control Server (ACS), stored in the ACSURL property.
The TermUrl is the location of a page that will handle the rest of the ordering process. The Visa Access Control Server will post back to the URL entered in this field with the results of the Payer Authentication Request. The MD field should contain any additional information needed by the merchant to complete the transaction. This may include information such as a TransactionId, MessageId, or any other data needed to match the response with a pending authentication. This may be raw text, XML, or any other data type. It is not recommended that sensitive data such as a CardNumber be contained in this field. If this is unavoidable, such sensitive data must be encrypted.
The response to the PAReq, the PARes, will be posted to the TermUrl that you send to the ACS as shown in the example above. At that time you can use CheckAuthenticationResponse to verify the response signature and parse the response.
Error Handling (C++)
This method returns a String value; after it returns, call the GetLastErrorCode() method to obtain its result code; 0 indicates success, while a non-zero error code indicates that this method encountered an error during its execution. If an error occurs, the GetLastError() method can be called to retrieve the associated error message.