I went through the Razorpay Android SDK Integration guide but was unable to find any reference for getting the transaction time for a successful payment transaction.
The integration guide shows the following way of listening to the payment result. Ref : Step 5 - Handle Success and Error Events
public class MerchantActivity extends Activity implements PaymentResultListener {
// ...
@Override
public void onPaymentSuccess(String razorpayPaymentID) {
/**
* Add your logic here for a successful payment response
*/
}
@Override
public void onPaymentError(int code, String response) {
/**
* Add your logic here for a failed payment response
*/
}
}
They have another alternative to this, which is PaymentResultWithDataListener with an object of PaymentData passed as an argument. It doesn`t have any data related to payment transaction time.
What is the alternative here? Using the device current timestamp can be one option but is not reliable because users tend to change the device date/time.