forked from omise/omise.js-example
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexample-3-custom-integration.html
executable file
·46 lines (37 loc) · 1.25 KB
/
example-3-custom-integration.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
36
37
38
39
40
41
42
43
44
45
46
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Example 3: Custom integration</title>
<link rel="stylesheet" href="styles/examples.css">
<link rel="stylesheet" href="styles/custom.css">
</head>
<body>
<div class="form">
<h1>Example 3: Custom integration</h1>
<p>Create a checkout button by uses custom integration way to integrate.</p>
<form name="checkoutForm" method="POST" action="checkout.php">
<!-- Create your own button -->
<button type="submit" id="checkout-button-1">My Checkout Button !</button>
</form>
</div>
<!-- Include card.js library -->
<script type="text/javascript" src="https://cdn.omise.co/omise.js"></script>
<!-- Config the card.js library -->
<script type="text/javascript">
// Set default parameters
OmiseCard.configure({
publicKey: 'YOUR_PUBLIC_KEY',
image: 'https://cdn.omise.co/assets/dashboard/images/omise-logo.png',
amount: 99500
});
// Configuring your own custom button
OmiseCard.configureButton('#checkout-button-1', {
frameLabel: 'Merchant name',
submitLabel: 'PAY RIGHT NOW !',
});
// Then, attach all of the config and initiate it by 'OmiseCard.attach();' method
OmiseCard.attach();
</script>
</body>
</html>