Skip to content

Commit 0907aee

Browse files
paddle
1 parent f452cb0 commit 0907aee

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

resources/js/paddle.js

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
Paddle.Setup({vendor: 4062});
2+
3+
function openCheckout(id, email = null) {
4+
Paddle.Checkout.open({
5+
product: id,
6+
email: email,
7+
closeCallback: "checkoutClose",
8+
successCallback: "checkoutComplete",
9+
});
10+
}
11+
12+
$('.buy').on('click', (e) => openCheckout($(e.target).data('id')));
13+
14+
function checkoutClose() {
15+
$("#renewModal").modal('toggle')
16+
}
17+
18+
function checkoutComplete() {
19+
$("#renewModal").modal('toggle')
20+
window.location.reload()
21+
}

0 commit comments

Comments
 (0)