Add payment form
1
<div id="payment-form"></div>2
<script src="https://gateway-sb.clearent.net/js-sdk/js/clearent-host.js"></script> code3
<script type="text/javascript">
// When you get a successful token response and
// use this to make a sale/auth on your backend
function ClearentTokenSuccess(raw, json) {
console.log("ClearentTokenSuccess");
console.log(raw);
console.log(json);
// now you can send the token to your server
// to complete the transaction via mobile-gateway
}
function ClearentTokenError(raw, json) {
console.log("ClearentTokenError");
console.log(raw);
console.log(json);
}
</script>java4
<script type="text/javascript">
ClearentSDK.init({
"baseUrl": "https://gateway-sb.clearent.net",
"pk": "YOUR PUBLIC KEY GOES HERE"
});
</script>Last updated
Was this helpful?

