SDK Functions Definition
In this article, you will understand the definitions of various functions within our Windows SDK.
Note:
If you don't have the callback URL, please use the callback URL that is within your server or use https://oauth.pstmn.io/v1/browser-callback as the callback URL.
Important:
If you use the logout function, the RefreshToken is no longer valid, you need to login back in to get a new RefreshToken.
Below is the list of functions along with its definitions:
Functions | Definitions |
---|---|
public void setKey(string key) | Sets the client id. |
public void setToken(string token) | Sets the token. |
public void setRefreshToken(string token) | Sets the refresh token. |
public void setSecret(string secret) | Sets the secret. |
public void setCallBackUrl(string url) | Sets the callback URL. |
public void setBaseUrl(string url) | Sets the base URL. |
public void setoAuthUrl(string url) | Sets the OAuth URL. |
public void SetActiveTerminal(string id) | Sets the active terminal id. You must set the client id, secret, and token before making this call. |
public object GetTerminalList() | Gets the terminal list. |
public object CreateTransaction(int amount, string currency, string transactionType, int amountCashBack=0) | Sends the amount of the transaction to the active terminal to create the transaction. Please note that you need to set the client id, secret, and token before making this call. To enable the cashback functionality (optional), you can set the cashbackamount, if you wish to just create a normal transaction, you can just not set the cashbackamount. |
public string getoAuthHeader() | Builds and returns the OAuth header based on the client id, secret, and callback URL. |
public string getoAuthUrl() | Builds and returns the OAuth URL based on client id, secret, and callback URL. |
public object CheckStatus(string transactionid) | Returns the status of the given transaction id. Please note that you need to set the client id, secret, and token before making this call. |
public object CancelTransaction(string transactionid) | Cancels the given transaction id. Please note that you need to set the client id, secret, and token before making this call. |
public object GetTransactionById(string transactionid) | Returns the transaction of the given transaction id. Please note that you need to set the client id, secret, and token before making this call. |
public object GetTransactionsByStatus(string status) | Returns the transaction of the given transaction status. Please note that you need to set the client id, secret, and token before making this call. |
public object GetTransactionsByType(string type) | Returns the transaction of the given type. Please note that you need to set the client id, secret, and token before making this call. |
public object GetTransactions() | Returns the transaction for active terminal. Please note that you need to set the client id, secret, and token before making this call. |
public object RequestReportByType(string type) | Requests report for the given type. Please note that you need to set the client id, secret, and token before making this call. |
public object refreshtoken() | Refreshes the token. Please note that you need to set the client id, secret, and token before making this call. |
public object rawApi(String method,String path,String payload) | Raw acces to the API. Please note that you need to set the client id, secret, and token before making this call. The payload parameter is the json string for payload. The path parameter is the path to call. The method parameter is the API method such as POST, GET, and DELETE |
💬 We're here to help!
If you're looking for help, shoot us an email. Please include a description of the issues that you are running into.
Updated about 3 years ago