REST api HTML respone

REST api HTML respone

  
Hi!

I'm trying to create an intergration with a Dutch paymentprovider called omnikassa.
This I've done in ASP.net and is easally done. This is the code used for sending a payment request:

protected void BtnPayButtonClick(object sender, EventArgs e)
{
// combine data
string data = String.Format("merchantId={0}", MerchantId)
 + String.Format("|orderId={0}", tbOrderId.Text)
 + String.Format("|amount={0}", tbAmount.Text)
 + String.Format("|customerLanguage={0}", LanguageCode)
 + String.Format("|keyVersion={0}", SecurityKeyVersion)
 + String.Format("|currencyCode={0}", CurrencyCode)
 // + String.Format("|PaymentMeanBrandList={0}", "IDEAL")
 + String.Format("|normalReturnUrl={0}", tbReturnUrl.Text)
 + String.Format("|automaticResponseUrl={0}", tbAutomaticResponseUrl.Text)
 + String.Format("|transactionReference={0}", tbOrderId.Text + "x" + DateTime.Now.ToString("hhmmss"));
 
 
// calculate seal
SHA256 sha256 = SHA256.Create();
byte[] hashValue = sha256.ComputeHash(new UTF8Encoding().GetBytes(data + SecurityKey));
 
 
// new postData
NameValueCollection postData = new NameValueCollection();
postData.Add("Data", data);
postData.Add("Seal", ByteArrayToHexString(hashValue));
postData.Add("InterfaceVersion", "HP_1.0");
 
 
// Post data 
byte[] response;
using (WebClient client = new WebClient())
response = client.UploadValues(PostUrl, postData);
 
 
// Hide original form
form1.Visible = false;
 
 
// Response to screen
Response.Write(Encoding.UTF8.GetString(response));
}


But now I'm trying to do this in Service Studio. I'v created all the parameters and post it via REST to the payment url. Then I get an response which is a HTML page. In the ASP.net is it done by response.write to show the new HTML page.
But how can I do this in Service Studio? I tried to set an expression with this value and refresh it. But then it only shows the HTML and do not execute the javascript action: onLoad.

This is the response  I get from the REST post action:

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 
       <head>
       <title>Redirect naar de betalingpagina</title>
       <meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
       <style type="text/css">
       body {
             width: 97%;
             font-family: Verdana, Arial, Helvetica, sans-serif;
             color: #BBB;
             font-size: 1.5em;
             text-align: center;
       }
       
       div.main_content {
             font-weight: bold;
             margin: 100px auto 0px auto; /* TOP RIGHT BOTTOM LEFT*/
       }
       
       input {
             color: #000;
             border: 1px #000 solid;
             background-color: #BBB;
       }
       </style>
       </head>
 
 
<body onload="document.formReturnAWL.submit();">    
       <form method="POST" Action="https://payment-web.simu.omnikassa.rabobank.nl/payment" name="formReturnAWL">
             <div class="main_content">
                    U wordt nu doorgeleid naar de beveiligde betaalpagina.
             </div>
       
             <noscript>
             <div class="main_content">
                Als de betaalpagina niet binnen enkele seconden opent, druk dan op de knop "Ga naar de kassa".
               <br/>
               <br/>
               <input type="submit" value="Ga naar de kassa" />
             </div>
           </noscript>     
       
            <input type=HIDDEN name="redirectionData" id="redirectionData" value="2P_SfvXGKDDsJlW89BX7P3PQoCRuUn6-jWME3d_pVGXP96rA2342rDLJsgNz71ABkkV34puwmI2fO-ybkOMqOFOGnbk1g3yJuhH_0lmR0KW2AA0k2_BHQqI_iKcYAWTAjq9YNd854tEu_FCIOe4yklgIhfj45BBGqkvV2MkboBx3SpHJbbxnCg4w8HYFXi8koNuU5kux5H5PrvgBEXVpYjOHlLJ1eVAGwByF4LS9yq1YJg_2cR-JuPaGj4xdqjIzfISnBtRJ6zZgQEojT1IFjH7bCsRX1yeEpKwAUOFu0a1cYFjTt6AKLUQomeGA5ib8CwDVKvEmteSeBWmTY-UxEAlF9H84Kyvz9dsvn6VbU2w2SWZsBuCJd-HxTSp0WZNdc6eyxsgfNlNZioV-Dopofdi-InPy4rnMRToOetL5pD1jayAmDG-EYn85mlh8cZT4hgCOk75cKzgqWqpjVUqSVlC8ISlWn2ijQXHaPb-7TDi5JyJQFcoyyvybMUwCXjbKPx4nODorA0EPJaKdd8z89MBFhf4ws93D-nYXEyHY5Xo5eTPrH1e1HhqAQo7XdxITxp-nLhWC_Tb4ccZRH4W8X94yj80UIm0QmJ5nokr5_ALl8e8jZCZV3XuxygayAsJDlZaAau59C77P5Ruh_vWyVP6fn15FEyxXbR7UyprTA7CEnWzIxuYG_OuQx6hOLc59nIo3RJLv3Rvd8Srq1ToGaL1g8JrHfa6RHxrupJbORw1wteCaks7PKAmfhlfNSLiZtQ2t5EMUmj4wQcYa3ZNIjhj_5rr6ZGKXCIq8BrcURTDplNkLGEvtpdkel69sntc-ntteLbBt3vWNQrLoMfJudCtVWZh0O4lcH7ZExP8GUUM4nWtnX4ZcBTtYVAqOSU_uwsSvNUDNeF-opX6v6uxI5r25z5KjQz9fz-lAIJQckTUyhhynlH9WBpiW_UXDKYK9TVn-v8w6VyhKaZayOLpIykqQL-M2KIRL0LG9CkM7Tip1Blsn5J-M_I3Qb7madOfVfK-GzKGaiKbctVFvoauI5MvzHBFtS9dpUXyoXMoCU2PIw99mXVYQJH1WiWK6bCB6NsTkyqG-IVcVZ6nRZEhX2dW9C0Oq10Dw3yMerzgL9NwDorY5bf6q0_AfGKBTgCp-miCFspqxDZ4fGIZW2X9gyR_3CIuz6tezj8u6PGWlVr03dD-FHPa2dPcvfBmpdpJ761zswt3j1CyRFb8FFVrKOSYTjq5pN6FwjOZlZg2fIDplIAWHlrPpBFTkAAESsWs0VR4OsfiGf_AmZm33ILn7CVChgKSNpEwzTAKP4ZaoVQD6ZMRwjEg7eA8D69K7CyzkdAnbmE_Afqk43OvfXA2dLyQkLjcWUqOlIpu6FQVJeIUqawicBPBP8p4xloZvILHhYKRqpi3R1pNxZsmsTdqJ9z9wFjFYu9XoIqh2j4oJALLo0v0w9AiwpwbBGSA3JLA727Q5k_gDaZgt0ELOKZ8qyA" />
       </form>
</body>
</html>
 
You actually want to execute random JavaScript served to you by a 3rd party? That seems like a huge security problem.
Hi Kilian,

No I don't want to just execute random javascript. If you read te code samples you will see that you wil get redirected to an external payment page, this is what I want.
But the page doesn't allow to post the data as query parameters so I have to make a REST call with the form data. The response would redirect mee to an external page. In ASP.net the response would be printed to the screen and, in this case, the form action would be executed by javascript.

Thanks!
Isn't it possible you provide the redirect-url?
afaik, it's normal with paypal, ideal?