Skip to content

Instantly share code, notes, and snippets.

@csuwildcat
Last active January 4, 2016 06:29
Show Gist options
  • Select an option

  • Save csuwildcat/8582556 to your computer and use it in GitHub Desktop.

Select an option

Save csuwildcat/8582556 to your computer and use it in GitHub Desktop.
var activity = new MozActivity({
name: "crypto-payment",
data: {
type: "bitcoin",
price: "0.50",
currency: "USD",
wallet: "1CC3X2gu58d6wXUWMffpuzN9JAfTUWu4Kj",
callback: "https://somegame.com/reciepts.html"
}
});
activity.onsuccess = function() {
var reciept = this.result;
console.log("Here is the reciept for your purchase:", reciept);
};
activity.onerror = function() {
console.log("Your purchase could not be processed:", this.error);
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment