Fix getInvoice.php tutorial
This commit is contained in:
parent
c25d3d3c99
commit
8b3f1663f1
@ -15,13 +15,19 @@ require __DIR__.'/../../vendor/autoload.php';
|
||||
|
||||
// Now fetch the invoice from BitPay
|
||||
|
||||
$storageEngine = new \Bitpay\Storage\EncryptedFilesystemStorage('YourTopSecretPassword');
|
||||
$privateKey = $storageEngine->load('/tmp/bitpay.pri');
|
||||
$publicKey = $storageEngine->load('/tmp/bitpay.pub');
|
||||
$client = new \Bitpay\Client\Client();
|
||||
$adapter = new \Bitpay\Client\Adapter\CurlAdapter();
|
||||
$client->setPrivateKey($privateKey);
|
||||
$client->setPublicKey($publicKey);
|
||||
$client->setUri('https://btcpay.server/');
|
||||
$client->setAdapter($adapter);
|
||||
|
||||
$token = new \Bitpay\Token();
|
||||
$token->setToken('UpdateThisValue'); // UPDATE THIS VALUE
|
||||
$token->setFacade('merchant');
|
||||
|
||||
$client->setToken($token);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user