paytm-pg-node-sdk
Version:
Paytm SDK for Node.js
79 lines (78 loc) • 2.64 kB
TypeScript
/**
* Copyright (C) 2019 Paytm.
*/
export declare class Payment {
/**
* createTxnToken gets PaymentDetail object as parameter and creates request
* object to call ProcessRequest.process. It returns the
* InitiateTransactionResponseBody which holds the createTxnToken result
* parameters which will be used by merchant in future. It handles the exception
* if occurred, and returns the respective object with error message.
*
* @param PaymentDetail
* @return SDKResponse
* @throws Exception
*/
static createTxnToken(paymentDetails: any): Promise<any>;
/**
* validateCreateTxnToken checks if all mandatory parameters are present for
* CreateTxnToken api call.
* If not, then this will throw SDKException exception
*
* @param PaymentDetail
* @throws Exception
* @return void
*/
private static validatePaymentDetailsObject;
/**
* @param PaymentDetail
* @return InitiateTransactionRequest
* @throws Exception
*/
private static createInitiateTransactionRequest;
/**
* setSignature set the signature in head(SecureRequestHeader), signature will
* be generated by the body(Object)
*
* @param SecureRequestHeader
* @param InitiateTransactionRequestBody|NativePaymentStatusRequestBody
* @throws Exception
*/
private static setSignature;
/**
* getPaymentStatus gets constant parameters and creates request object to call
* ProcessRequest.process. It returns the NativeMerchantStatusResponseBody which
* holds the getPaymentStatus result parameters which will be used by merchant
* in future. It handles the exception if occurred, and returns the respective
* object with error message.
*
* @param PaymentStatusDetail
* @return SDKResponse
* @throws Exception
*/
static getPaymentStatus(paymentStatusDetail: any): Promise<any>;
/**
* validateGetPaymentStatus checks if all mandatory parameters are present for
* Payment Status api call. If not, then is will throw the
* SDKException exception
*
* @param PaymentStatusDetail
* @return void
* @throws Exception
*/
private static validatePaymentStatusDetailObject;
/**
* @param PaymentStatusDetail
* @return NativePaymentStatusRequest
* @throws Exception
*/
private static createNativePaymentStatusRequest;
/**
* @param url
* @param mid
* @param orderId
* @return string
* Returns the url string with adding queryParameters
*/
private static urlBuilder;
}