/n software 3-D Secure V2 Python Edition

Questions / Feedback?

get_method_data Method

Prepares method data to be sent to the ACS before the authentication request is sent.

Syntax

def get_method_data() -> str: ...

Remarks

The get_method_data method prepares data to be transmitted to the ACS via the cardholder's browser.

When a transaction begins, the card range cache should be queried to find details about the card range to which the card number belongs. If a card_range_method_url is defined for the card range, this method should be used to prepare data to be sent via the cardholder's browser to the card_range_method_url.

If the card_range_method_url is not set for the specified card range, set MethodCompletionIndicator to U before calling send_auth_request.

The following properties are applicable when calling this method:

This method returns a string which contains encoded data to be sent to the ACS. This includes server_transaction_id and method_notification_url. After calling this method, the returned string can be transmitted to the ACS via the cardholder's browser.

As per the EMVCo specification, create a hidden iframe in the browser and send a form with the field name threeDSMethodData containing the return value from this method and post the form to the card_range_method_url.

The ACS will record information about the customer's environment and then POST back to the method_notification_url. The page at this URL should expect a form variable with the name threeDSMethodData which will contain the original server_transaction_id value in order to match the response with the request. The form variable value will be base64url encoded and may be passed directly to the check_response method. The class will decode and parse the received value and populate server_transaction_id with the value from the received data.

If the response from the ACS is not received within 10 seconds, set MethodCompletionIndicator to N before calling send_auth_request.

Copyright (c) 2022 /n software inc. - All rights reserved.
/n software 3-D Secure V2 Python Edition - Version 2.2 [Build 8318]