how to verify signature in laravel
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 25/100
Research direction
Start with the README webhook example and Laravel 8.61.0 request handling, focusing on how the raw request body is obtained for the signature check. Done means documenting a Laravel-compatible way to provide the raw body to Webhook::verifySignature using the existing signature and shared secret.
Written by the indexing model from the issue text.
Description
Hi, I wanted to know, I have a laravel project, and tried to implement this package in order to support payments with crypto.
The only problem I have is that I don't know how can I verify coinbase's signature on the webhook events.
What I'm trying to do is something like this example from the readme file:
use CoinbaseCommerce\Webhook;
try {
Webhook::verifySignature($signature, $body, $sharedSecret);
echo 'Successfully verified';
} catch (\Exception $exception) {
echo $exception->getMessage();
echo 'Failed';
}
I don't have any problem getting the signature or the shared secret, but I don't know how can I get the raw body of the request.
If anyone can help, I'd really appreciate it.
I'm using the following:
- PHP 8.0.10
- Laravel 8.61.0
- coinbase/coinbase-commerce: "^1.0",
- Dominant language
- PHP
- Stars
- 149
- Forks
- 157
- PR merge metrics
- No merged PRs in 30d
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- No contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from coinbase/coinbase-commerce-php
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
-
CheckOpen
Difficulty 5/5 Over a week Newbie friendliness 15/100
-
Difficulty 4/5 3-5 days Newbie friendliness 28/100
coinbase/coinbase-commerce-php#65 · 4 reactions ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
coinbase/coinbase-commerce-php#64 · 2 comments ·
-
charge 403 forbiddenOpen
Difficulty 3/5 1-2 days Newbie friendliness 25/100
coinbase/coinbase-commerce-php#63 · 2 comments ·
All issues in coinbase/coinbase-commerce-php
Similar issues
-
Bug-Report
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
RSS-Bridge/rss-bridge#5158 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 82/100
octobercms/october#6150 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
type/bug
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
flarum/framework#5301 · 1 comment ·
Maintainers usually reply within 1 day
-
Add TuneIn-DirMon in the bot listPossibly taken @liviuconcioiu claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
matomo-org/device-detector#8424 ·
Maintainers usually reply within 1 day