AfterShip / aftership-sdk-php

The PHP SDK of AfterShip API
65 stars 46 forks source link

Add webhooks validator function #47

Closed savchukoleksii closed 4 years ago

savchukoleksii commented 4 years ago

Hi! Can you review my code that everything is ok? That I will create some examples and update docs

codecov[bot] commented 4 years ago

Codecov Report

Merging #47 into master will decrease coverage by 5.00%. The diff coverage is 0.00%.

Impacted file tree graph

@@              Coverage Diff              @@
##              master      #47      +/-   ##
=============================================
- Coverage     100.00%   95.00%   -5.00%     
- Complexity        86       90       +4     
=============================================
  Files              6        7       +1     
  Lines            190      200      +10     
=============================================
  Hits             190      190              
- Misses             0       10      +10     
Impacted Files Coverage Δ Complexity Δ
src/Webhooks.php 0.00% <0.00%> (ø) 4.00 <4.00> (?)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 911c0cc...85c7b6a. Read the comment docs.

Bossa573 commented 4 years ago

Thanks for the contribution, however, the webhook validation is only a standard HMAC-SHA256 which is unrelated to the API itself - and in fact, from the code itself, you can see the component is independent of the rest of the SDK. I suggest you could put it on your local utility file rather than in the SDK.