<?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 Iframe Response/Asp.net in Integration and Testing</title>
    <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Iframe-Response-Asp-net/m-p/57736#M32427</link>
    <description>&lt;P&gt;Hi i am new to the authorize.net world and i have been playing around with the hosted payment form. i am creating a ASP.net Applicaiton and trying to integrate this payment page. I have gotten the iframe to open the gateway. but how can i get a response back from the iframe and forward the origianl page? i have a little example code here that i have modified.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Our client doesnt want the form to be hosted on there page so that is why we are using the iframe so we can have authorize.net handle everything.&lt;/P&gt;
&lt;P&gt;I know this is a broad look at this but i have read through alot of the documentation and still have not come up with any conclusions.&lt;/P&gt;
&lt;P&gt;If there are any tips or tricks to do this in asp. it would be greatly appreciated.&lt;/P&gt;
&lt;PRE&gt;Protected Sub ASPxPopupControl1_Load(sender As Object, e As EventArgs) Handles ASPxPopupControl1.Load
        Dim ApiLoginID As String = "Login"
        Dim ApiTransactionKey As String = "Key"
        Dim amount As Decimal = 400
        ApiOperationBase(Of ANetApiRequest, ANetApiResponse).RunEnvironment = AuthorizeNet.Environment.SANDBOX
        ApiOperationBase(Of ANetApiRequest, ANetApiResponse).MerchantAuthentication = New merchantAuthenticationType() With {
                .name = ApiLoginID,
                .ItemElementName = ItemChoiceType.transactionKey,
                .Item = ApiTransactionKey
            }
        Dim settings As settingType() = New settingType(3) {}

        settings(0) = New settingType()
        settings(0).settingName = settingNameEnum.hostedPaymentButtonOptions.ToString()
        settings(0).settingValue = "{""text"": ""Pay""}"

        settings(1) = New settingType()
        settings(1).settingName = settingNameEnum.hostedPaymentOrderOptions.ToString()
        settings(1).settingValue = "{""show"": false}"

        settings(2) = New settingType()
        settings(2).settingName = settingNameEnum.hostedPaymentReturnOptions.ToString()
        settings(2).settingValue = "{""url"": ""https://localhost:44342/Summary2.0.aspx"", ""urlText"":""Continue"" ,""cancelUrl"":""https://localhost:44342/Summary2.0.aspx"",""cancelUrlText"":""Cancel""}"

        Dim transactiontype = transactionTypeEnum.authCaptureTransaction.ToString()
        Dim transactionRequest = New transactionRequestType()
        transactionRequest.transactionType = transactiontype
        transactionRequest.amount = amount
        Dim request = New getHostedPaymentPageRequest()
        request.transactionRequest = transactionRequest
        request.hostedPaymentSettings = settings
        Dim controller = New getHostedPaymentPageController(request)
        controller.Execute()
        Dim response = controller.GetApiResponse()
        token = response.token.ToString()
        ASPxPopupControl1.ContentUrl = "https://test.authorize.net/payment/payment"
    End Sub&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 18 Apr 2017 19:39:22 GMT</pubDate>
    <dc:creator>CDDDev1735</dc:creator>
    <dc:date>2017-04-18T19:39:22Z</dc:date>
    <item>
      <title>Iframe Response/Asp.net</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Iframe-Response-Asp-net/m-p/57736#M32427</link>
      <description>&lt;P&gt;Hi i am new to the authorize.net world and i have been playing around with the hosted payment form. i am creating a ASP.net Applicaiton and trying to integrate this payment page. I have gotten the iframe to open the gateway. but how can i get a response back from the iframe and forward the origianl page? i have a little example code here that i have modified.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Our client doesnt want the form to be hosted on there page so that is why we are using the iframe so we can have authorize.net handle everything.&lt;/P&gt;
&lt;P&gt;I know this is a broad look at this but i have read through alot of the documentation and still have not come up with any conclusions.&lt;/P&gt;
&lt;P&gt;If there are any tips or tricks to do this in asp. it would be greatly appreciated.&lt;/P&gt;
&lt;PRE&gt;Protected Sub ASPxPopupControl1_Load(sender As Object, e As EventArgs) Handles ASPxPopupControl1.Load
        Dim ApiLoginID As String = "Login"
        Dim ApiTransactionKey As String = "Key"
        Dim amount As Decimal = 400
        ApiOperationBase(Of ANetApiRequest, ANetApiResponse).RunEnvironment = AuthorizeNet.Environment.SANDBOX
        ApiOperationBase(Of ANetApiRequest, ANetApiResponse).MerchantAuthentication = New merchantAuthenticationType() With {
                .name = ApiLoginID,
                .ItemElementName = ItemChoiceType.transactionKey,
                .Item = ApiTransactionKey
            }
        Dim settings As settingType() = New settingType(3) {}

        settings(0) = New settingType()
        settings(0).settingName = settingNameEnum.hostedPaymentButtonOptions.ToString()
        settings(0).settingValue = "{""text"": ""Pay""}"

        settings(1) = New settingType()
        settings(1).settingName = settingNameEnum.hostedPaymentOrderOptions.ToString()
        settings(1).settingValue = "{""show"": false}"

        settings(2) = New settingType()
        settings(2).settingName = settingNameEnum.hostedPaymentReturnOptions.ToString()
        settings(2).settingValue = "{""url"": ""https://localhost:44342/Summary2.0.aspx"", ""urlText"":""Continue"" ,""cancelUrl"":""https://localhost:44342/Summary2.0.aspx"",""cancelUrlText"":""Cancel""}"

        Dim transactiontype = transactionTypeEnum.authCaptureTransaction.ToString()
        Dim transactionRequest = New transactionRequestType()
        transactionRequest.transactionType = transactiontype
        transactionRequest.amount = amount
        Dim request = New getHostedPaymentPageRequest()
        request.transactionRequest = transactionRequest
        request.hostedPaymentSettings = settings
        Dim controller = New getHostedPaymentPageController(request)
        controller.Execute()
        Dim response = controller.GetApiResponse()
        token = response.token.ToString()
        ASPxPopupControl1.ContentUrl = "https://test.authorize.net/payment/payment"
    End Sub&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 18 Apr 2017 19:39:22 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Iframe-Response-Asp-net/m-p/57736#M32427</guid>
      <dc:creator>CDDDev1735</dc:creator>
      <dc:date>2017-04-18T19:39:22Z</dc:date>
    </item>
    <item>
      <title>Re: Iframe Response/Asp.net</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Iframe-Response-Asp-net/m-p/57748#M32439</link>
      <description>&lt;P&gt;Another Question that is had is that if i send the user to the payment page. will i ever get a response. if the payment is successfull or declinced?&lt;/P&gt;</description>
      <pubDate>Wed, 19 Apr 2017 14:37:08 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Iframe-Response-Asp-net/m-p/57748#M32439</guid>
      <dc:creator>CDDDev1735</dc:creator>
      <dc:date>2017-04-19T14:37:08Z</dc:date>
    </item>
    <item>
      <title>Re: Iframe Response/Asp.net</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Iframe-Response-Asp-net/m-p/64993#M38736</link>
      <description>&lt;P&gt;Did youget answer to your question?&lt;/P&gt;</description>
      <pubDate>Tue, 06 Nov 2018 16:29:45 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Iframe-Response-Asp-net/m-p/64993#M38736</guid>
      <dc:creator>rkmoray</dc:creator>
      <dc:date>2018-11-06T16:29:45Z</dc:date>
    </item>
  </channel>
</rss>

