-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsignerpage.php
More file actions
42 lines (40 loc) · 2.16 KB
/
signerpage.php
File metadata and controls
42 lines (40 loc) · 2.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<div class="object">
<script>
HelloSign.init("<?php echo $client_id ?>");
HelloSign.open({
url: "<?php echo $sign_url ?>",
uxVersion: 2,
allowCancel: true,
// skipDomainVerification: true,
debug: true,
messageListener: function (eventData) {
("Got message data: " + JSON.stringify(eventData));
if (eventData.event == HelloSign.EVENT_SIGNED) {
HelloSign.close();
console.log(eventData.signature_id + "is the signature_id itself");
window.location = "index.php";
} else if (eventData.event == HelloSign.EVENT_CANCELED) {
alert("Event Canceled And Stuff!");
console.log(eventData);
window.location = "index.php";
} else if (eventData.event == HelloSign.EVENT_ERROR) {
alert("There Was An Error And Stuff!");
console.log(eventData);
window.location = "index.php";
} else if (eventData.event == HelloSign.EVENT_SENT) {
alert("Signature Request Sent And Stuff!");
console.log(eventData);
window.location = "index.php";
} else if (eventData.event == HelloSign.EVENT_TEMPLATE_CREATED) {
window.alert("Template id <?php echo $template_id ?> created!");
console.log(eventData);
window.location = "index.php";
} else if (eventData.event == HelloSign.EVENT_DECLINED) {
alert("Signature Request declined And Stuff!");
console.log(eventData);
window.location = "index.php";
}
}
});
</script>
</div>