Exemplo n.º 1
0
        public void WebProfileGetListTest()
        {
            try
            {
                // Create a new profile
                var apiContext  = TestingUtil.GetApiContext();
                var profileName = Guid.NewGuid().ToString();
                var profile     = WebProfileTest.GetWebProfile();
                profile.name = profileName;
                var createdProfile = profile.Create(apiContext);

                // Get the list of profiles
                var profiles = WebProfile.GetList(apiContext);
                Assert.IsNotNull(profiles);
                Assert.IsTrue(profiles.Count > 0);

                // Delete the profile
                profile.id = createdProfile.id;
                profile.Delete(apiContext);
            }
            finally
            {
                TestingUtil.RecordConnectionDetails();
            }
        }
        public void WebProfileGetListTest()
        {
            var profiles = WebProfile.GetList(TestingUtil.GetApiContext());

            Assert.IsNotNull(profiles);
            Assert.IsTrue(profiles.Count > 0);
        }
        // GET: WebExperienceProfiles
        public ActionResult Index()
        {
            var apiContext = GetAPIContext();
            var list       = WebProfile.GetList(apiContext);

            if (!list.Any())
            {
                SeedWebProfiles(apiContext);
                list = WebProfile.GetList(apiContext);
            }

            return(View(list));
        }
Exemplo n.º 4
0
        public ActionResult Index()
        {
            var apiContext = PayPalApiHelperService.GetApiContext();

            var list = WebProfile.GetList(apiContext);

            if (!list.Any())
            {
                SeedWebProfiles(apiContext);
                list = WebProfile.GetList(apiContext);
            }

            return(View(list));
        }
Exemplo n.º 5
0
        // GET: WebExperienceController
        public ActionResult Index()
        {
            //cria credencial api
            var apiContext = GetApiContext();

            //cria experiance profile para colocar no payment object
            var list = WebProfile.GetList(apiContext);

            if (!list.Any())
            {
                SeedWebProfile(apiContext);
                list = WebProfile.GetList(apiContext);
            }

            return(View(list));
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            var CurrContext = HttpContext.Current;

            try
            {
                var apiContext  = Configuration.GetAPIContext();
                var profileList = WebProfile.GetList(apiContext);
                CurrContext.Items.Add("ResponseJson", Common.FormatJsonString(profileList.ConvertToJson()));
            }
            catch (Exception ex)
            {
                CurrContext.Items.Add("Error", ex.Message);
            }

            Server.Transfer("~/Response.aspx");
        }
Exemplo n.º 7
0
        protected override void RunSample()
        {
            // ### Api Context
            // Pass in a `APIContext` object to authenticate
            // the call and to send a unique request id
            // (that ensures idempotency). The SDK generates
            // a request id if you do not pass one explicitly.
            // See [Configuration.cs](/Source/Configuration.html) to know more about APIContext.
            var apiContext = Configuration.GetAPIContext();

            #region Track Workflow
            this.flow.AddNewRequest("Retrieve list of profiles");
            #endregion

            var profileList = WebProfile.GetList(apiContext);

            #region Track Workflow
            this.flow.RecordResponse(profileList);
            #endregion
        }