Ezio BavieraQuestions(6)Answers(0)Posts(0)CommentsHi, I'm sorry to bother all the time, but I bought laraship elite a year ago and I haven't been able to create my portal yet. Every time we take a step forward, something else doesn't work. Can you help me?On Private: Answer for Error during amazon importing productswhen i import product from amazon in the ecommerce module i can't see products, datatables have this error:{"draw":1,"recordsTotal":10,"recordsFiltered":0,"data":[],"error":"Exception Message:\n\nTrying to access array offset on value of type null"}How i can fix this problem? On Private: Answer for Error during amazon importing productsyou need replase in line 91 parseResponse($response, $categories, $tags, $import, $brands); => $this->parseResponse($response, $categories, $tags, $import, $brands);On Private: Answer for Error during amazon importing productsWith the following command php artisan import:run i have the error:Running Import: ComputerIn RunImports.php line 91: Call to undefined function Corals\Modules\Amazon\Console\Commands\parseResponse()On Private: Answer for Error during amazon importing productsTnx a lotOn Private: Answer for Error during amazon importing productsthe second subscription ends and I can't make my website whit Amazon products. Now I must pay again or you gift me a dubscription?On Private: Answer for Error during amazon importing productsHave some news for me? On Private: Answer for Error during amazon importing productsMy account was locked by amazon, i contact support the fix problem and now all working and i have api again.On Private: Answer for Error during amazon importing productsHere you can found a demo response http://eziobav.com/a.phpHere you can download the working file https://we.tl/t-wOMWVPIzmlOn Private: Answer for Error during amazon importing productsI found a solution. The following code working very well:setRegionName($region);$awsv4->setServiceName($serviceName);$awsv4->setPath ($uriPath);$awsv4->setPayload ($payload);$awsv4->setRequestMethod ("POST");$awsv4->addHeader ('content-encoding', 'amz-1.0');$awsv4->addHeader ('content-type', 'application/json; charset=utf-8');$awsv4->addHeader ('host', $host);$awsv4->addHeader ('x-amz-target', 'com.amazon.paapi5.v1.ProductAdvertisingAPIv1.SearchItems');$headers = $awsv4->getHeaders ();$headerString = "";foreach ( $headers as $key => $value ) { $headerString .= $key . ': ' . $value . "\r\n";}$params = array ( 'http' => array ( 'header' => $headerString, 'method' => 'POST', 'content' => $payload ) );$stream = stream_context_create ( $params );$fp = @fopen ( 'https://'.$host.$uriPath, 'rb', false, $stream );if (! $fp) { throw new Exception ( "Exception Occured" );}$response = @stream_get_contents ( $fp );if ($response === false) { throw new Exception ( "Exception Occured" );}echo $response;class AwsV4 { private $accessKey = null; private $secretKey = null; private $path = null; private $regionName = null; private $serviceName = null; private $httpMethodName = null; private $queryParametes = array (); private $awsHeaders = array (); private $payload = ""; private $HMACAlgorithm = "AWS4-HMAC-SHA256"; private $aws4Request = "aws4_request"; private $strSignedHeader = null; private $xAmzDate = null; private $currentDate = null; public function __construct($accessKey, $secretKey) { $this->accessKey = $accessKey; $this->secretKey = $secretKey; $this->xAmzDate = $this->getTimeStamp (); $this->currentDate = $this->getDate (); } function setPath($path) { $this->path = $path; } function setServiceName($serviceName) { $this->serviceName = $serviceName; } function setRegionName($regionName) { $this->regionName = $regionName; } function setPayload($payload) { $this->payload = $payload; } function setRequestMethod($method) { $this->httpMethodName = $method; } function addHeader($headerName, $headerValue) { $this->awsHeaders [$headerName] = $headerValue; } private function prepareCanonicalRequest() { $canonicalURL = ""; $canonicalURL .= $this->httpMethodName . "\n"; $canonicalURL .= $this->path . "\n" . "\n"; $signedHeaders = ''; foreach ( $this->awsHeaders as $key => $value ) { $signedHeaders .= $key . ";"; $canonicalURL .= $key . ":" . $value . "\n"; } $canonicalURL .= "\n"; $this->strSignedHeader = substr ( $signedHeaders, 0, - 1 ); $canonicalURL .= $this->strSignedHeader . "\n"; $canonicalURL .= $this->generateHex ( $this->payload ); return $canonicalURL; } private function prepareStringToSign($canonicalURL) { $stringToSign = ''; $stringToSign .= $this->HMACAlgorithm . "\n"; $stringToSign .= $this->xAmzDate . "\n"; $stringToSign .= $this->currentDate . "/" . $this->regionName . "/" . $this->serviceName . "/" . $this->aws4Request . "\n"; $stringToSign .= $this->generateHex ( $canonicalURL ); return $stringToSign; } private function calculateSignature($stringToSign) { $signatureKey = $this->getSignatureKey ( $this->secretKey, $this->currentDate, $this->regionName, $this->serviceName ); $signature = hash_hmac ( "sha256", $stringToSign, $signatureKey, true ); $strHexSignature = strtolower ( bin2hex ( $signature ) ); return $strHexSignature; } public function getHeaders() { $this->awsHeaders ['x-amz-date'] = $this->xAmzDate; ksort ( $this->awsHeaders ); // Step 1: CREATE A CANONICAL REQUEST $canonicalURL = $this->prepareCanonicalRequest (); // Step 2: CREATE THE STRING TO SIGN $stringToSign = $this->prepareStringToSign ( $canonicalURL ); // Step 3: CALCULATE THE SIGNATURE $signature = $this->calculateSignature ( $stringToSign ); // Step 4: CALCULATE AUTHORIZATION HEADER if ($signature) { $this->awsHeaders ['Authorization'] = $this->buildAuthorizationString ( $signature ); return $this->awsHeaders; } } private function buildAuthorizationString($strSignature) { return $this->HMACAlgorithm . " " . "Credential=" . $this->accessKey . "/" . $this->getDate () . "/" . $this->regionName . "/" . $this->serviceName . "/" . $this->aws4Request . "," . "SignedHeaders=" . $this->strSignedHeader . "," . "Signature=" . $strSignature; } private function generateHex($data) { return strtolower ( bin2hex ( hash ( "sha256", $data, true ) ) ); } private function getSignatureKey($key, $date, $regionName, $serviceName) { $kSecret = "AWS4" . $key; $kDate = hash_hmac ( "sha256", $date, $kSecret, true ); $kRegion = hash_hmac ( "sha256", $regionName, $kDate, true ); $kService = hash_hmac ( "sha256", $serviceName, $kRegion, true ); $kSigning = hash_hmac ( "sha256", $this->aws4Request, $kService, true ); return $kSigning; } private function getTimeStamp() { return gmdate ( "Ymd\THis\Z" ); } private function getDate() { return gmdate ( "Ymd" ); }}?>On Private: Answer for Error during amazon importing productsif you try this code:curl --location --request POST 'https://webservices.amazon.com/paapi5/searchitems' \--header 'Host: webservices.amazon.com' \--header 'Content-Type: application/json; charset=UTF-8' \--header 'X-Amz-Date: 20201111T145350Z' \--header 'X-Amz-Target: com.amazon.paapi5.v1.ProductAdvertisingAPIv1.SearchItems' \--header 'Content-Encoding: amz-1.0' \--header 'User-Agent: paapi-docs-curl/1.0.0' \--header 'Authorization: AWS4-HMAC-SHA256 Credential=AKIAJDKAN2CFCSCXDZSA/20201111/us-east-1/ProductAdvertisingAPI/aws4_request SignedHeaders=content-encoding;host;x-amz-date;x-amz-target Signature=4329d5713db8d7a85e8516ef6b636e25a2642eb65f5b5723e8732e9f321a4302' \--data-raw '{"Marketplace":"www.amazon.com","PartnerType":"Associates","PartnerTag":"technnews0b-21","Keywords":"kindle","SearchIndex":"All","ItemCount":3,"Resources":["Images.Primary.Large","ItemInfo.Title","Offers.Listings.Price"]}'The prblem will be dibbretent becouse the response is:{"__type":"com.amazon.paapi5#TooManyRequestsException","Errors":[{"Code":"TooManyRequests","Message":"The request was denied due to request throttling. Please verify the number of requests made per second to the Amazon Product Advertising API."}]}I' tring to contact amazon to fix this problem. For old account this error will be possibile.On Private: Answer for Error during amazon importing productswhere is the solution? you have not entered anything apart from the messageOn Private: Answer for Error during amazon importing productsThis is a screenshot of my account page.https://ibb.co/vXDwYP5On Private: Answer for Error during amazon importing productsWe transfer link for downloaded credential from amazonhttps://we.tl/t-EEVk2g1Ov3On Private: Answer for Error during amazon importing productsaccess key => AKIAICOEZDPPD6KP3UQAsecret key => 2qYX9iwGG5vU1W4TV1WZAYz63UepEkd6xl2YszOxPartner ID: technnews0b-21On Private: Answer for Error during amazon importing productsDon't warry, country is it and tag technnews0b-21On Private: Answer for Error during amazon importing productssureaccess key AKIAJWA6OQKILAVATRMAsecret key SrKpVXz4KPcjjNjUzlbviAThuPGqD0S6mnAhHEqkOn Private: Answer for Error during amazon importing productsI bought the second license, but still the plugin for amazon has not been updated. When are you planning to fix the bee problem?On Private: Answer for Error during amazon importing productsTnx a lot 😉On Answer for Translations in subscrption not working protertyI create text or number fields but in some plan i need leave empty i can't save becouse value is required, but whit this fix i can use empty fileds and in frontend i see the cross in the relative feature. I make another fix to manage all corretly and i just finished to test it. If you want i can send you the code.Look this example https://ibb.co/NFwLWMCOn Answer for Subscription blolean can’t be falsei suggest this fix in Corals\modules\Subscriptions\Http\Requests\PlanRequest.php<pre>foreach ($this->get('features', []) as $id => $feature) { $featureModel = Feature::find($id); switch ($featureModel->type) { case 'text': case 'config': $rules = array_merge($rules, [ "features.{$id}.value" => 'required' ]); break; case 'quantity': $rules = array_merge($rules, [ "features.{$id}.value" => 'numeric' ]); break; }}</pre>and this in pricing view<pre><ul class="list-unstyled price-features"> @foreach($product->activeFeatures as $feature) @if($plan_feature = $plan->features()->where('feature_id',$feature->id)->first()) <li> @if(!empty($plan_feature->pivot->plan_caption)) {{ $plan_feature->pivot->plan_caption }} @else @if($feature->type=="boolean") @if($plan_feature->pivot->value) <i class="fa fa-check"></i> @else <i class="fa fa-times"></i> @endif @else @if($plan_feature->pivot->value != "") {{$plan_feature->pivot->value }} {{$feature->unit }} @else <i class="fa fa-times"></i> @endif @endif {{ $feature->caption }} @endif </li> @else <li> <i class="fa fa-times"></i> {{ $feature->caption }} </li> @endif @endforeach</ul></pre>On Answer for Subscription blolean can’t be falsenow working, tnxOn Answer for Can’t delete subscriptionsi can't delete and edit subscriptionOn Can’t delete subscriptionsHave some News?On Private: Answer for Error during amazon importing productsHave some news for update?On Private: Answer for Error during amazon importing productstnx a lotOn Private: Answer for Error during amazon importing productsif my subscription end can i have update right? On Private: Answer for Error during amazon importing productsyou can use ftp credential. they work On Answer for Error during amazon importing productsplease hide this credentialOn Answer for Error during amazon importing productsFTP:url: service.biteweb.ituser: globywifipassword: )JKdot5&rUTHOn Answer for Error during amazon importing productshttps://globywifi.it/loginuser: admin@admin.itpass: coral123On Answer for Error during amazon importing productsMy system continue to not working, have some news? On Answer for Error during amazon importing productsSome News?On Answer for Error during amazon importing productstnx now workingOn Answer for php artisan error whit any parametersClient error: `GET http://webservices.amazon.com/onca/xml?AWSAccessKeyId=XXXXXXD6CWLEDFJQ&AssociateTag=technnews0b-21&ItemPage=1&Keywords=Intel&Operation=ItemSearch&ResponseGroup=ItemAttributes%2CImages%2CEditorialReview%2CReviews%2CVariations%2COffers%2CBrowseNodes&SearchIndex=All&Service=AWSECommerceService&Timestamp=2020-04-22T23%3A48%3A42Z&Version=2013-08-01&Signature=o3O8QklwE3vF1E7bQH59zwq3DrOBre190behHtZJl%2F4%3D` resulted in a `410 Gone` response:410 GoneGoneT (truncated...)yes I configured all like guideOn Answer for Error during amazon importing productsNow working. TnxOn Answer for i can’t install corals-announcement.yesOn classified user dashboard not load viewCrop