コード例 #1
0
        public void GetTransactionHasTxnStatus()
        {
            // Make transaction
            var card = new HpsCreditCard
            {
                Number = "4111111111111111",
                ExpMonth = 12,
                ExpYear = 2025,
                Cvv = "012"
            };

            var creditService = new HpsCreditService(ServicesConfig);
            var response = creditService.Charge(15.15m, "usd", card);
            Assert.IsNotNull(response);
            Assert.AreEqual("00", response.ResponseCode);

            // Get details
            var details = creditService.Get(response.TransactionId);
            Assert.IsNotNull(details);
            Assert.IsNotNull(details.TransactionStatus);
            Assert.AreNotEqual("", details.TransactionStatus);
        }