To Setup Arrow on Client Side, one must follow the mentioned steps:
1. Add Arrow Merchant Javascript
Add the Arrow Merchant Javascript shown below to your website following the code.
<!-- Arrow Merchant JS -->
<script type="text/javascript" src="https://shop.witharrow.co/cdn/arrow.js"></script>
<!-- jQuery Library . if already added dont add it again-->
<script src="https://code.jquery.com/jquery-3.5.1.min.js"
integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0="
crossorigin="anonymous"></script>
2. Get the Order Token from the server-side.
To get the Order Token, you must Implement the Arrow Init API and store the Order token generated from the success response which would look something like this:
{
"success": 1,
"message": "temporary order successfully created",
"data": {
"token": "5233888050537f71275f4d12987032e2eb6c8701e736729019c667a8559aa230328b12fc88ee4892d0fa70d0402953cc06b91a6ba99d9165d1e869aa3993bf0c"
}
}