示例#1
0
        public void AddValue()
        {
            _device.OnMessageSent += (message) => {
                Assert.IsNotNull(message);
            };

            var response = _device.AddValue()
                           .WithPaymentMethodType(PaymentMethodType.Gift)
                           .WithAmount(10m)
                           .Execute();

            Assert.IsNotNull(response);
            Assert.AreEqual("00", response.ResponseCode);
        }
示例#2
0
        public void TestCase10b()
        {
            var response = _device.AddValue()
                           .WithPaymentMethodType(PaymentMethodType.Gift)
                           .WithAmount(8m)
                           .Execute();

            Assert.IsNotNull(response);
            Assert.AreEqual("00", response.ResponseCode);

            Debug.WriteLine("Response: " + response.ToString());
            Debug.WriteLine("Gateway Txn ID: " + response.TransactionId);
        }
示例#3
0
        public void GiftAddValueManual()
        {
            _device.OnMessageSent += (message) => {
                Assert.IsNotNull(message);
                //Assert.IsTrue(message.StartsWith("[STX]T06[FS]1.35[FS]10[FS]1000[FS]5022440000000000098[FS]8[FS][FS][ETX]"));
            };

            var response = _device.AddValue(8m)
                           .WithPaymentMethod(card)
                           .WithAmount(10m)
                           .Execute();

            Assert.IsNotNull(response);
            Assert.AreEqual("00", response.ResponseCode);
        }