コード例 #1
0
        public void TestAuthAsync()
        {
            var authorization = new authorization
            {
                id          = "1",
                reportGroup = "Planets",
                orderId     = "12344",
                amount      = 106,
                orderSource = orderSourceType.ecommerce,
                card        = new cardType
                {
                    type    = methodOfPaymentTypeEnum.VI,
                    number  = "414100000000000000",
                    expDate = "1210"
                },
                customBilling = new customBilling {
                    phone = "1112223333"
                }
            };

            CancellationToken cancellationToken = new CancellationToken(false);
            var response = _cnp.AuthorizeAsync(authorization, cancellationToken);

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