Created
November 11, 2015 22:27
-
-
Save dergachev/1fda5cae9b11dcce9202 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name = "EW Hellosign" | |
description = "Test Hellosign integration" | |
package = "Custom" | |
core = 7.x |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function ew_hellosign_menu() { | |
$items['hellosign'] = array( | |
'page callback' => 'ew_hellosign_callback', | |
'access arguments' => array('access content'), | |
); | |
$items['hellosign_form'] = array( | |
'page callback' => 'ew_hellosign_form', | |
'access arguments' => array('access content'), | |
); | |
return $items; | |
} | |
# TODO: verify that its actually hellosign before doing anything with the data | |
function ew_hellosign_callback() { | |
return "Hello API Event Received"; | |
} | |
function ew_hellosign_form() { | |
return ' | |
<script type="text/javascript" src="//s3.amazonaws.com/cdn.hellofax.com/js/embedded.js"></script> | |
<script type="text/javascript"> | |
HelloSign.init("713ee2392751e9ee9ded47e74913a9db"); | |
HelloSign.open({ | |
url: "https://www.hellosign.com/editor/embeddedSign?signature_id=10b57d1fb9ae6f2a5e50e79dfaea7178&token=32feb3e05339bfb15502c25991c01472", | |
allowCancel: true, | |
messageListener: function(eventData) { | |
alert("HelloSign event received"); | |
console.log(eventData); | |
} | |
}); | |
</script>'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment