title: Adyen Web Drop In - production unable to load payment form
body: <p>0</p>
  <p>I've gone through most of the instructions here and am able to process a test card transaction <a href="https://docs.adyen.com/online-payments/web-drop-in" rel="nofollow noreferrer">https://docs.adyen.com/online-payments/web-drop-in</a>. I pulled down the example repo here <a href="https://github.com/adyen-examples/adyen-dotnet-online-payments" rel="nofollow noreferrer">https://github.com/adyen-examples/adyen-dotnet-online-payments</a>.</p>
  <p>I adapted it to my own Adyen account and it works when running it under the 'test' Adyen configuration.</p>
  <p>However when pushing this to production, it errors at the point when it's calling</p>
  <p>Dim CreateCheckoutSessionResponse = _checkout.Sessions(sessionsRequest)</p>
  <pre><code> &lt;WebMethod(EnableSession:=True), ScriptMethod()&gt;
      Public Shared Function GetPaymentForm() As Object
  
          Dim orderId As String = HttpContext.Current.Session(&quot;OrderID&quot;)
  
          Dim _connString As String = Config.StrWebConnection()
          Dim cart As New ShoppingCart(_connString)
          Dim dt = cart.GetOrderInfo(orderId)
  
          Dim isGlobal = IsGlobalSite(Config.SiteUrl)
          Dim liveEndpointUrlPrefix = If(Config.LiveEndpointUrlPrefix = &quot;&quot;, Nothing, Config.LiveEndpointUrlPrefix)
          Dim env = If(Int32.Parse(Config.AdyenEnvironment) = 0, Model.Enum.Environment.Test, Model.Enum.Environment.Live)
  
          Dim clientCheckout = New Client(Config.ApiKey, env, liveEndpointUrlPrefix)
          Dim _checkout = New Checkout(clientCheckout)
  
          Dim cartTotal = Utilities.SanitizeCurrency(GetCartTotal(orderId, HttpContext.Current.Session(&quot;user_name&quot;)))
  
          Dim sessionsRequest = New CreateCheckoutSessionRequest()
  
          sessionsRequest.MerchantAccount = Config.MerchantAccount(0)
          sessionsRequest.MerchantOrderReference = orderId
          Dim Amount = New Amount(&quot;USD&quot;, Convert.ToInt64(String.Format(&quot;{0:f2}&quot;, cartTotal).Replace(&quot;.&quot;, String.Empty)))
          sessionsRequest.Amount = Amount
          sessionsRequest.DeliverAt = DateTime.Parse(DateTime.Now.AddDays(3).ToString(&quot;yyyy-MM-dd&quot;))
          sessionsRequest.ExpiresAt = DateTime.Parse(DateTime.Now.AddDays(1).ToString(&quot;yyyy-MM-ddTHH:mm:ssK&quot;))
          sessionsRequest.ShopperEmail = dt.Email
          sessionsRequest.ShopperLocale = &quot;en-us&quot;
  
          sessionsRequest.ShopperReference = HttpContext.Current.Session(&quot;ShopperReference&quot;).ToString().ToUpper()
          sessionsRequest.Channel = PaymentRequest.ChannelEnum.Web
          sessionsRequest.Reference = String.Format(&quot;ClientSite_{0}&quot;, orderId)
          sessionsRequest.RecurringProcessingModel = CreateCheckoutSessionRequest.RecurringProcessingModelEnum.CardOnFile 'req.IsRecurring ? CreateCheckoutSessionRequest.RecurringProcessingModelEnum.Subscription : CreateCheckoutSessionRequest.RecurringProcessingModelEnum.CardOnFile;
          sessionsRequest.EnableRecurring = False 'req.IsRecurring
          sessionsRequest.EnableOneClick = True '!req.IsRecurring
  
          'required for 3ds2 redirect flow
          sessionsRequest.ReturnUrl = Config.SiteUrl &amp; &quot;/Confirm.aspx?&quot;
  
          Dim json As String
          Try
              Dim CreateCheckoutSessionResponse = _checkout.Sessions(sessionsRequest)
              json = CreateCheckoutSessionResponse.ToJson()
          Catch ex As Exception
              Console.WriteLine(ex.Message)
              System.Diagnostics.Debug.WriteLine(ex.Message)
              Return 0
          End Try
          Return json
      End Function
  </code></pre>
  <p>The <strong>liveEndpointUrlPrefix</strong> is set to the full Live Adyen API endpoint. The API key is also the one used from my Adyen API credentials. My environment is set to 'live'. I have also added this site to my allow origins in the API credential.</p>
  <p>Lastly, when I step through the code it fails when calling the _checkout.Sessions(sessionRequest) and produces the following error:</p>
  <pre><code>{System.Net.WebException: The remote name could not be resolved: 'https'&quot; &amp; vbCrLf &amp; &quot;   at System.Net.HttpWebRequest.GetRequestStream(TransportContext&amp; context)&quot; &amp; vbCrLf &amp; &quot;   at System.Net.HttpWebRequest.GetRequestStream()&quot; &amp; vbCrLf &amp; &quot;   at Adyen.HttpClient.HttpUrlConnectionClient.Request(String endpoint, String json, Config config, Boolean isApiKeyRequired, RequestOptions requestOptions)&quot; &amp; vbCrLf &amp; &quot;   at Adyen.Service.ServiceResource.Request(String json, RequestOptions requestOptions)&quot; &amp; vbCrLf &amp; &quot;   at Adyen.Service.Checkout.Sessions(CreateCheckoutSessionRequest createCheckoutSessionRequest)&quot; &amp; vbCrLf &amp; &quot;   at clients_site.Confirm.GetPaymentForm() in C:\www\Confirm.aspx.vb:line 70}
  </code></pre>
  <p>When I change the Adyen credentials to my test Adyen, the payment form loads fine.</p>
  <p>Any ideas please. Thanks in advance!</p>