{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"3D Secure Process","description":"Developer documentation for the WHMCS API — the","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"3d-secure-process","__idx":0},"children":["3D Secure Process"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If the merchant gateway supports 3D Secure (also known as Verified by Visa or MasterCard Secure Code), then it can be utilized within WHMCS."]},{"$$mdtype":"Tag","name":"ol","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Add a function to the module named ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["yourgatewayname_3dsecure"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["Return the HTML for the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["<form>"]}]}," post method to take the user to the 3D Secure process."," ","An example of this is below:"]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["_3dsecure"]}," function is passed all the same ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/payment-gateways/merchant-gateway#variables","title":"Merchant Gateway Variables"},"children":["variables"]}," that the ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["_capture"]}," function is."," ","The return url should be a ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/payment-gateways/callbacks","title":"Callback Files"},"children":["callback file"]}," to handle the response."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"example-function","__idx":1},"children":["Example Function"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"<?php\nfunction yourgatewayname_3dsecure(array $params = array()) {\n    return '<form method=\"post\" action=\"https://www.gateway.com/3dsecure/\">\n<input type=\"hidden\" name=\"gwlogin\" value=\"' . $params[\"loginid\"] . '\" />\n<input type=\"hidden\" name=\"invoiceid\" value=\"' . $params[\"invoiceid\"] . '\" />\n<input type=\"hidden\" name=\"amount\" value=\"' . $params[\"amount\"] . '\" />\n<input type=\"hidden\" name=\"firstname\" value=\"' . $params[\"clientdetails\"][\"firstname\"] . '\" />\n<input type=\"hidden\" name=\"lastname\" value=\"' . $params[\"clientdetails\"][\"lastname\"] . '\" />\n<input type=\"hidden\" name=\"address\" value=\"' . $params[\"clientdetails\"][\"address1\"] . '\" />\n<input type=\"hidden\" name=\"city\" value=\"' . $params[\"clientdetails\"][\"city\"] . '\" />\n<input type=\"hidden\" name=\"state\" value=\"' . $params[\"clientdetails\"][\"state\"] . '\" />\n<input type=\"hidden\" name=\"postcode\" value=\"' . $params[\"clientdetails\"][\"postcode\"] . '\" />\n<input type=\"hidden\" name=\"country\" value=\"' . $params[\"clientdetails\"][\"country\"] . '\" />\n<input type=\"hidden\" name=\"phonenumber\" value=\"' . $params[\"clientdetails\"][\"phonenumber\"] . '\" />\n<input type=\"hidden\" name=\"email\" value=\"' . $params[\"clientdetails\"][\"email\"] . '\" />\n<input type=\"hidden\" name=\"ccnumber\" value=\"' . $params[\"cardnum\"] . '\" />\n<input type=\"hidden\" name=\"expirymonth\" value=\"' . substr($params['cardexp'], 0, 2) . '\" />\n<input type=\"hidden\" name=\"expiryyear\" value=\"' . substr($params['cardexp'], 2, 2) . '\" />\n<input type=\"hidden\" name=\"cvv2\" value=\"' . $params[\"cccvv\"] . '\" />\n<input type=\"hidden\" name=\"return_url\" value=\"' . $params['systemurl'] . '/modules/gateways/callback/yourgatewayname.php\" />\n<noscript>\n<div class=\"errorbox\"><b>JavaScript is currently disabled or is not supported by your\nbrowser.</b><br />Please click the continue button to proceed with the processing of your\ntransaction.</div>\n<p align=\"center\"><input type=\"submit\" value=\"Continue >>\" /></p>\n</noscript>\n</form>';\n}\n"},"children":[]}]},"headings":[{"value":"3D Secure Process","id":"3d-secure-process","depth":1},{"value":"Example Function","id":"example-function","depth":2}],"frontmatter":{"title":"3D Secure Process","seo":{"title":"3D Secure Process"}},"lastModified":"2026-08-03T17:00:42.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/payment-gateways/3d-secure","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}