コード例 #1
0
        public void Should_Delete_IyziLink()
        {
            IyziLinkSaveRequest request = new IyziLinkSaveRequest();

            request.Locale               = Locale.TR.ToString();
            request.ConversationId       = "123456789";
            request.Name                 = "ft-name";
            request.Description          = "ft-description";
            request.Base64EncodedImage   = "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8H8BwGwAF0QIs4BDpAAAAAABJRU5ErkJggg==";
            request.Price                = "1";
            request.Currency             = Currency.TRY.ToString();
            request.AddressIgnorable     = false;
            request.SoldLimit            = 1;
            request.InstallmentRequested = false;

            string        token     = IyziLink.Create(request, _options).Data.Token;
            BaseRequestV2 requestV2 = new BaseRequestV2();

            requestV2.Locale         = Locale.TR.ToString();
            requestV2.ConversationId = "123456789";

            IyzipayResourceV2 response = IyziLink.Delete(token, requestV2, _options);

            PrintResponse(response);

            Assert.AreEqual(Status.SUCCESS.ToString(), response.Status);
            Assert.AreEqual(Locale.TR.ToString(), response.Locale);
            Assert.AreEqual("123456789", response.ConversationId);
            Assert.NotNull(response.SystemTime);
        }
コード例 #2
0
        public void Should_Delete_IyziLink()
        {
            BaseRequestV2 requestV2 = new BaseRequestV2();

            requestV2.Locale         = Locale.TR.ToString();
            requestV2.ConversationId = "123456789";

            IyzipayResourceV2 response = IyziLink.Delete("token", requestV2, options);

            PrintResponse(response);

            Assert.AreEqual(Status.SUCCESS.ToString(), response.Status);
            Assert.AreEqual(Locale.TR.ToString(), response.Locale);
            Assert.AreEqual("123456789", response.ConversationId);
            Assert.NotNull(response.SystemTime);
        }