shakurov / laravel-coinbase

Laravel wrapper for the Coinbase Commerce API
MIT License
44 stars 24 forks source link

Controller for webhook #8

Closed suzandi closed 1 year ago

suzandi commented 5 years ago

Hi,

How exactly could I make the controller that handles the Endpoint?

I have created the jobs for each type of event that is sent by the Coinbase.

What I want to achive is how to get the data what is sent by the webhook, access the data to check the event type to send it to the job.

Thanks for the help!

abenevaut commented 4 years ago

It seems that the webhook controller is already mount https://github.com/shakurov/laravel-coinbase/blob/8b89894b2022ee62f189da06d4e465e26e584564/src/CoinbaseServiceProvider.php#L27; just use the url yourwebsite.tld/api/coinbase/webhook or the route coinbase-webhook;

checkout php artisan route:list

japhyamg commented 4 years ago

Hi, how can I handle any of the event types to be able to update a certain part of my application

suzandi commented 4 years ago

Hello,

Create a listener for the type of event you want to get broadcasted on your application.

devsahm commented 3 years ago

Hello,

I couldn't access the payload that was sent by webhook to the Listener with webhookCall->payload. I did Log::info() in the listener to be sure an event was fired. I got the info but I couldn't get the payload.

I need help please

devsahm commented 3 years ago

Hello guys, I was able to resolve the issue. My mistake was that I thought the payload response returned a json in my listener's handle, but it was an array.

I was able to update my application and all is now working fine.

Thanks

CodeOren commented 3 years ago

hello, I was able to create my jobs. but I'm hocked at what URL should i use as the coinbase webhook subscription URL and what controller will I use to invoke the job please i need help.

antimech commented 1 year ago

@devnoel1, hello.

The default webhook route is: /api/coinbase/webhook Don't forget to prepend your website address.

The webhook controller is also bind to this route by default.

You don't have to invoke the job, the package does that for you. Here you can read about Coinbase Commerce webhook testing.