From 049d40993e56c94b4cd300ca5d92646afaabe23c Mon Sep 17 00:00:00 2001 From: Kori Francis Date: Fri, 1 Apr 2016 17:53:10 -0400 Subject: [PATCH] Make sure all samples are using SecurityProtocolType.Tls12 properly --- Source/ChargifyNetSample.MVC/Controllers/HomeController.cs | 1 + Source/ChargifyNetSample.Web/App_Code/ChargifyBase.vb | 4 +++- Source/ChargifyNetSample.Web/Migrations/Configuration.vb | 2 ++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/Source/ChargifyNetSample.MVC/Controllers/HomeController.cs b/Source/ChargifyNetSample.MVC/Controllers/HomeController.cs index 75e3ad6..afee226 100644 --- a/Source/ChargifyNetSample.MVC/Controllers/HomeController.cs +++ b/Source/ChargifyNetSample.MVC/Controllers/HomeController.cs @@ -18,6 +18,7 @@ public ActionResult Index() /// POST: /home/webhook /// /// The webhook event payload + /// /// Applicable HttpStatusCode result [HttpPost] public ActionResult Webhook(WebhookEventData model, string signature_hmac_sha_256) diff --git a/Source/ChargifyNetSample.Web/App_Code/ChargifyBase.vb b/Source/ChargifyNetSample.Web/App_Code/ChargifyBase.vb index 5659cca..0f1c4d3 100644 --- a/Source/ChargifyNetSample.Web/App_Code/ChargifyBase.vb +++ b/Source/ChargifyNetSample.Web/App_Code/ChargifyBase.vb @@ -1,4 +1,5 @@ -Imports ChargifyNET +Imports System.Net +Imports ChargifyNET Public Class ChargifyBase Public Shared ReadOnly Property Chargify() As ChargifyConnect @@ -8,6 +9,7 @@ Public Class ChargifyBase chargifyConnect.Password = ConfigurationManager.AppSettings("CHARGIFY_API_PASSWORD") chargifyConnect.URL = ConfigurationManager.AppSettings("CHARGIFY_SITE_URL") chargifyConnect.SharedKey = ConfigurationManager.AppSettings("CHARGIFY_SHARED_KEY") + chargifyConnect.ProtocolType = SecurityProtocolType.Tls12 Return chargifyConnect End Get End Property diff --git a/Source/ChargifyNetSample.Web/Migrations/Configuration.vb b/Source/ChargifyNetSample.Web/Migrations/Configuration.vb index 02faa78..2596ed8 100644 --- a/Source/ChargifyNetSample.Web/Migrations/Configuration.vb +++ b/Source/ChargifyNetSample.Web/Migrations/Configuration.vb @@ -1,6 +1,7 @@ Imports System Imports System.Data.Entity.Migrations Imports System.Linq +Imports System.Net Imports ChargifyNET Imports Microsoft.AspNet.Identity Imports Microsoft.AspNet.Identity.EntityFramework @@ -110,6 +111,7 @@ Namespace Migrations chargifyConnect.Password = ConfigurationManager.AppSettings("CHARGIFY_API_PASSWORD") chargifyConnect.URL = ConfigurationManager.AppSettings("CHARGIFY_SITE_URL") chargifyConnect.SharedKey = ConfigurationManager.AppSettings("CHARGIFY_SHARED_KEY") + chargifyConnect.ProtocolType = SecurityProtocolType.Tls12 Return chargifyConnect End Get End Property