Created
April 27, 2021 14:25
-
-
Save ichtrojan/0c35872b06ddf6eedf14cf82c3162498 to your computer and use it in GitHub Desktop.
theater demo
This file contains 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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<title>Thepeer test</title> | |
<style> | |
.p-5 { | |
padding: 5em; | |
} | |
</style> | |
<script type="application/javascript" src="https://money.thepeer.co/send.js"></script> | |
</head> | |
<body> | |
<div class="p-5"> | |
<button id="launch-btn">Send Money with Thepeer</button> | |
</div> | |
<script type="application/javascript"> | |
let send = new ThePeer({ | |
publicKey: "{{your_public_key}}", | |
amount: {{amount_in_kobo}}, | |
userReference: "{{user_reference}}", | |
firstName: "{{user_first_name}}", | |
receiptUrl: "{{receipt_url}}", | |
onSuccess: function (response) { | |
console.log(response.event); | |
}, | |
onClose: function () { | |
console.log('user closed the widget.') | |
} | |
}); | |
send.setup(); | |
const launch = document.getElementById('launch-btn'); | |
launch.onclick = function (e) { | |
send.open(); | |
}; | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment