Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

how to verify signature in laravel

Open
#54 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
25/100
Issue type
Documentation
Clarity
Needs clarification
Activity status
Stale
Tech stack
laravel, php
Domain
backend, payments

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from coinbase/coinbase-commerce-php

All issues in coinbase/coinbase-commerce-php

Similar issues

More PHP issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.