C# Class PaymentApp2_Listener, API-Platform

Payment App2 Listener class
Inheritance: System.Web.UI.Page
Datei anzeigen Open project: attdevsupport/API-Platform

Public Methods

Method Description
BypassCertificateError ( ) : void

This function is used to neglect the ssl handshake error with authentication server.

GetNotificationIds ( System stream ) : ArrayList

Represents the List of Notification Ids

/// Gets or sets the list of Notificationids. ///

Method fetches notification ids from the stream.

Protected Methods

Method Description
Page_Load ( object sender, EventArgs e ) : void

Default method, that gets called upon loading the page.

Private Methods

Method Description
GetAccessToken ( int type ) : bool

This function get the access token based on the type parameter type values. If type value is 1, access token is fetch for client credential flow If type value is 2, access token is fetch for client credential flow based on the exisiting refresh token

IsTokenValid ( ) : string

This function validates the expiry of the access token and refresh token, function compares the current time with the refresh token taken time, if current time is greater then returns INVALID_REFRESH_TOKEN function compares the difference of last access token taken time and the current time with the expiry seconds, if its more, function returns INVALID_ACCESS_TOKEN otherwise returns VALID_ACCESS_TOKEN

LogError ( string text ) : void

Logs error message onto file

ReadAccessTokenFile ( ) : bool

This function reads the Access Token File and stores the values of access token, expiry seconds refresh token, last access token time and refresh token expiry time This function returns true, if access token file and all others attributes read successfully otherwise returns false

ReadAndGetAccessToken ( ) : bool

This function is used to read access token file and validate the access token. This function returns true if access token is valid, or else false is returned.

ReadConfigFile ( ) : bool

Reads from config file and assigns to local variables

Method Details

BypassCertificateError() public static method

This function is used to neglect the ssl handshake error with authentication server.
public static BypassCertificateError ( ) : void
return void

GetNotificationIds() public method

Represents the List of Notification Ids /// Gets or sets the list of Notificationids. /// Method fetches notification ids from the stream.
public GetNotificationIds ( System stream ) : ArrayList
stream System Input stream received from listener
return ArrayList

Page_Load() protected method

Default method, that gets called upon loading the page.
protected Page_Load ( object sender, EventArgs e ) : void
sender object object that invoked this method
e EventArgs Event arguments
return void