C# Class Rock.Financial.GatewayComponent

Base class for financial provider components
Inheritance: Rock.Extension.Component
Mostra file Open project: NewSpring/Rock Class Usage Examples

Public Methods

Method Description
AddScheduledPayment ( FinancialGateway financialGateway, PaymentSchedule schedule, PaymentInfo paymentInfo, string &errorMessage ) : FinancialScheduledTransaction

Adds the scheduled payment.

Authorize ( FinancialGateway financialGateway, PaymentInfo paymentInfo, string &errorMessage ) : FinancialTransaction

Authorizes the specified payment information.

CancelScheduledPayment ( FinancialScheduledTransaction transaction, string &errorMessage ) : bool

Cancels the scheduled payment.

Charge ( FinancialGateway financialGateway, PaymentInfo paymentInfo, string &errorMessage ) : FinancialTransaction

Charges the specified payment info.

Credit ( FinancialTransaction origTransaction, decimal amount, string comment, string &errorMessage ) : FinancialTransaction

Credits (Refunds) the specified transaction.

GatewayComponent ( ) : System

Initializes a new instance of the GatewayComponent class.

GetAttributeValue ( FinancialGateway financialGateway, string key ) : string

Gets the attribute value for the gateway

GetAttributeValue ( string key ) : string

Use GetAttributeValue( FinancialGateway financialGateway, string key) instead. gateway component attribute values are specific to the financial gateway instance (rather than global). This method will throw an exception

GetPayments ( FinancialGateway financialGateway, System.DateTime startDate, System.DateTime endDate, string &errorMessage ) : List

Gets the payments that have been processed for any scheduled transactions

GetReferenceNumber ( FinancialScheduledTransaction scheduledTransaction, string &errorMessage ) : string

Gets an optional reference number needed to process future transaction from saved account.

GetReferenceNumber ( FinancialTransaction transaction, string &errorMessage ) : string

Gets an optional reference number needed to process future transaction from saved account.

GetScheduledPaymentStatus ( FinancialScheduledTransaction transaction, string &errorMessage ) : bool

Gets the scheduled payment status.

LoadAttributes ( FinancialGateway financialGateway ) : void

Loads the attributes for the financial gateway.

PromptForBankAccountName ( FinancialGateway financialGateway ) : bool

Prompts the name of for bank account.

PromptForBillingAddress ( FinancialGateway financialGateway ) : bool

Gets a value indicating whether [address required].

PromptForNameOnCard ( FinancialGateway financialGateway ) : bool

Gets a value indicating whether the gateway requires the name on card for CC processing

ReactivateScheduledPayment ( FinancialScheduledTransaction transaction, string &errorMessage ) : bool

Reactivates the scheduled payment.

SupportsSavedAccount ( DefinedValueCache currencyType ) : bool

Returnes a boolean value indicating if 'Saved Account' functionality is supported for the given currency type.

SupportsSavedAccount ( bool isRepeating ) : bool

Returnes a boolean value indicating if 'Saved Account' functionality is supported for frequency (i.e. one-time vs repeating )

UpdateScheduledPayment ( FinancialScheduledTransaction transaction, PaymentInfo paymentInfo, string &errorMessage ) : bool

Updates the scheduled payment.

Method Details

AddScheduledPayment() public abstract method

Adds the scheduled payment.
public abstract AddScheduledPayment ( FinancialGateway financialGateway, PaymentSchedule schedule, PaymentInfo paymentInfo, string &errorMessage ) : FinancialScheduledTransaction
financialGateway FinancialGateway The financial gateway.
schedule PaymentSchedule The schedule.
paymentInfo PaymentInfo The payment info.
errorMessage string The error message.
return FinancialScheduledTransaction

Authorize() public method

Authorizes the specified payment information.
public Authorize ( FinancialGateway financialGateway, PaymentInfo paymentInfo, string &errorMessage ) : FinancialTransaction
financialGateway FinancialGateway The financial gateway.
paymentInfo PaymentInfo The payment information.
errorMessage string The error message.
return FinancialTransaction

CancelScheduledPayment() public abstract method

Cancels the scheduled payment.
public abstract CancelScheduledPayment ( FinancialScheduledTransaction transaction, string &errorMessage ) : bool
transaction FinancialScheduledTransaction The transaction.
errorMessage string The error message.
return bool

Charge() public abstract method

Charges the specified payment info.
public abstract Charge ( FinancialGateway financialGateway, PaymentInfo paymentInfo, string &errorMessage ) : FinancialTransaction
financialGateway FinancialGateway The financial gateway.
paymentInfo PaymentInfo The payment info.
errorMessage string The error message.
return FinancialTransaction

