I have intrgrated paddle billing api in Laravel , It working fine in sandbox but in live it return errors.
enter image description here
This is my code
<script src="https://cdn.paddle.com/paddle/v2/paddle.js"></script>
<script>
Paddle.Environment.set("live"}");
Paddle.Initialize({
token: "{{ $data['client_key'] }}",
eventCallback: function(data) {
switch (data.name) {
case "checkout.completed":
let success_url = "{{ $data['return_url'] }}?paddle_order_id=" + data.data
.transaction_id;
window.location.href = success_url;
break;
case "checkout.closed":
window.location.href = "{{ $data['cancel_url'] }}";
break;
}
}
});
let settings = {
displayMode: "overlay",
theme: "light",
locale: "en",
showAddDiscounts: false
};
Paddle.Checkout.open({
settings: settings,
transactionId: "{{ $data['transaction_id'] }}",
});
</script>
How to fix this issue ?
New contributor
kousar Rahman is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.