Android Question .NET HTTP POST method equivalent required.

Juzer Hussain

Active Member
Licensed User
Longtime User
Hi Guys,
I have configured a payment gateway in ASP.Net using <form> element as below.
<form action='https://test.payu.in/_payment' method='post'>
<input type="hidden" name="firstname" value="Vikas Kumar" />
<input type="hidden" name="lastname" value="" />
<input type="hidden" name="surl" value="https://www.facebook.com" />
<input type="hidden" name="phone" value="9999999999" />
<input type="hidden" name="key" value="gtKFFx" />
<input type="hidden" name="hash" value = "da3374027500c4dff2387fb41c6edf85bdde974ae56ac5592854f2bbf88d1ed6d898bbd44ca91a767ad9aa57d151208bea4326c33c9f7a5b19d9e784fb8b1878" />
<input type="hidden" name="curl" value="http://www.google.com" />
<input type="hidden" name="furl" value="https:/www.yahoo.in" />
<input type="hidden" name="txnid" value="BMC-1006-3678778" />
<input type="hidden" name="productinfo" value="SAU Admission 2014" />
<input type="hidden" name="amount" value="600.00" />
<input type="hidden" name="email" value="[email protected]" />
<asp:ImageButton ID="ImageButton5" runat="server" ImageUrl="~/images/Buy-now.png" PostBackUrl="https://test.payu.in/_payment" />
</form>
I am advised to use HTTP POST method in case of Android App.
Here i am passing key value pairs to the page using Download2 method as below.

Job_Payment.Initialize("Job_Payment",Me)
Job_Payment.Download2(ServerURL3,Array As String("firstname", "Vikas Kumar","lastname","","surl","https://www.facebook.com","phone","9999999999","key","gtKFFx","hash","ff49314211b619634a6301a751467042e227d22801cd323d86efd8696bc822b65780751cc2ee6dc6b420fb61cd21ea434f35f78da9ec23926497e288b22f5407","curl","http://www.google.com","furl","https:/www.yahoo.in","txnid","BMC-x123-1","productinfo","SAU Admission 2014","amount","600.00","email","[email protected]" ))

I am going to Error Page.

Can anyone suggest me if there is another way of doing the same.Upon successfull Job completion payment page opens. I expect it to open here too.
 

Juzer Hussain

Active Member
Licensed User
Longtime User
Hi Erel,

I tried posstring the Job completes successfully but does not open up the payment page.
The response string does show HTML elements of the page. Do I need to use webview to allow page to be diplayed.

Pls guide.

Thanks
Juzer
 
Upvote 0

Juzer Hussain

Active Member
Licensed User
Longtime User
Hi Erel,

I mean upon successfull post the payment page will open. The poststring completes successfully,
Now how to dislplay the responsive web page it is rediretcing to?

Juzer
 
Upvote 0

Juzer Hussain

Active Member
Licensed User
Longtime User
Hi Erel,

Below is the content of GetString. As you can see It will open the page, It needs container(webview etc).

HTML:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
  <meta name="HandheldFriendly" content="true" />
  <meta name="viewport" content="width=device-width;target-densitydpi=device-dpi;initial-scale=1.0; maximum-scale=1.0;minimum-scale=1.0; user-scalable=0;"/>
  <meta name="apple-mobile-web-app-capable" content="yes" />
  <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
  <title>PayUbiz</title>
  <script type="text/javascript">
    var baseImagePath = 'https://static.payu.in/images/';
  </script>
  <link rel="shortcut icon" type="image/ico" href="https://static.payu.in/images/favicon.png" />
      <link href="https://static.payu.in/css/helpers.css"  rel="stylesheet" type="text/css" />
      <link href="https://static.payu.in/css/screen.css?version=2"  rel="stylesheet" type="text/css" />
      <link href="https://static.payu.in/css/new/base.css?version=1.5"  rel="stylesheet" type="text/css" />
  <style type="text/css">.custom_color5bu8pu{background-color: #96B1D9 !important;} .custom_fcolor5bu8pu{color: #DBAFAF !important} .custom_colorb4CwJx{background-color: #386DBD !important;} .custom_fcolorb4CwJx{color: #08080A !important} .custom_fcolor5KrABD{color: #FFFFFF !important} </style></head>
<body>
<div data-role="page" class="container" id="page">  
    <div id="header" class="clearfix"  >
          <div id="payu_logo"
        class="logo" >   
    </div>
     </div>
<!-- Merchant Specific Google Analytics Code on Payment Options Page -->
<script type="text/javascript">   
      var _gaq = _gaq || [];
      _gaq.push(['_setAccount', 'UA-45774663-1']);
            _gaq.push(['_trackPageview']);

      (function() {
        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
      })();
</script>
<!-- Google Code for Remarketing Tag -->

    <div style="visibility:hidden; display: none" id="senfg245lfsd">BMC-x123-1</div>
<link type="text/css" rel="stylesheet" href="https://static.payu.in/css/extracss.css?version=1.0.1" />
<!-- Place favicon.ico and apple-touch-icon.png in the root directory: mathiasbynens.be/notes/touch-icons -->
<!-- Custom Modernizr build (should always be on the top) -->
<script    src="https://static.payu.in/js/new.modernizr-2.0.6.min.js"></script>
<script    type="text/javascript">
    var storeCardOnByDefault = 0;
</script>
<noscript>
    <!-- #content Start -->
    <div id="content" class="message prepend-top append-bottom">
        <div class="message append-bottom prepend-top append-1 prepend-1">
            <h4 class="append-bottom">
                <img width="32" height="31" src="https://static.payu.in/images/error.jpg"><span class="err">Error.</span>
                We are sorry, it seems that the javascript on your browser is disabled. <a href="http://support.google.com/bin/answer.py?hl=en&answer=23852" target="_blank"> Click Here</a> to see how to enable javascript.
            </h4>
        </div>
    </div>
    <!-- #content End -->
</noscript>
<div onclick="ShowDiv(event)" id="divBlock" style="position: absolute; visibility: hidden; z-index: 100;">
    <div style="padding-left: 10%;">
        <div class="arrow_up"></div>
    </div>
    <div id="divInfo" class="div_info">
        <img id="ccvv_help_img" class="help-img" src="https://static.payu.in/images/cvv_new/cvv_visa_master_new.png?v=1.1">
        <p id="CVVHelpText" style="width:168px;padding:0px;margin:5px 0 0 0px;font-size:10px;">A 3-digit number in reverse italics on the back of your card</p>
    </div>
</div>
<style>
#FeebackButton{opacity:.8;position:fixed;width:30px;height:155px;top:45%;margin-top:-145px;right:0;background-image:url('https://static.payu.in/ima
Message longer than Log limit (4000). Message was truncated.
[HTML]
 
Upvote 0

Juzer Hussain

Active Member
Licensed User
Longtime User
Thank You Erel It is indeed showing the payment page,
"Can this be assumed a professional solution?"

Please comment
Juzer
 
Upvote 0
Top