public static void CaptureExplicitTotal(PaySession sess) { var amount = new NFX.Financial.Amount("usd", 17.25M); var charge = sess.Charge(FakePaySystemHost.CARD_ACCOUNT_STRIPE_CORRECT, FakePaySystemHost.CARD_ACCOUNT_STRIPE_CORRECT, amount, false, "test payment"); Assert.AreEqual(new NFX.Financial.Amount("usd", .0M), charge.AmountCaptured); sess.Capture(charge, amount.Value); Assert.AreEqual(amount, charge.AmountCaptured); }
public static void CapturePartial(PaySession sess) { var chargeAmount = new NFX.Financial.Amount("usd", 17.25M); var charge = sess.Charge(FakePaySystemHost.CARD_ACCOUNT_STRIPE_CORRECT, FakePaySystemHost.CARD_ACCOUNT_STRIPE_CORRECT, chargeAmount, false, "test payment"); Aver.AreEqual(new NFX.Financial.Amount("usd", .0M), charge.AmountCaptured); var captureAmount = 10.00M; sess.Capture(charge, amount: captureAmount); Aver.AreObjectsEqual(captureAmount, charge.AmountCaptured); }