Skip to content
This repository has been archived by the owner on Jan 22, 2021. It is now read-only.

IPNlogger.php includes no private/public key, just token #278

Closed
petzsch opened this issue May 10, 2018 · 1 comment
Closed

IPNlogger.php includes no private/public key, just token #278

petzsch opened this issue May 10, 2018 · 1 comment

Comments

@petzsch
Copy link

petzsch commented May 10, 2018

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. 👍

@pieterpoorthuis
Copy link

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants