Migrating to XPay SDK v4
1. For Vanilla JavaScript
Simply update the script tag you included earlier:
- Staging:
html
<script src="https://js.xstak.com/v4/xpay-stage.js"></script>- Production:
html
<script src="https://js.xstak.com/v4/xpay.js"></script>2. For React / Vue.js (via NPM package)
Update the NPM package and also replace the script in your index.html file.
- Staging:
bash
npm i @xstak/xpay-element-stage-v4html
<script src="https://js.xstak.com/v4/xpay-stage.js"></script>- Production:
bash
npm i @xstak/xpay-element-live-v4html
<script src="https://js.xstak.com/v4/xpay.js"></script>Even if you are using React/Vue with the NPM package, the script in index.html must be updated as well.