Documente Academic
Documente Profesional
Documente Cultură
2C PROCESSOR USA
INFORMATION TECHNOLOGY
122 Arena Street El Segundo, CA
Utilizing the ‘Secure Form’ allows a merchant to reduce the PCI requirements of their webserver to SAQ-
A by completely hosting the payment card information collection process on 2CP’s secure servers. The
secure form returns a single use token. Once obtained, the token may be used in lieu of payment
information for a single transaction.
SecureForm.js
The SecureForm.js file is used to create a payment form within an Iframe that resides in target DIV. The
secure form supports monitoring submission of a parent form or can be submitted using an embedded
button. When both a ccApiKey and achApiKey are present, a drop down will be added to the form to
allow the user to switch between credit and echeck payment methods.
textOptions: these fields allow you to manipulate the text displayed on the form.
Field Description
ButtonHidden Setting this field to true hides the embedded
button.
ButtonText The text of the embedded submit button.
Manual Iframe Submission
The function SECCSubmitIFrame() may be called to submit the form within the Iframe from the parent
page. It does not require any parameters. This can be used as an alternative to monitoring the parent
form submission.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Sample Form</title>
<script src="https:// secureencryptionservice.com/Scripts/token/SecureForm.js"></script>
<script src="FormClient.js"></script>
</head>
<body style="background-color: aquamarine">
<form id="masterform">
<div id="maindiv">
</div>
<button type="submit" id="TestButton">Test Submit</button>
</form>
</body>
</html>
FormClient.js demonstrates setting up the secure form in javascript. Note that since the parent form ID
is provided, SecureForm.js will watch for parent form submission attempts.
FormClient.js Definition:
document.addEventListener("DOMContentLoaded", function () {
// Handler when the DOM is fully loaded
var css =
{
'FontFamily': "Verdana",
'FontSize': ".9em",
'Color': "#222222",
'BackgroundColor': "#DDDDDD",
'ButtonColor': "#DDDDDD",
'ButtonBackgroundColor': "#00DD00",
'ButtonHoverColor': "#FFFFFF",
'ButtonHoverBackgroundColor': "#008800",
'ButtonBorderColor': "#00DD00",
'InvalidColor': "#AA0000"
};
var text =
{
'ButtonText': "Pay Now",
'ButtonHidden': true
};
SECCInitializeSecureForm("asohasdj2", "iksjhdfkjhs", "maindiv", "masterform", 400,
css, text);
});