Closed vaibsshukla closed 5 years ago
You have all the information in the response:
interface PaytmResponseIos {
ORDERID: string;
MID: string;
TXNID: string;
TXNAMOUNT: string;
PAYMENTMODE: string;
CURRENCY: string;
TXNDATE: string;
STATUS: string;
RESPCODE: string;
RESPMSG: string;
GATEWAYNAME: string;
BANKTXNID: string;
BANKNAME: string;
CHECKSUMHASH: string;
}
interface PaytmResponseAndroid extends PaytmResponseIos {
status: string;
}
What are you missing?
Fell free to reopen the issue.
I need a response with transaction details. The status I am getting is Success, Failure, Cancel.
onPayTmResponse = (resp) => { const {STATUS, status, response} = resp; if (Platform.OS === 'ios') { if (status === 'Success') { const jsonResponse = JSON.parse(response); const {STATUS} = jsonResponse;
} else { if (STATUS && STATUS === 'TXN_SUCCESS') { // Payment succeed! console.log('Transaction Success android'+STATUS) } } };