I am integrating Postpay payment system with my web application by adding JS code to the HTML page, but nothing works.
Here is the code I need to integrate:
<script>
window.postpayAsyncInit = function() {
postpay.init({
merchantId: '{merchantId}',
sandbox: true,
theme: 'light',
locale: 'en'
});
};
</script>
<script async src="https://cdn.postpay.io/v1/js/postpay.js"></script>
I used this tutorial.
I'm a backender and don't know JS, nothing works for me. How can I get this to work?
This is the console output, there are 2 exceptions:
If the first script relies on the script from the cdn link, the latter should be placed first in order like below:
<script async src="https://cdn.postpay.io/v1/js/postpay.js"></script>
<script>
window.postpayAsyncInit = function() {
postpay.init({
merchantId: '{merchantId}',
sandbox: false,
theme: 'light',
locale: 'en'
});
};
</script>