Exemplo n.º 1
0
        public static void RefundFullTwoParts(PaySession sess)
        {
            var charge = sess.Charge(FakePaySystemHost.CARD_ACCOUNT_STRIPE_CORRECT, Account.EmptyInstance,
                                     new NFX.Financial.Amount("usd", 20.00M), true, "Refund Full Explicit Charge");

            sess.Refund(charge, 15.00M, "fraudulent");
            sess.Refund(charge, 5.00M, "requested_by_customer");
        }
Exemplo n.º 2
0
        public static void RefundFullExplicit(PaySession sess)
        {
            var charge = sess.Charge(FakePaySystemHost.CARD_ACCOUNT_STRIPE_CORRECT, Account.EmptyInstance,
                                     new NFX.Financial.Amount("usd", 20.00M), true, "Refund Full Explicit Charge");

            sess.Refund(charge, 20.00M);
        }
Exemplo n.º 3
0
        public static void RefundFullImplicit(PaySession sess)
        {
            var amountToRefund = new NFX.Financial.Amount("usd", 17.25M);

            var charge = sess.Charge(FakePaySystemHost.CARD_ACCOUNT_STRIPE_CORRECT, Account.EmptyInstance, amountToRefund, true, "test payment");

            Assert.AreEqual(new NFX.Financial.Amount("usd", .0M), charge.AmountRefunded);

            sess.StoreTransaction(charge);

            sess.Refund(charge);

            Assert.AreEqual(amountToRefund, charge.AmountRefunded);
        }