I found this post about BitPay but it's not very clear how I can use it.
https://help.bitpay.com/development/how-do-i-use-the-bitpay-java-client-library
I implemented this code:
public void createInvoice() throws BitPayException
{
ECKey key = KeyUtils.createEcKey();
BitPay bitpay = new BitPay(key);
InvoiceBuyer buyer = new InvoiceBuyer();
buyer.setName("Satoshi");
buyer.setEmail("[email protected]");
Invoice invoice = new Invoice(100.0, "USD");
invoice.setBuyer(buyer);
invoice.setFullNotifications(true);
invoice.setNotificationEmail("[email protected]");
invoice.setPosData("ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890");
Invoice createInvoice = bitpay.createInvoice(invoice);
}
How should I implement the private key?