C# Class Payment_App1, API-Platform

Default Class
Inheritance: System.Web.UI.Page
Afficher le fichier Open project: attdevsupport/API-Platform

Méthodes publiques

Méthode Description
AddRowToRefundSection ( string transaction, string merchant ) : void

Method to add row to refund section.

BypassCertificateError ( ) : void

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

CheckItemInRefundFile ( string transactionid, string merchantTransactionId ) : bool

Method to check item in refund file.

DrawRefundSection ( bool onlyRow ) : void

Method to draw refund section

GetAccessToken ( int type, Panel panelParam ) : 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

GetRefundListFromFile ( ) : void

Method to get refung list from file.

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

ProcessCreateTransactionResponse ( ) : void

Method to process create transaction response

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 ( Panel panelParam ) : 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

ResetRefundList ( ) : void

Method to reset refund list

UpdateRefundListToFile ( ) : void

Method to update refund list to file.

WriteRefundToFile ( string transactionid, string merchantTransactionId ) : void

Method to write refund to file.

Méthodes protégées

Méthode Description
BtnGetNotification_Click ( object sender, EventArgs e ) : void

Method to be triggered on Get Notification button click

BtnRefundTransaction_Click1 ( object sender, EventArgs e ) : void

Event for refund transaction

BtnViewNotary_Click ( object sender, EventArgs e ) : void

Event to view notary

GetTransactionButton_Click ( object sender, EventArgs e ) : void

Event to get transaction.

NewTransactionButton_Click ( object sender, EventArgs e ) : void

New Transaction event

Page_Load ( object sender, EventArgs e ) : void

Page Load method

Private Methods

Méthode Description
AddRowToGetTransactionSuccessPanel ( Panel panelParam, string attribute, string value ) : void

This function adds row to the success table.

AddRowToNotificationTable ( string notificationId, string notificationType, string transactionId ) : void

Method to add rows to notification response table with notification details

AddRowToRefundSuccessPanel ( Panel panelParam, string attribute, string value ) : void

This function adds row to the refund success table.

AddRowToSuccessPanel ( Panel panelParam, string attribute, string value ) : void

Method to add row to the success table

ClearRefundTable ( ) : void

Method to clear refund table.

DrawNotificationTableHeaders ( ) : void

Method to display notification response table with headers

DrawPanelForFailure ( Panel panelParam, string message ) : void

Method to draws error table.

DrawPanelForGetTransactionSuccess ( Panel panelParam ) : void

Method to draw panel for successful transaction

DrawPanelForRefundSuccess ( Panel panelParam ) : void

Method to draw panel for refund success

DrawPanelForSuccess ( Panel panelParam ) : void

Method to draw the success table

GetNotificationDetails ( ) : void

Method to get notification details

ProcessNotaryResponse ( ) : void

Method to process notary response

ReadConfigFile ( ) : bool

Reads from config file

ReadTransactionParametersFromConfigurationFile ( ) : void

Method to read transaction parameters from configuration file.

Method Details

AddRowToRefundSection() public méthode

Method to add row to refund section.
public AddRowToRefundSection ( string transaction, string merchant ) : void
transaction string Transaction as String
merchant string Merchant as string
Résultat void

BtnGetNotification_Click() protected méthode

Method to be triggered on Get Notification button click
protected BtnGetNotification_Click ( object sender, EventArgs e ) : void
sender object Sender Information
e EventArgs List of Arguments
Résultat void

BtnRefundTransaction_Click1() protected méthode

Event for refund transaction
protected BtnRefundTransaction_Click1 ( object sender, EventArgs e ) : void
sender object Sender Information
e EventArgs List of Arguments
Résultat void

BtnViewNotary_Click() protected méthode

Event to view notary
protected BtnViewNotary_Click ( object sender, EventArgs e ) : void
sender object Sender Information
e EventArgs List of Arguments
Résultat void

BypassCertificateError() public static méthode

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

CheckItemInRefundFile() public méthode

Method to check item in refund file.
public CheckItemInRefundFile ( string transactionid, string merchantTransactionId ) : bool
transactionid string Transaction Id
merchantTransactionId string Merchant Transaction Id
Résultat bool

DrawRefundSection() public méthode

Method to draw refund section
public DrawRefundSection ( bool onlyRow ) : void
onlyRow bool Row details
Résultat void

GetAccessToken() public méthode

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
public GetAccessToken ( int type, Panel panelParam ) : bool
type int Type as Interger
panelParam Panel Panel Details
Résultat bool

GetRefundListFromFile() public méthode

Method to get refung list from file.
public GetRefundListFromFile ( ) : void
Résultat void

GetTransactionButton_Click() protected méthode

Event to get transaction.
protected GetTransactionButton_Click ( object sender, EventArgs e ) : void
sender object Sender Information
e EventArgs List of Arguments
Résultat void

IsTokenValid() public méthode

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
public IsTokenValid ( ) : string
Résultat string

NewTransactionButton_Click() protected méthode

New Transaction event
protected NewTransactionButton_Click ( object sender, EventArgs e ) : void
sender object Sender Information
e EventArgs List of Arguments
Résultat void

Page_Load() protected méthode

Page Load method
protected Page_Load ( object sender, EventArgs e ) : void
sender object Sender Information
e EventArgs List of Arguments
Résultat void

ProcessCreateTransactionResponse() public méthode

Method to process create transaction response
public ProcessCreateTransactionResponse ( ) : void
Résultat void

ReadAccessTokenFile() public méthode

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
public ReadAccessTokenFile ( ) : bool
Résultat bool

ReadAndGetAccessToken() public méthode

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
public ReadAndGetAccessToken ( Panel panelParam ) : bool
panelParam Panel Panel Details
Résultat bool

ResetRefundList() public méthode

Method to reset refund list
public ResetRefundList ( ) : void
Résultat void

UpdateRefundListToFile() public méthode

Method to update refund list to file.
public UpdateRefundListToFile ( ) : void
Résultat void

WriteRefundToFile() public méthode

Method to write refund to file.
public WriteRefundToFile ( string transactionid, string merchantTransactionId ) : void
transactionid string Transaction Id
merchantTransactionId string Merchant Transaction Id
Résultat void