Skip to content

Commit

Permalink
subscribe work
Browse files Browse the repository at this point in the history
  • Loading branch information
hyperknot committed Jan 18, 2024
1 parent c30891a commit c9ffae4
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 5 deletions.
30 changes: 30 additions & 0 deletions website/assets/subscribe.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
const ITEM_ID = 'pro_01hmetcfzgwtjb75msm8sr8snn'

Paddle.Setup({
token: 'live_69ccb2c84631cfdc44e78975c88',
eventCallback: function (data) {
console.log(data)
},
checkout: {
settings: {
displayMode: 'inline',
frameTarget: 'checkout-container',
// frameInitialHeight: "450",
// frameStyle: "width: 100%; min-width: 312px; background-color: transparent; border: none;"
},
},
})

Paddle.Checkout.open({
settings: {
displayMode: 'inline',
frameTarget: 'checkout-container',
// frameInitialHeight: "450",
// frameStyle: "width: 100%; min-width: 312px; background-color: transparent; border: none;"
},
items: [
{
priceId: ITEM_ID,
},
],
})
1 change: 1 addition & 0 deletions website/generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ def copy_assets():
'style.css',
'map_howto.js',
'support_plans.js',
'subscribe.js',
'logo.jpg',
'favicon.ico',
'github.svg',
Expand Down
8 changes: 3 additions & 5 deletions website/subscribe.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,12 @@
<title>OpenFreeMap subscribe</title>
<link rel="stylesheet" href="style.css" />
<script src="https://cdn.paddle.com/paddle/v2/paddle.js"></script>
<script type="text/javascript">
Paddle.Setup({
token: 'live_69ccb2c84631cfdc44e78975c88',
})
</script>

</head>

<body>
<h1>OpenFreeMap subscribe</h1>
<div class="checkout-container"></div>
<script src="subscribe.js"></script>
</body>
</html>

0 comments on commit c9ffae4

Please sign in to comment.