Help with Web Component POST

I have a PHP script of a payment gateway (Cashfree). In this script, there are some variables such as: appId, orderId, orderAmount, orderCurrency, etc and also the details of the customer who is paying money. I have uploaded this script into my server. Now I want to provide the data in all the variables from my app using Post Text. But I am not able to figure it out. Can someone help me with this?

Here is the script:

<!DOCTYPE html>
  <title>Cashfree - Signature Generator</title>
  <meta name="viewport" content="width=device-width, initial-scale=1">

<body onload="document.frm1.submit()">

$mode = "TEST"; //<------------ Change to TEST for test server, PROD for production

  $secretKey = "TEST974175fd587548b3ff8a3b2648f6bf";
  $postData = array( 
  "appId" => $appId, 
  "orderId" => $orderId, 
  "orderAmount" => $orderAmount, 
  "orderCurrency" => $orderCurrency, 
  "orderNote" => $orderNote, 
  "customerName" => $customerName, 
  "customerPhone" => $customerPhone, 
  "customerEmail" => $customerEmail,
  "returnUrl" => $returnUrl, 
  "notifyUrl" => $notifyUrl,
$signatureData = "";
foreach ($postData as $key => $value){
    $signatureData .= $key.$value;
$signature = hash_hmac('sha256', $signatureData, $secretKey,true);
$signature = base64_encode($signature);

if ($mode == "PROD") {
  $url = "";
} else {
  $url = "";

  <form action="<?php echo $url; ?>" name="frm1" method="post">
      <p>Please wait.......</p>
      <input type="hidden" name="signature" value='<?php echo $signature; ?>'/>
      <input type="hidden" name="orderNote" value='<?php echo $orderNote; ?>'/>
      <input type="hidden" name="orderCurrency" value='<?php echo $orderCurrency; ?>'/>
      <input type="hidden" name="customerName" value='<?php echo $customerName; ?>'/>
      <input type="hidden" name="customerEmail" value='<?php echo $customerEmail; ?>'/>
      <input type="hidden" name="customerPhone" value='<?php echo $customerPhone; ?>'/>
      <input type="hidden" name="orderAmount" value='<?php echo $orderAmount; ?>'/>
      <input type ="hidden" name="notifyUrl" value='<?php echo $notifyUrl; ?>'/>
      <input type ="hidden" name="returnUrl" value='<?php echo $returnUrl; ?>'/>
      <input type="hidden" name="appId" value='<?php echo $appId; ?>'/>
      <input type="hidden" name="orderId" value='<?php echo $orderId; ?>'/>

Also, is the script setup properly?

you can post value like this /test/demo_form.php?name1=value1&name2=value2

1 Like

Thanks for replying. Can you show me this in blocks please? I am not able to understand

I have not used this in my application, I have used this in php script in to send notification and to add a dynamic link in notification

I have also added the payment method in one my app, this will help u

1 Like

Searching now about This subject …

+50 Results about …

Did You Search ?

There are many examples here in this amazing community .

Look :point_down:


You are too good you learned me about api 1 year back :blush:

1 Like

@Rogerio_Rios you learned me an I tried a lot of api and now working on crypto app :sweat_smile:

Also if you learn me schema template it will be good