Closed petzsch closed 6 years ago
IPNLogger uses the public facade to fetch the invoice, so it doesn't need keys. Using the public facade invoices can be fetched up until 3 days after invoice creation.
If you want you can use the merchant facade. In this case you do need the keys, a merchant facade token and to explicitly set the facade name to 'merchant':
$token = new \Bitpay\Token();
$token->setToken('your_token'); // UPDATE THIS VALUE
$token->setFacade("merchant");
/**
* Token object is injected into the client
*/
$client->setToken($token);
Using the merchant facade has the advantage that you can also fetch invoices after 3 days.
Is that intended or a bug?
From my understanding the IPNlogger.php needs the keys to query the BitPay API for invoice details. Please fix if it is not a misunderstanding from my side.
Thx for the great library, it's fun working with this. :+1: