razorpay / razorpay-php

Razorpay PHP Library
MIT License
183 stars 126 forks source link

Access Denied #373

Open kirankumarmitnas opened 6 months ago

kirankumarmitnas commented 6 months ago

Steps to reproduce the behavior

Screenshot 2024-03-18 165726

Expected behavior

webhook not created or edited

Actual behavior

webhook not created or edited

Code snippets

$webhookID='webhookid';
$accountID='account id';
$webHookProcessUrl='http://workingapp.com/index.php/razorpay/status/846db8b2598bd3db9f3285db17711e26';
$webhookSupportedEvents=array('payment.captured','order.paid','payment_link.paid');
$webHookSecretPost='07e7caf67b4142f44b09c7cc4fd9386f';
Create Webhook
=================
$api->account->fetch($accountID)->webhooks()->create(array(
"url" => $webHookProcessUrl,
"secret" => $webHookSecretPost,
"events" => $webhookSupportedEvents
));
For edit Webhook code
================
$api->account->fetch($transferAccountID)->webhooks()->edit($webhookID, array("url" => $webHookProcessUrl,"events" => $webhookSupportedEvents));

Php version

8.2

Library version

2.9.0

Additional Information

No response

Kaizodo commented 2 months ago

@kirankumarmitnas where did you find the webhook create api ? documentation can you please mention the link