<?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: Trouble with Development and Testing Phase for Accept Hosted in Integration and Testing</title>
    <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Trouble-with-Development-and-Testing-Phase-for-Accept-Hosted/m-p/68093#M41357</link>
    <description>&lt;P&gt;Testing form redirect to&amp;nbsp;&lt;A href="https://test.authorize.net/payment/payment" target="_blank"&gt;https://test.authorize.net/payment/payment&lt;/A&gt;&amp;nbsp;instead of iFrame and the error is still:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;{"resultCode":"Error","messageCode":"E00001","messageText":"Unexpected error. Please try again."}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&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 = model.APILoginID,&lt;BR /&gt;ItemElementName = ItemChoiceType.transactionKey,&lt;BR /&gt;Item = model.TransactionKey,&lt;BR /&gt;};&lt;/P&gt;&lt;P&gt;settingType[] settings = new settingType[2];&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;&amp;nbsp;&lt;/P&gt;&lt;P&gt;settings[1] = new settingType();&lt;BR /&gt;settings[1].settingName = settingNameEnum.hostedPaymentOrderOptions.ToString();&lt;BR /&gt;settings[1].settingValue = "{\"show\": true}";&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;var lineItems = new lineItemType[1];&lt;BR /&gt;lineItems[0] = new lineItemType { itemId = model.Item.Id, name = model.Item.Name, quantity = model.Item.Quantity, unitPrice = new Decimal(model.Item.Price) };&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;model.Amount = model.Item.Quantity * model.Item.Price;&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 = new Decimal(model.Amount),&lt;BR /&gt;order = new orderType&lt;BR /&gt;{&lt;BR /&gt;invoiceNumber = model.Order.InvoiceNumber,&lt;BR /&gt;description = model.Order.Description&lt;BR /&gt;}&lt;BR /&gt;};&lt;/P&gt;&lt;P&gt;var request = new getHostedPaymentPageRequest();&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;request.transactionRequest = transactionRequest;&lt;BR /&gt;request.hostedPaymentSettings = settings;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;// instantiate the controller that will call the service&lt;BR /&gt;var controller = new getHostedPaymentPageController(request);&lt;BR /&gt;controller.Execute();&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;// get the response from the service (errors contained if any)&lt;BR /&gt;return controller.GetApiResponse();&lt;/P&gt;</description>
    <pubDate>Thu, 20 Jun 2019 13:45:25 GMT</pubDate>
    <dc:creator>TCCPGrimes01</dc:creator>
    <dc:date>2019-06-20T13:45:25Z</dc:date>
    <item>
      <title>Trouble with Development and Testing Phase for Accept Hosted</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Trouble-with-Development-and-Testing-Phase-for-Accept-Hosted/m-p/68071#M41341</link>
      <description>&lt;P&gt;Hello Everyone,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am sorry if this has already been addressed, I was unable to find anything concerning my problem.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Platform is ASP.Net Core on Windows IIS.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Attempting to use Accept Hosted. I have been able to successfully use the Accept JS library but we are wanting to actually use the Accept Hosted method.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does this require SSL to use on DEV?&lt;/P&gt;&lt;P&gt;Does this require domain or IP address to resolve for hostedPaymentReturnOptions and hostedPaymentIFrameComunicatorURL?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have no issue getting a token, showing the IFrame, but the only message I can confirm recieving is:&lt;/P&gt;&lt;P&gt;{"resultCode":"Error","messageCode":"E00001","messageText":"Unexpected error. Please try again."}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any help would be appreciated.&amp;nbsp; Let me know if you want me to post code, basically using the sample code they provided.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 19 Jun 2019 12:58:07 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Trouble-with-Development-and-Testing-Phase-for-Accept-Hosted/m-p/68071#M41341</guid>
      <dc:creator>TCCPGrimes01</dc:creator>
      <dc:date>2019-06-19T12:58:07Z</dc:date>
    </item>
    <item>
      <title>Re: Trouble with Development and Testing Phase for Accept Hosted</title>
      <link>https://community.developer.cybersource.com/t5/Integration-and-Testing/Trouble-with-Development-and-Testing-Phase-for-Accept-Hosted/m-p/68093#M41357</link>
      <description>&lt;P&gt;Testing form redirect to&amp;nbsp;&lt;A href="https://test.authorize.net/payment/payment" target="_blank"&gt;https://test.authorize.net/payment/payment&lt;/A&gt;&amp;nbsp;instead of iFrame and the error is still:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;{"resultCode":"Error","messageCode":"E00001","messageText":"Unexpected error. Please try again."}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Here is the code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&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 = model.APILoginID,&lt;BR /&gt;ItemElementName = ItemChoiceType.transactionKey,&lt;BR /&gt;Item = model.TransactionKey,&lt;BR /&gt;};&lt;/P&gt;&lt;P&gt;settingType[] settings = new settingType[2];&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;&amp;nbsp;&lt;/P&gt;&lt;P&gt;settings[1] = new settingType();&lt;BR /&gt;settings[1].settingName = settingNameEnum.hostedPaymentOrderOptions.ToString();&lt;BR /&gt;settings[1].settingValue = "{\"show\": true}";&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;var lineItems = new lineItemType[1];&lt;BR /&gt;lineItems[0] = new lineItemType { itemId = model.Item.Id, name = model.Item.Name, quantity = model.Item.Quantity, unitPrice = new Decimal(model.Item.Price) };&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;model.Amount = model.Item.Quantity * model.Item.Price;&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 = new Decimal(model.Amount),&lt;BR /&gt;order = new orderType&lt;BR /&gt;{&lt;BR /&gt;invoiceNumber = model.Order.InvoiceNumber,&lt;BR /&gt;description = model.Order.Description&lt;BR /&gt;}&lt;BR /&gt;};&lt;/P&gt;&lt;P&gt;var request = new getHostedPaymentPageRequest();&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;request.transactionRequest = transactionRequest;&lt;BR /&gt;request.hostedPaymentSettings = settings;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;// instantiate the controller that will call the service&lt;BR /&gt;var controller = new getHostedPaymentPageController(request);&lt;BR /&gt;controller.Execute();&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;// get the response from the service (errors contained if any)&lt;BR /&gt;return controller.GetApiResponse();&lt;/P&gt;</description>
      <pubDate>Thu, 20 Jun 2019 13:45:25 GMT</pubDate>
      <guid>https://community.developer.cybersource.com/t5/Integration-and-Testing/Trouble-with-Development-and-Testing-Phase-for-Accept-Hosted/m-p/68093#M41357</guid>
      <dc:creator>TCCPGrimes01</dc:creator>
      <dc:date>2019-06-20T13:45:25Z</dc:date>
    </item>
  </channel>
</rss>

