C# Класс Payment_App1, API-Platform

Default Class
Наследование: System.Web.UI.Page
Показать файл Открыть проект

Открытые методы

Метод Описание
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.

Защищенные методы

Метод Описание
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

Приватные методы

Метод Описание
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.

Описание методов

AddRowToRefundSection() публичный Метод

Method to add row to refund section.
public AddRowToRefundSection ( string transaction, string merchant ) : void
transaction string Transaction as String
merchant string Merchant as string
Результат void

BtnGetNotification_Click() защищенный Метод

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
Результат void

BtnRefundTransaction_Click1() защищенный Метод

Event for refund transaction
protected BtnRefundTransaction_Click1 ( object sender, EventArgs e ) : void
sender object Sender Information
e EventArgs List of Arguments
Результат void

BtnViewNotary_Click() защищенный Метод

Event to view notary
protected BtnViewNotary_Click ( object sender, EventArgs e ) : void
sender object Sender Information
e EventArgs List of Arguments
Результат void

BypassCertificateError() публичный статический Метод

This function is used to neglect the ssl handshake error with authentication server.
public static BypassCertificateError ( ) : void
Результат void

CheckItemInRefundFile() публичный Метод

Method to check item in refund file.
public CheckItemInRefundFile ( string transactionid, string merchantTransactionId ) : bool
transactionid string Transaction Id
merchantTransactionId string Merchant Transaction Id
Результат bool

DrawRefundSection() публичный Метод

Method to draw refund section
public DrawRefundSection ( bool onlyRow ) : void
onlyRow bool Row details
Результат void

GetAccessToken() публичный Метод

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
Результат bool

GetRefundListFromFile() публичный Метод

Method to get refung list from file.
public GetRefundListFromFile ( ) : void
Результат void

GetTransactionButton_Click() защищенный Метод

Event to get transaction.
protected GetTransactionButton_Click ( object sender, EventArgs e ) : void
sender object Sender Information
e EventArgs List of Arguments
Результат void

IsTokenValid() публичный Метод

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
Результат string

NewTransactionButton_Click() защищенный Метод

New Transaction event
protected NewTransactionButton_Click ( object sender, EventArgs e ) : void
sender object Sender Information
e EventArgs List of Arguments
Результат void

Page_Load() защищенный Метод

Page Load method
protected Page_Load ( object sender, EventArgs e ) : void
sender object Sender Information
e EventArgs List of Arguments
Результат void

ProcessCreateTransactionResponse() публичный Метод

Method to process create transaction response
public ProcessCreateTransactionResponse ( ) : void
Результат void

ReadAccessTokenFile() публичный Метод

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
Результат bool

ReadAndGetAccessToken() публичный Метод

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
Результат bool

ResetRefundList() публичный Метод

Method to reset refund list
public ResetRefundList ( ) : void
Результат void

UpdateRefundListToFile() публичный Метод

Method to update refund list to file.
public UpdateRefundListToFile ( ) : void
Результат void

WriteRefundToFile() публичный Метод

Method to write refund to file.
public WriteRefundToFile ( string transactionid, string merchantTransactionId ) : void
transactionid string Transaction Id
merchantTransactionId string Merchant Transaction Id
Результат void