示例#1
0
        public void TestCaptureGivenAuthAsync()
        {
            var capturegivenauth = new captureGivenAuth
            {
                id              = "1",
                amount          = 106,
                orderId         = "12344",
                authInformation = new authInformation
                {
                    authDate   = new DateTime(2002, 10, 9),
                    authCode   = "543216",
                    authAmount = 12345,
                },
                orderSource = orderSourceType.ecommerce,
                card        = new cardType
                {
                    type    = methodOfPaymentTypeEnum.VI,
                    number  = "4100000000000000",
                    expDate = "1210",
                },
                processingType = processingType.accountFunding,
                originalNetworkTransactionId = "abc123",
                originalTransactionAmount    = 123456789
            };
            CancellationToken cancellationToken = new CancellationToken(false);
            var response = _cnp.CaptureGivenAuthAsync(capturegivenauth, cancellationToken);

            Assert.AreEqual("000", response.Result.response);
        }