-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathexample-7-location-and-billing-information.html
54 lines (46 loc) · 1.67 KB
/
example-7-location-and-billing-information.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
47
48
49
50
51
52
53
54
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Example 7: Location and billing information</title>
<link rel="stylesheet" href="styles/examples.css">
<link rel="stylesheet" href="styles/custom.css">
</head>
<body>
<div class="form">
<h1>Example 7: Location and billing information</h1>
<p>Enable settings location and billing information</p>
<div>
<!-- Create your own button -->
<p><button type="submit" id="checkout-button-1">Checkout Button number 1 !</button></p>
<p><button type="submit" id="checkout-button-2">Checkout Button number 2 !</button></p>
</div>
</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',
frameLabel: 'Merchant name',
frameDescription: 'Merchant description',
submitLabel: 'PAY RIGHT NOW !',
amount: 12345600,
});
// Configuring your own custom button
OmiseCard.configureButton('#checkout-button-1', {
location: 'yes',
buttonLabel: 'Enable location',
});
OmiseCard.configureButton('#checkout-button-2', {
buttonLabel: 'Enable billing information',
billingName: 'Omise',
billingAddress: 'Crystal Design Center 1448/4 J2 Building 206-211, Ladprao 87, Klongchan, Bangkapi, Bangkok, 10240'
});
// Then, attach all of the config and initiate it by 'OmiseCard.attach();' method
OmiseCard.attach();
</script>
</body>
</html>