Ejemplo n.º 1
0
        public async Task <JsonResult> VerifyMobileSendSMS(string tenantUid, string countryCode, string mobile, string language)
        {
            var origin        = TenantHelper.GetCurrentTenantUrl(contentService, tenantUid);
            var key           = ApiKeyCache.GetByTenantUid(tenantUid);
            var authorization = await new Authorization().GetAuthorizationAsync(key);
            var mobileNumber  = $"{countryCode}{mobile.TrimStart(new Char[] { '0' })}";
            var response      = await verificationService.VerifyMobileAsync(tenantUid.ToString(), origin, mobileNumber, language, authorization.AccessToken);

            return(Json(response, JsonRequestBehavior.DenyGet));
        }
Ejemplo n.º 2
0
        public async Task Connector_VerifyMobileSendSMS()
        {
            //Arrange
            TotalCodeApiService helper = new TotalCodeApiService();
            var authorization          = (ApiKeyLoginResponseContent)await helper.ApiKeyLoginAsync("api_key_customer_management", "CustomerManagementGuid");

            //Act
            var response = await helper.VerifyMobileAsync("B3988460-F283-4D44-8A5E-58EB7C909B39", "http://customer-management-service-api.totalcoding-test1.com", "+441500000000", "PT", authorization.AccessToken);

            //Assert
            Assert.IsNotNull(response);
        }