Last active
August 29, 2015 14:05
-
-
Save matsubo/0bc17084b8d4d209d2f4 to your computer and use it in GitHub Desktop.
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="ja"> | |
<head> | |
<meta charset="utf-8"> | |
<title>Sample Page</title> | |
<meta name="author" content="Yuki Matsukura"> | |
</head> | |
<body> | |
<form> | |
<button id="customButton">Open</button> | |
</form> | |
<div id="message"></div> | |
<script src="https://ajax.googleapis.com/ajax/libs/prototype/1.7.2.0/prototype.js"></script> | |
<script src="http://0.0.0.0:3000/assets/v1/checkout.js"></script> | |
<script> | |
// SPIKE Checkoutのインスタンスを生成する | |
var handler = SpikeCheckout.configure({ | |
key: "pk_test_WTBJorIdHmQtCkgBBx9n6W1a", | |
token: function(token, args) { | |
}, | |
opened: function(e) { | |
console.debug("Window opened event."); | |
}, | |
closed: function(e) { | |
console.debug("Window closed event."); | |
} | |
}); | |
// カード情報を入力するオーバーレイを開く処理 | |
document.getElementById("customButton").addEventListener("click", function(e) { | |
handler.open({ | |
name: "オンラインショップ", | |
amount: 900, | |
currency: "JPY", | |
email: "foo@example.com", | |
}); | |
e.preventDefault(); | |
}); | |
</script> | |
<script> | |
$('message').innerHTML = 'text from prototype'; | |
</script> | |
</body> | |
</html> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment