I need help with HTML Component

I have updated this code on the HTML component( Wix embedded).

<script type="application/html" crossorigin="anonymous" src="{HOST}/merchantpgpui/checkoutjs/merchants/{MID}.js"onload="onScriptLoad();"></script>
<script>
function onScriptLoad(){
var config = {
"root": "",
"flow": "DEFAULT",
"data":
{"orderId": "",/* update order id */
"token": "", /* update token value */
"tokenType": "TXN_TOKEN",
"amount": "" /* update amount */
},
"handler": {
"notifyMerchant":function(eventName,data){
console.log("notifyMerchant handler function called");
console.log("eventName => ",eventName);
console.log("data => ",data);
} } };
</script>

I need to post the txn token, order id, and amount from the frontend to the HTML component.
Would you please help me with this?.
I have been trying to achieve this for the past 13hrs.

Thanks in advance.

See:
https://www.wix.com/velo/reference/$w/htmlcomponent/postmessage

Also see this:
https://support.wix.com/en/article/velo-working-with-the-html-iframe-element