The next function is the one to pay the bill. Before sending the bitcoins, this function will check the payment request details, including the merchant's x509 certificate. We print out in the console the payment request details to let the client know whom they are going to pay:
private static void send(PaymentSession session,WalletAppKit k) { log.info("Payment Request"); log.info("Amount to Pay: " + session.getValue().toFriendlyString()); log.info("Date: " + session.getDate()); // Probably indicates what your are paying for. log.info("Message from merchant : " + session.getMemo()); PaymentProtocol.PkiVerificationData identity = session.verifyPki(); if (identity != null) { // Merchant identity from the certificate log.info("Payment ...