vrajroham / laravel-bitpay

Laravel BitPay Client | Accept Bitcoin(Ƀ) and Bitcoin Cash for your business with your Laravel application
MIT License
74 stars 34 forks source link

failed to initialize BitPay Client (Config) : failed to build configuration : Private Key not found/valid #22

Closed sanaderi closed 2 years ago

sanaderi commented 4 years ago

I'm create token by bitpay dashboard and setup other config but get this error:

failed to initialize BitPay Client (Config) : failed to build configuration : Private Key not found/valid vendor/bitpay/sdk/src/BitPaySDK/Client.php:125

vrajroham commented 4 years ago

Did you add a token to .env file? Please share some steps or code, to assist you better.

sanaderi commented 4 years ago

Add token to last line of laravel-bitpay.php config file like the attached file

Screenshot_20200907-200836_JuiceSSH

asadglobalshopaholics commented 3 years ago

@vrajroham same issue i'm facing right now what i observe that when i run php artisan laravel-bitpay:createkeypair this will create bitpay.pri file in /tmp directory (OS ubuntu) but i'm unable to find bitpay.pub file in /tmp directory may be this issue i'm facing due to this reason can you please help that how can i get bitpay.pub file or there is another way to create it ???

vrajroham commented 3 years ago

@asadglobalshopaholics Change your key location to project storage where those keys could be persistently stored.

E.g.

BITPAY_PRIVATE_KEY_PATH=/var/www/project-name/storage/bitpay.pri
BITPAY_PUBLIC_KEY_PATH=/var/www/project-name/storage/bitpay.pub

then run php artisan laravel-bitpay:createkeypair

brijesh1997 commented 3 years ago

@vrajroham , I am fetching issue same as @asadglobalshopaholics

I tried above your given solution but I didn't find bitpay.pub file.