Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

ASP.NET - translation issue

  • 04-06-2011 11:13PM
    #1
    Moderators, Home & Garden Moderators, Regional Midwest Moderators, Regional West Moderators Posts: 16,716 Mod ✭✭✭✭


    Hi
    Doing work for a existing customer. They use Barclays Payments on their site.
    The current site is live 5 years and it works away, no issues with the Payments.
    You do a POST to the Barclays site and it send the content of a Session Object as part of the POST.
    The code is below:
    <%@ Page Language="vb" AutoEventWireup="false" Codebehind="Example.aspx.vb" Inherits="WebProject1.Example"%>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <HTML>
    <HEAD>
    <title>Example</title>
    <meta name="GENERATOR" content="Microsoft Visual Studio.NET 7.0">
    <meta name="CODE_LANGUAGE" content="Visual Basic 7.0">
    <meta name="vs_defaultClientScript" content="JavaScript">
    <meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie3-2nav3-0">
    </HEAD>
    <body MS_POSITIONING="FlowLayout">
    'The Session Variable is then output to the FORM and on form submit is posted to the CPI
    <FORM action="https://secure2.epdq.co.uk/cgi-bin/CcxBarclaysEpdq.e" method="post">
    <%= session("Response") %>
    <INPUT type="hidden" name="returnurl" value="http://www.store.co.uk/">
    <INPUT type="hidden" name="merchantdisplayname" value="My Store">
    <INPUT TYPE="submit" VALUE="purchase">
    </FORM>
    

    Now they are doing a new site.
    I have been give the templates, they are C# and I have been trying to implement the existing procedure/code into the new site.
    For some very odd reason the POST won't work.
    I have also tried it on a BUTTON with a PostBackUrl to the Barclays Page but I can't get it to send the response for some reason.

    I changed out some company information so hopefully I retained the code structure.

    So hopefully someone can spot something as to why this maybe happening!

    Thanks very much


    <%@ Page Title="" Language="C#" MasterPageFile="~/CMSTemplates /EngineMaster.master" AutoEventWireup="true" CodeFile="PaymentsProcessing.aspx.cs" Inherits="CMSTemplates__ProcessPayment" %>
    <asp:Content ID="Content1" ContentPlaceHolderID="cphMainContent" Runat="Server">
    <asp:scriptmanager ID="Scriptmanager1" runat="server"></asp:scriptmanager>
    <!-- subnavigation -->
    <xc:EngineSubNavigation ID="subNavigation" StartingAliasPath="/Freight " HighlightClassName="active" runat="server" />
    
    <script type="text/javascript">
      var _gaq = _gaq || [];
      _gaq.push(['_setAccount', 'UA-17356089-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>
    
            <form action="https://secure2.epdq.co.uk/cgi-bin/CcxBarclaysEpdq.e" method="post">
                <%= HttpContext.Current.Session["MyResponse"]%>
     
    <div class="content">			
    <table id="table1" style="text-align: left; width:100%;"cellSpacing="1" cellPadding="1" border="0">
    	 <tr>
    	 <td colSpan="2">
    		<asp:label id="lblPaymentScreenMessage" runat="server" Width="400px"  Font-Bold="true" Font-Size="8pt">Payment For  Bookings Are Handled By Barclays Secure CPI Payment Mechanism</asp:label></td>
    	</tr>
    	<tr>
    		<td><asp:label id="Label2" runat="server" Width="192px"  Font-Bold="true" Font-Size="8pt" >OrderID For transaction</asp:label></td>
    		<td><asp:label id="lblOrderID" runat="server" Width="152px"  Font-Bold="true" Font-Size="8pt"	 ForeColor="Red"></asp:label></td>
    	</tr>
    <tr>
    		<td><asp:label id="Label7" ForeColor="Black"  Font-Bold="true" Font-Size="8pt" 	Width="96px" runat="server">Vat Amount:</asp:label></td>
    		<td><asp:label id="lblVatAmount" ForeColor="Red"  Font-Bold="true" Font-Size="8pt" Width="96px" runat="server">Vat Amount:</asp:label></td>
    	</tr>				
    	</table>
    		<br />
    		<asp:label id="Label4" runat="server" Width="560px"  Font-Bold="true" Font-Size="8pt" >By Clicking Purchase You Will Be transferred to The Barclays Payment Interface</asp:label>
    		<br /><br />
    		    <%--<asp:Button  ID="Button1"   PostBackUrl= "https://secure2.epdq.co.uk/cgi-bin/CcxBarclaysEpdq.e" runat="server" Text="Submit" />--%>
    			<%--<%= HttpContext.Current.Session["MyResponse"]%>--%>
    			<input type="submit" value="purchase" />
    			<input type="hidden" value="https://www.frei.com/transactionComplete.aspx"
    				name="returnurl"/>&nbsp;&nbsp;
    				<asp:label id="lblEncryptionString" style="Z-INDEX: 102; POSITION: absolute; TOP: 520px"
    				runat="server" Width="700px"   ForeColor="Red"></asp:label>
    				
    				<input type="hidden" value="Company" name="merchantdisplayname" style="Z-INDEX: 104; POSITION: absolute; TOP: 16px"/>
    				</div>
    		</form>   	
          
          <!-- end content -->
          <div id="page-end"></div>  
    </asp:Content>
    


Comments

  • Registered Users, Registered Users 2 Posts: 21,278 ✭✭✭✭Eoin


    Is there a chance that you have nested your hard-coded form into a .net server-side form contained in your master page?


Advertisement