Uncaught Exception: Unable to load private key
I tried your sdk for wall-mart integration but it failed at the very beginning. I did the dollowing thing:
require_once 'vendor/autoload.php';
use Walmart\Feed;
$client = new Feed([
'consumerId' => 'MYCONSUMERKEY',
'privateKey' => 'MYPRIVATEKEY'
]);
$feed = $client->get([
'feedId' => 'EAA473B65DFF4DA6A80DA4C8586E4BA9@AQMBAQA', // required
'includeDetails' => 'true', // optional, default false
'limit' => 50, // optional, default 50
'offset' => 0, // optional, default 0
]);
But vendor/fillup/walmart-auth-signature-php/src/Signature.php:112 here error is thrown. I checked there
if($rsa->loadKey($decodedPrivateKey,RSA::PRIVATE_FORMAT_PKCS8)){}
was checked. Which then returned false. So I went to $rsa->loadKey where I saw
if ($key instanceof RSA) {}
if ($type === false) {}else {
$components = $this->_parseKey($key, $type);
}
The code enters into else statement where _parseKey returns false. What is actually happening here ? Am I missing any php modules or is this the fault of SDK ?
Please help me out on this. Thanks
@Tekrajs I am also using this API and I need little help for Where to get this privateKey? I have client id and client secret but I don't know from where to get privateKey? Also, there is one config parameter is required for the order API call is wmConsumerChannelType I don't know what it is and also from where to get this?
$client = new Order([
'consumerId' => '',
'privateKey' => '',
'wmConsumerChannelType' => 'WM_CONSUMER.CHANNEL.TYPE',
]);
also this error /;