Working with 3D Secure
To use 3D Secure with SHC, you need to pass three (3) additional properties in the options argument:
- purchaseAmount: A number (not a string) representing the purchase cost denominated in cents. For example, $100 would be
10000. - purchaseDate: A string containing the timestamp representing when the purchase took place using the ISO 8601 format (
YYYY-MM-DDTHH:mm:ss.sssZ) - purchaseCurrency: A string containing the ISO 4217 currency code that the transaction is in. Currently, only Canadian dollars (
CAD) are supported.
Calling SHC with the 3D Secure arguments would be similar to the following example:
- const options = { purchaseAmount: amountAsInteger, purchaseDate: new Date().toISOString(), purchaseCurrency: 'CAD' }; merchantGetShcToken(shcToken => { shc(shcToken, response => merchantProcessResponse(response), options); });
Automatic Addition of Additional Required Fields
When using 3D Secure, the PayFacto API will automatically include any additional required fields necessary to process a 3D Secure transaction. There is no additional coding required to display these fields for any card brand using 3D Secure.