-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathcheckout.html
35 lines (30 loc) · 1.19 KB
/
checkout.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Rapyd Checkout Toolkit</title>
<script src="https://checkouttoolkit.rapyd.net"></script>
<script src="https://sandboxcheckouttoolkit.rapyd.net"></script>
<script>
window.onload = function () {
let checkout = new RapydCheckoutToolkit({
pay_button_text: "Click to pay",
pay_button_color: "blue",
id: "checkout_ee7a8f2ca3c803d1e31598f8b1977bc5"
});
checkout.displayCheckout();
}
window.addEventListener('onCheckoutPaymentSuccess', function (event) {
console.log(event.detail)
});
window.addEventListener('onCheckoutFailure', function (event) {
console.log(event.detail.error)
});
</script>
</head>
<body style="background-color: #f1f1f1; display: flex; align-items: center; flex-direction: column; margin: 0">
<h1>Rapyd Checkout Toolkit Demo</h1>
<div style="width: 500px" id="rapyd-checkout"></div>
</body>
</html>