btcp-widget/shop.html

35 lines
1.2 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Matts Pizza Shop</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<body style="font-family: Arial">
<img src="/assets/images/pizza.png" style="width: 100%; max-width: 600px"><br><br>
<b>Matts's Pepperoni Pizza Shop. A whole pizza, just 0.1 BTCP!</b><br><br>
<span style="font-size: 18px; font-weight: bold; color: #b00">Warning: Live transactions, will take real BTCP payment!</span><br><br>
<script id="btcp_widget_data">
var btcpWidget = {};
btcpWidget.data = {
"id" : "btcp_widget",
"address" : "b1BpgPewXjPLLSVh8Rh2gAJniAfp7PgXjKg",
"amount" : 0.1,
"description" : "Pepperoni Pizza"
};
btcpWidget.onPaymentSuccess = function(data) {
alert("Payment success! Data:\n\n" + JSON.stringify(data));
};
btcpWidget.onPaymentFail = function(data) {
alert("Payment failed! Reason: " + data.reason);
}
</script>
<script src="https://mattpass.com/lab/widget.js" id="btcp_widget"></script>
</body>
</html>