I need an expert in javascript to help me with a piece of code. Basically i need to generate a uuidv4 and pass it to the tx_ref parameter in makePayment function please see both functions below it needs to be done dynamically everytime the page loads.
function uuidv4() {
return ([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g, c =>
(c ^ [login to view URL](new Uint8Array(1))[0] & 15 >> c / 4).toString(16)
);
}
[login to view URL](uuidv4());
<script src="[login to view URL]"></script>
<form>
<div>
Your order is ₦54,600
</div>
<button type="button" id="start-payment-button" onclick="makePayment()">Pay Now</button>
</form>
<script>
function makePayment() {
FlutterwaveCheckout({
public_key: "FLWPUBK_TEST-SANDBOXDEMOKEY-X",
tx_ref: "titanic-48981487343MDI0NzMx",
amount: 54600,
currency: "NGN",
payment_options: "card, banktransfer, ussd",
redirect_url: "[login to view URL]",
meta: {
consumer_id: 23,
consumer_mac: "92a3-912ba-1192a",
},
customer: {
email: "[login to view URL]",
phone_number: "08102909304",
name: "Rose DeWitt Bukater",
},
customizations: {
title: "The Titanic Store",
description: "Payment for an awesome cruise",
logo: "[login to view URL]",
},
});
}
</script>
Hi greetings of the day I am a Experienced Full Stack Developer based out in Chennai,India.
I am Ready to start now.
Thanking you, All the very best, Cheers!!! Saurav
$25 USD in 1 day
4.9 (108 reviews)
6.0
6.0
5 freelancers are bidding on average $40 USD for this job
Hello,
I read your project description. I am ready to start working quickly on your project.
I look forward to your response to discuss this work immediately ...
I am an experienced web developer and I can work with your needs. I have 4+ years of experience and you can see the portfolio in my profile.
Thanks.
Dear Client!
I am available for your project, and can start immediately.
I’ve previously worked on the exact same type of projects for another client.
I have read carefully about your job description and I am now confident to do this. I can even complete your projects more quickly than the others with better qualification.
When do you need this finished?
My skills are necessary for your project. To know me more, please see my profile.
I want you to talk with me soon about your projects through Freelancer Chat.
Please initiate the chat so we can have a detailed discussion.
Looking forward to hearing for you.
Thank you!
Best regards.
Hello, Greetings!
I am familiar with Vue, React and Angular and I have a lot of work experiences in jQuery / Prototype, HTML5, HTML and JavaScript.
I can start right away. I want to discuss for this project in detail.
Please contact me to discuss more about this project.
If you have any questions, please let us know