-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathdev.html
186 lines (174 loc) · 9.59 KB
/
dev.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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="icon" type="image/png" href="https://depay.com/favicon.png"/>
<title>Development</title>
<script src="https://cdn.ethers.io/lib/ethers-5.7.umd.min.js" type="application/javascript"></script>
<script crossorigin src="https://unpkg.com/react@18/umd/react.development.js"></script>
<script crossorigin src="https://unpkg.com/react-dom@18/umd/react-dom.development.js"></script>
<script crossorigin src="https://unpkg.com/@depay/react-shadow-dom@5"></script>
<script crossorigin src="https://unpkg.com/@depay/web3-blockchains@9"></script>
<script src="https://integrate.depay.com/widgets/v12.js"></script>
<script src="tmp/index.dev.js"></script>
<link rel="stylesheet" href="https://unpkg.com/bootstrap@5/dist/css/bootstrap.css">
<style>
.btn-primary {
color: #fff;
background-color: #ea357a !important;
border: 1px solid #ea357a !important;
padding: 0.35rem 1.2rem !important;
box-shadow: none;
outline: none;
}
.btn-primary:hover {
background-color: #db3071 !important;
}
</style>
</head>
<body style="background-color: #FAFAFA;">
<div class="container py-4">
<div class="py-2 pb-3 text-center">
<a href="https://depay.com" target="_blank">
<img alt="DePay" class="navbar-logo shadow-sm" src="https://depay.com/logo.svg" style="height: 50px; width: 50px; border-radius: 999px;"/>
</a>
</div>
<div class="row px-2">
<div class="d-block d-md-inline-block p-2 col-12 col-md-4">
<div class="px-0 py-4 rounded-lg border bg-white">
<div class="col px-0">
<div class="overflow-auto" style="height: 80px;">
<h5 class="px-4">Button: Managed Payment</h5>
</div>
<div class="px-4 pb-3">
<div class="DePayButton" label="Pay" integration="a1122dbc-52b3-4a35-88fd-4addf61c5d5e" payload='{ "somethign": "toForward" }' blockchains='["ethereum", "bsc", "polygon"]'></div>
</div>
</div>
</div>
</div>
<div class="d-block d-md-inline-block p-2 col-12 col-md-4">
<div class="px-0 py-4 rounded-lg border bg-white">
<div class="col px-0">
<div class="overflow-auto" style="height: 80px;">
<h5 class="px-4">Button: Managed Donation</h5>
</div>
<div class="px-4 pb-3">
<div class="DePayButton" label="Donate" integration="151ce302-d2b1-47cb-976f-bd6e310296ff" payload='{ "somethign": "toForward" }' blockchains='["ethereum", "bsc", "polygon"]'></div>
</div>
</div>
</div>
</div>
<div class="d-block d-md-inline-block p-2 col-12 col-md-4">
<div class="px-0 py-4 rounded-lg border bg-white">
<div class="col px-0">
<div class="overflow-auto" style="height: 80px;">
<h5 class="px-4">Button: Managed Tip</h5>
</div>
<div class="px-4 pb-3">
<div class="DePayButton" label="Tip" integration="c20c15d0-5b66-4e28-aa55-2eb00c9288d3" payload='{ "somethign": "toForward" }' blockchains='["ethereum", "bsc", "polygon"]'></div>
</div>
</div>
</div>
</div>
<div class="d-block d-md-inline-block p-2 col-12 col-md-4">
<div class="px-0 py-4 rounded-lg border" style="background: grey">
<div class="col px-0">
<div class="overflow-auto" style="height: 80px;">
<h5 class="px-4">Button: Donate</h5>
</div>
<div class="px-4 pb-3">
<div class="DePayButton" label="Donate" widget="Donation" configuration='{ "accept": [{ "blockchain": "ethereum", "token": "0xa0bEd124a09ac2Bd941b10349d8d224fe3c955eb", "receiver": "0x4e260bB2b25EC6F3A59B478fCDe5eD5B8D783B02" }, { "blockchain": "bsc", "token": "0xa0bEd124a09ac2Bd941b10349d8d224fe3c955eb", "receiver": "0x4e260bB2b25EC6F3A59B478fCDe5eD5B8D783B02" }] }'></div>
</div>
</div>
</div>
</div>
<div class="d-block d-md-inline-block p-2 col-12 col-md-4">
<div class="px-0 py-4 rounded-lg bg-white border">
<div class="col px-0">
<div class="overflow-auto" style="height: 80px;">
<h5 class="px-4"></h5>
</div>
<div class="px-4 pb-3">
<div class="DePayButton" label="Pay" widget="Payment" configuration='{"accept":[{"blockchain":"polygon","amount":1,"token":"0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174","receiver":"0x08B277154218CCF3380CAE48d630DA13462E3950"},{"blockchain":"bsc","amount":1,"token":"0xe9e7CEA3DedcA5984780Bafc599bD69ADd087D56","receiver":"0x08B277154218CCF3380CAE48d630DA13462E3950"},{"blockchain":"ethereum","amount":1,"token":"0x6B175474E89094C44Da98b954EedeAC495271d0F","receiver":"0x08B277154218CCF3380CAE48d630DA13462E3950"},{"blockchain":"optimism","amount":1,"token":"0x94b008aA00579c1307B0EF2c499aD98a8ce58e58","receiver":"0x08B277154218CCF3380CAE48d630DA13462E3950"},{"blockchain":"arbitrum","amount":1,"token":"0xFd086bC7CD5C481DCC9C85ebE478A1C0b69FCbb9","receiver":"0x08B277154218CCF3380CAE48d630DA13462E3950"},{"blockchain":"gnosis","amount":1,"token":"0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE","receiver":"0x08B277154218CCF3380CAE48d630DA13462E3950"},{"blockchain":"fantom","amount":1,"token":"0x28a92dde19D9989F39A49905d7C9C2FAc7799bDf","receiver":"0x08B277154218CCF3380CAE48d630DA13462E3950"},{"blockchain":"base","amount":1,"token":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","receiver":"0x08B277154218CCF3380CAE48d630DA13462E3950"}]}'></div>
</div>
</div>
</div>
</div>
<div class="d-block d-md-inline-block p-2 col-12 col-md-4">
<div class="px-0 py-4 rounded-lg bg-white border">
<div class="col px-0">
<div class="overflow-auto" style="height: 80px;">
<h5 class="px-4">Button: Buy</h5>
</div>
<div class="px-4 pb-3">
<div class="DePayButton" label="Buy" widget="Sale" configuration='{ "sell": { "ethereum": "0xa0bEd124a09ac2Bd941b10349d8d224fe3c955eb" } }'></div>
</div>
</div>
</div>
</div>
<div class="d-block d-md-inline-block p-2 col-12 col-md-4">
<div class="px-0 py-4 rounded-lg bg-white border">
<div class="col px-0">
<div class="overflow-auto" style="height: 80px;">
<h5 class="px-4">Button: css</h5>
</div>
<div class="px-4 pb-3">
<div class="DePayButton" css="button { background: green; border-radius: 0.4rem; }" label="Pay" widget="Payment" configuration='{"accept":[{"blockchain":"ethereum","amount":20,"token":"0xa0bEd124a09ac2Bd941b10349d8d224fe3c955eb","receiver":"0x4e260bB2b25EC6F3A59B478fCDe5eD5B8D783B02"}]}'></div>
</div>
</div>
</div>
</div>
<div class="d-block d-md-inline-block p-2 col-12 col-md-4">
<div class="px-0 py-4 rounded-lg bg-white border">
<div class="col px-0">
<div class="overflow-auto" style="height: 80px;">
<h5 class="px-4">Button: render with React</h5>
</div>
<div class="px-4 pb-3">
<div id="renderInto"></div>
<script>
let root = DePayButtons.createRoot(document.getElementById('renderInto'))
root.render(React.createElement(DePayButtons.DePayButton, {
label: 'Pay',
widget: 'Payment',
configuration: {"accept":[{"blockchain":"ethereum","amount":20,"token":"0xa0bEd124a09ac2Bd941b10349d8d224fe3c955eb","receiver":"0x4e260bB2b25EC6F3A59B478fCDe5eD5B8D783B02"}]}
}))
setTimeout(()=>{
console.log('RERENDER')
root.render(React.createElement(DePayButtons.DePayButton, {
label: 'Pay Up',
widget: 'Payment',
configuration: {"accept":[{"blockchain":"ethereum","amount":20,"token":"0xa0bEd124a09ac2Bd941b10349d8d224fe3c955eb","receiver":"0x4e260bB2b25EC6F3A59B478fCDe5eD5B8D783B02"}]}
}))
}, 2000)
</script>
</div>
</div>
</div>
</div>
<div class="d-block d-md-inline-block p-2 col-12 col-md-4">
<div class="px-0 py-4 rounded-lg bg-white border">
<div class="col px-0">
<div class="overflow-auto" style="height: 80px;">
<h5 class="px-4">Button: render integration with React</h5>
</div>
<div class="px-4 pb-3">
<div id="renderIntegrationInto"></div>
<script>
let rootIntegration = DePayButtons.createRoot(document.getElementById('renderIntegrationInto'))
rootIntegration.render(React.createElement(DePayButtons.DePayButton, {
integration: "a1122dbc-52b3-4a35-88fd-4addf61c5d5e",
payload: { "somethign": "toForward" },
blockchains: ['ethereum', 'bsc', 'polygon']
}))
</script>
</div>
</div>
</div>
</div>
</div>
</div>
<script>DePayButtons.init({document: document});</script>
</body>
</html>