<!DOCTYPE html>
<html>
<head>
<title>BlockATM 集成示例</title>
<style>
#blockatm-container {
min-height: 400px;
width: 100%;
max-width: 500px;
}
</style>
</head>
<body>
<h1>加密货币支付</h1>
<div id="blockatm-container"></div>
<script src="https://pay.blockatm.net/libs/v2/BlockATM.umd.js?apiKey=YOUR_API_KEY"></script>
<script>
window.BlockATM.init(
document.getElementById('blockatm-container'),
{
cashierId: 'YOUR_CASHIER_ID',
orderNo: 'ORDER_' + Date.now(),
amount: '100',
symbol: 'USDT',
chainId: 'TRON',
lang: 'zh-CN',
callback: function(result) {
if (result.type === 'finish') {
console.log('支付成功!', result.data);
} else if (result.type === 'cancel') {
console.log('用户取消');
}
}
}
);
</script>
</body>
</html>