Credit() public abstract method

Credits (Refunds) the specified transaction.
public abstract Credit ( FinancialTransaction origTransaction, decimal amount, string comment, string &errorMessage ) : FinancialTransaction
origTransaction FinancialTransaction The original transaction.
amount decimal The amount.
comment string The comment.
errorMessage string The error message.
return FinancialTransaction

GatewayComponent() public method

Initializes a new instance of the GatewayComponent class.
public GatewayComponent ( ) : System
return System

GetAttributeValue() public method

Gets the attribute value for the gateway
public GetAttributeValue ( FinancialGateway financialGateway, string key ) : string
financialGateway FinancialGateway The financial gateway.
key string The key.
return string

GetAttributeValue() public method

Use GetAttributeValue( FinancialGateway financialGateway, string key) instead. gateway component attribute values are specific to the financial gateway instance (rather than global). This method will throw an exception
Gateway Component attributes are saved specific to the financial gateway, which requires that the current financial gateway is included in order to load or retrieve values. Use the GetAttributeValue( FinancialGateway financialGateway, string key ) method instead.
public GetAttributeValue ( string key ) : string
key string The key.
return string

GetPayments() public abstract method

Gets the payments that have been processed for any scheduled transactions
public abstract GetPayments ( FinancialGateway financialGateway, System.DateTime startDate, System.DateTime endDate, string &errorMessage ) : List
financialGateway FinancialGateway The financial gateway.
startDate System.DateTime The start date.
endDate System.DateTime The end date.
errorMessage string The error message.
return List

GetReferenceNumber() public abstract method

Gets an optional reference number needed to process future transaction from saved account.
public abstract GetReferenceNumber ( FinancialScheduledTransaction scheduledTransaction, string &errorMessage ) : string
scheduledTransaction FinancialScheduledTransaction The scheduled transaction.
errorMessage string The error message.
return string

GetReferenceNumber() public abstract method

Gets an optional reference number needed to process future transaction from saved account.
public abstract GetReferenceNumber ( FinancialTransaction transaction, string &errorMessage ) : string
transaction FinancialTransaction The transaction.
errorMessage string The error message.
return string

GetScheduledPaymentStatus() public abstract method

Gets the scheduled payment status.
public abstract GetScheduledPaymentStatus ( FinancialScheduledTransaction transaction, string &errorMessage ) : bool
transaction FinancialScheduledTransaction The transaction.
errorMessage string The error message.
return bool

LoadAttributes() public method

Loads the attributes for the financial gateway.
public LoadAttributes ( FinancialGateway financialGateway ) : void
financialGateway FinancialGateway The financial gateway.
return void

PromptForBankAccountName() public method

Prompts the name of for bank account.
public PromptForBankAccountName ( FinancialGateway financialGateway ) : bool
financialGateway FinancialGateway The financial gateway.
return bool

PromptForBillingAddress() public method

Gets a value indicating whether [address required].
public PromptForBillingAddress ( FinancialGateway financialGateway ) : bool
financialGateway FinancialGateway The financial gateway.
return bool

PromptForNameOnCard() public method

Gets a value indicating whether the gateway requires the name on card for CC processing
public PromptForNameOnCard ( FinancialGateway financialGateway ) : bool
financialGateway FinancialGateway The financial gateway.
return bool

ReactivateScheduledPayment() public abstract method

Reactivates the scheduled payment.
public abstract ReactivateScheduledPayment ( FinancialScheduledTransaction transaction, string &errorMessage ) : bool
transaction FinancialScheduledTransaction The transaction.
errorMessage string The error message.
return bool

SupportsSavedAccount() public method

Returnes a boolean value indicating if 'Saved Account' functionality is supported for the given currency type.
public SupportsSavedAccount ( DefinedValueCache currencyType ) : bool
currencyType DefinedValueCache Type of the currency.
return bool

SupportsSavedAccount() public method

Returnes a boolean value indicating if 'Saved Account' functionality is supported for frequency (i.e. one-time vs repeating )
public SupportsSavedAccount ( bool isRepeating ) : bool
isRepeating bool if set to true [is repeating].
return bool

UpdateScheduledPayment() public abstract method

Updates the scheduled payment.
public abstract UpdateScheduledPayment ( FinancialScheduledTransaction transaction, PaymentInfo paymentInfo, string &errorMessage ) : bool
transaction FinancialScheduledTransaction The transaction.
paymentInfo PaymentInfo The payment info.
errorMessage string The error message.
return bool