An NDoc Documented Class Library

CreditProcessor.Charge Method 

Charges the credit card for the specified amount. Increases the card balance by the amount specified.

public int Charge(
   string cardNumber,
   double amount
);

Parameters

cardNumber
Credit card number to be charged
amount
Charge amount

Return Value

Charge transaction number or charge code

Exceptions

Exception TypeCondition
CreditOverflowExceptionIf charge plus current balance exceeds credit limit.
InvalidCreditCardNumberExceptionIf given card number if not valid.

See Also

CreditProcessor Class | CreditProcessLib Namespace