示例#1
0
        public void Should_Create_Pecco_Payment()
        {
            CreatePeccoInitializeRequest request = CreatePeccoInitializeRequestBuilder.Create()
                                                   .CallbackUrl("https://www.merchant.com/callback")
                                                   .PaymentGroup(PaymentGroup.LISTING.ToString())
                                                   .Price("1")
                                                   .PaidPrice("10")
                                                   .Build();

            string token = PeccoInitialize.Create(request, Options).Token;

            CreatePeccoPaymentRequest peccoPaymentRequest = CreatePeccoPaymentRequestBuilder.Create()
                                                            .Token(token)
                                                            .Build();

            PeccoPayment peccoPayment = PeccoPayment.Create(peccoPaymentRequest, Options);

            PrintResponse(peccoPayment);
        }
示例#2
0
        public void Should_Create_Pecco_Payment()
        {
            CreatePeccoPaymentRequest request = new CreatePeccoPaymentRequest();

            request.Locale         = Locale.TR.ToString();
            request.ConversationId = "123456789";
            request.Token          = "token";

            PeccoPayment peccoPayment = PeccoPayment.Create(request, options);

            PrintResponse <PeccoPayment>(peccoPayment);

            Assert.AreEqual(Status.SUCCESS.ToString(), peccoPayment.Status);
            Assert.AreEqual(Locale.TR.ToString(), peccoPayment.Locale);
            Assert.AreEqual("123456789", peccoPayment.ConversationId);
            Assert.IsNotNull(peccoPayment.SystemTime);
            Assert.IsNull(peccoPayment.ErrorCode);
            Assert.IsNull(peccoPayment.ErrorMessage);
            Assert.IsNull(peccoPayment.ErrorGroup);
        }