forked from omise/omise.js-example
-
Notifications
You must be signed in to change notification settings - Fork 0
/
example-6-multiple-language.html
70 lines (61 loc) · 2.16 KB
/
example-6-multiple-language.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Example 6: Multiple language</title>
<link rel="stylesheet" href="styles/examples.css">
<link rel="stylesheet" href="styles/custom.css">
</head>
<body>
<div class="form">
<h1>Example 6: Multiple language</h1>
<p>Create checkout button with multiple languaue.</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>
<p><button type="submit" id="checkout-button-3">Checkout Button number 3 !</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'
});
// Configuring your own custom button
OmiseCard.configureButton('#checkout-button-1', {
frameLabel: 'Merchant name',
frameDescription: 'Merchant description',
buttonLabel: 'Pay 995',
submitLabel: 'PAY RIGHT NOW !',
amount: 99500,
currency: 'usd',
locale: 'en'
});
OmiseCard.configureButton('#checkout-button-2', {
frameLabel: 'ชื่อผู้ประกอบการค้า',
frameDescription: 'รายละเอียดของผู้ประกอบการค้า',
buttonLabel: 'จ่าย 1,250',
submitLabel: 'จ่ายเลยตอนนี้',
amount: 125000,
currency: 'thb',
locale: 'th'
});
OmiseCard.configureButton('#checkout-button-3', {
frameLabel: '商人の名前',
frameDescription: '商人の説明',
buttonLabel: '支払う 15,699',
submitLabel: '支払う',
amount: 15699,
currency: 'jpy',
locale: 'ja'
});
// Then, attach all of the config and initiate it by 'OmiseCard.attach();' method
OmiseCard.attach();
</script>
</body>
</html>