<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: blank page when calling getHostedPaymentPageRequest from asp.net page in Integration and Testing</title>
    <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/blank-page-when-calling-getHostedPaymentPageRequest-from-asp-net/m-p/58895#M33503</link>
    <description>Hello, You need to target your iframe with your form post to &lt;A href="https://test.authorize.net/payment/payment" target="_blank"&gt;https://test.authorize.net/payment/payment&lt;/A&gt; including the hidden token input. See an html example at : &lt;A href="https://nexwebsites.com/authorizenet/token-tester.html" target="_blank"&gt;https://nexwebsites.com/authorizenet/token-tester.html&lt;/A&gt;</description>
    <pubDate>Thu, 20 Jul 2017 11:22:30 GMT</pubDate>
    <dc:creator>NexusSoftware</dc:creator>
    <dc:date>2017-07-20T11:22:30Z</dc:date>
    <item>
      <title>blank page when calling getHostedPaymentPageRequest from asp.net page</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/blank-page-when-calling-getHostedPaymentPageRequest-from-asp-net/m-p/58893#M33501</link>
      <description>&lt;P&gt;Hi!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have this c# code in asp.net web forms page:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;&lt;BR /&gt;ApiOperationBase&amp;lt;ANetApiRequest, ANetApiResponse&amp;gt;.RunEnvironment = AuthorizeNet.Environment.SANDBOX;&lt;BR /&gt;ApiOperationBase&amp;lt;ANetApiRequest, ANetApiResponse&amp;gt;.MerchantAuthentication = new merchantAuthenticationType()&lt;BR /&gt;{&lt;BR /&gt;name = "3XU3ASDASDSA6hm",&lt;BR /&gt;ItemElementName = ItemChoiceType.transactionKey,&lt;BR /&gt;Item = "42dasdas2GPDASDSDASQPR997k",&lt;BR /&gt;};&lt;/P&gt;&lt;P&gt;settingType[] settings = new settingType[]{&lt;BR /&gt;new settingType()&lt;BR /&gt;// More settings can be added here as and when required&lt;BR /&gt;};&lt;/P&gt;&lt;P&gt;settings[0] = new settingType();&lt;BR /&gt;settings[0].settingName = settingNameEnum.hostedPaymentButtonOptions.ToString();&lt;BR /&gt;settings[0].settingValue = "{\"text\": \"Pay\"}";&lt;/P&gt;&lt;P&gt;var transactionRequest = new transactionRequestType&lt;BR /&gt;{&lt;BR /&gt;transactionType = transactionTypeEnum.authCaptureTransaction.ToString(), // authorize capture only&lt;BR /&gt;amount = 10&lt;BR /&gt;};&lt;/P&gt;&lt;P&gt;var request = new getHostedPaymentPageRequest();&lt;BR /&gt;request.transactionRequest = transactionRequest;&lt;BR /&gt;request.hostedPaymentSettings = settings;&lt;/P&gt;&lt;P&gt;// instantiate the contoller that will call the service&lt;BR /&gt;var controller = new getHostedPaymentPageController(request);&lt;BR /&gt;controller.Execute();&lt;/P&gt;&lt;P&gt;// get the response from the service (errors contained if any)&lt;BR /&gt;var response = controller.GetApiResponse();&lt;/P&gt;&lt;P&gt;//validate&lt;BR /&gt;if (response != null &amp;amp;&amp;amp; response.messages.resultCode == messageTypeEnum.Ok)&lt;BR /&gt;{&lt;BR /&gt;Console.WriteLine("Message code : " + response.messages.message[0].code);&lt;BR /&gt;Console.WriteLine("Message text : " + response.messages.message[0].text);&lt;BR /&gt;Console.WriteLine("Token : " + response.token);&lt;BR /&gt;}&lt;BR /&gt;else if (response != null)&lt;BR /&gt;{&lt;BR /&gt;Console.WriteLine("Error: " + response.messages.message[0].code + " " + response.messages.message[0].text);&lt;BR /&gt;Console.WriteLine("Failed to get hosted payment page");&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;hfToken.Value = response.token;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also in the html I have this:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;lt;iframe src="&lt;A href="https://community.developer.cybersource.com/" target="_blank"&gt;https://test.authorize.net/payment/payment"&amp;gt;&amp;lt;/iframe&lt;/A&gt;&amp;gt;&lt;BR /&gt;&amp;lt;asp:HiddenField runat="server" ID="hfToken" /&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm expecting to either get redirected to a.net hosted page or display the iframe accordingly, but for the iframe I have this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG src="https://i.gyazo.com/52ca1f375e4abda464353ab4c6a38361.png" border="0" alt="" width="338" height="190" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Either way will work for us but I want to know if I need to do anything else in order to get the iframe properly displayed or to be properly redirected to the a.net hosted form.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Prompt replies greatly appreciated since we really need this to be working very soon.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 20 Jul 2017 09:54:37 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/blank-page-when-calling-getHostedPaymentPageRequest-from-asp-net/m-p/58893#M33501</guid>
      <dc:creator>arnaudov</dc:creator>
      <dc:date>2017-07-20T09:54:37Z</dc:date>
    </item>
    <item>
      <title>Re: blank page when calling getHostedPaymentPageRequest from asp.net page</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/blank-page-when-calling-getHostedPaymentPageRequest-from-asp-net/m-p/58895#M33503</link>
      <description>Hello, You need to target your iframe with your form post to &lt;A href="https://test.authorize.net/payment/payment" target="_blank"&gt;https://test.authorize.net/payment/payment&lt;/A&gt; including the hidden token input. See an html example at : &lt;A href="https://nexwebsites.com/authorizenet/token-tester.html" target="_blank"&gt;https://nexwebsites.com/authorizenet/token-tester.html&lt;/A&gt;</description>
      <pubDate>Thu, 20 Jul 2017 11:22:30 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/blank-page-when-calling-getHostedPaymentPageRequest-from-asp-net/m-p/58895#M33503</guid>
      <dc:creator>NexusSoftware</dc:creator>
      <dc:date>2017-07-20T11:22:30Z</dc:date>
    </item>
    <item>
      <title>Re: blank page when calling getHostedPaymentPageRequest from asp.net page</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/blank-page-when-calling-getHostedPaymentPageRequest-from-asp-net/m-p/64525#M38397</link>
      <description>&lt;P&gt;Hey NexusSoftware,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am facing same issue blank page after embedded toke to the url&amp;nbsp;have also included target.&lt;/P&gt;&lt;P&gt;i am dont understand why its not working.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&amp;lt;form action="https://test.authorize.net/payment/payment" method="post" target="loadPayment"&amp;gt;
&amp;lt;input id="token" name="token" value={{hostedPaymentPageToken}} /&amp;gt;
&amp;lt;input id="validate" type="submit" (click)="callHostedPage()" value="Pay Now" class="btn btn-primary btn-lg"&amp;gt;
&amp;lt;/form&amp;gt;
&amp;lt;iframe #loadPayment id="loadPayment" width="100%" height="650px" frameborder="1" scrolling="no"&amp;gt;&amp;lt;/iframe&amp;gt;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;</description>
      <pubDate>Tue, 18 Sep 2018 18:05:41 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/blank-page-when-calling-getHostedPaymentPageRequest-from-asp-net/m-p/64525#M38397</guid>
      <dc:creator>tandeltrushar</dc:creator>
      <dc:date>2018-09-18T18:05:41Z</dc:date>
    </item>
  </channel>
</rss>

