Paragon PUREfac Integration Test 1
by Tommy
HTML
<link rel="stylesheet" href="https://docs.paragonsolutions.com/purefac/Version/1.0.0/main.chunk.css">
<noscript>You need to enable JavaScript to run this app.</noscript>
<div class="terms-and-conditions" data-height=200 data-width=700 data-resellerkey=1234 data-env='test'></div>
<button title="submit" id="submit-button" disabled="true">Submit</button>
<script src="https://docs.paragonsolutions.com/purefac/Version/1.0.0/chunk.js"></script>
<script src="https://docs.paragonsolutions.com/purefac/Version/1.0.0/runtime-main.js"></script>
<script src="https://docs.paragonsolutions.com/purefac/Version/1.0.0/main.chunk.js"></script>
JavaScript
function setCorrelationId(correlationId) {
// NOTE: that this correlation id will be used by integrators when
// confirming that their correlation id was used to accept terms and conditions
console.log('setCorrelationId', arguments);
}
function enableSubmitButton() {
// The idea here is that your form submit button will be
// in a disabled state until this function is called signaling
// that the terms and conditions have been accepted.
document.getElementById("submit-button").disabled = false;
console.log('enableSubmitButton', arguments);
}
function errorLoadingTermsAndConditions(error) {
// created while retrieving correlation id / terms and conditions
// it's up to the integrator at this point to decide what they want
// to do since the terms and conditions wont be displayed and a correlation
// id will not be generated.
console.log('errorLoadingTermsAndConditions', arguments);
}