C# Class Payment_App1, API-Platform

Default Class
Inheritance: System.Web.UI.Page
Datei anzeigen Open project: attdevsupport/API-Platform

Public Methods

Method 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.

Protected Methods

Method 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

Method 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 method

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

BtnGetNotification_Click() protected method

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
return void

BtnRefundTransaction_Click1() protected method

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

BtnViewNotary_Click() protected method

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

BypassCertificateError() public static method

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

CheckItemInRefundFile() public method

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

DrawRefundSection() public method

Method to draw refund section
public DrawRefundSection ( bool onlyRow ) : void
onlyRow bool Row details
return void

GetAccessToken() public method

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
return bool

GetRefundListFromFile() public method

Method to get refung list from file.
public GetRefundListFromFile ( ) : void
return void

GetTransactionButton_Click() protected method

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

IsTokenValid() public method

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
return string

NewTransactionButton_Click() protected method

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

Page_Load() protected method

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

ProcessCreateTransactionResponse() public method

Method to process create transaction response
public ProcessCreateTransactionResponse ( ) : void
return void

ReadAccessTokenFile() public method

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
return bool

ReadAndGetAccessToken() public method

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
return bool

ResetRefundList() public method

Method to reset refund list
public ResetRefundList ( ) : void
return void

UpdateRefundListToFile() public method

Method to update refund list to file.
public UpdateRefundListToFile ( ) : void
return void

WriteRefundToFile() public method

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