/** This should always be called before attempting to call sendPayment. */ public boolean isExpired() { return paymentDetails.hasExpires() && System.currentTimeMillis() / 1000L > paymentDetails.getExpires(); }
/** Returns the expires time of the payment request, or null if none. */ @Nullable public Date getExpires() { if (paymentDetails.hasExpires()) return new Date(paymentDetails.getExpires() * 1000); else return null; }