Skip to content

Commit

Permalink
webhook
Browse files Browse the repository at this point in the history
  • Loading branch information
jampulanaveen committed May 20, 2022
1 parent 40edfd3 commit 1c6603f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
4 changes: 1 addition & 3 deletions includes/razorpay-webhook.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,8 @@ public function process()
if ($this->shouldConsumeWebhook($data) === false) {
return;
}

if (isset($_SERVER['HTTP_X_RAZORPAY_SIGNATURE']) === true) {
$razorpayWebhookSecret = $this->razorpay->getSetting('webhook_secret');

$razorpayWebhookSecret = get_option('rzp_webhook_secret');
//
// If the webhook secret isn't set on wordpress, return
//
Expand Down
2 changes: 1 addition & 1 deletion woo-razorpay.php
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ public function autoEnableWebhook()
$enabled = true;
$alphanumericString = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-=~!@#$%^&*()_+,./<>?;:[]{}|abcdefghijklmnopqrstuvwxyz';
$secret = substr(str_shuffle($alphanumericString), 0, 20);

update_option('rzp_webhook_secret', $secret);
$getWebhookFlag = get_option('webhook_enable_flag');
$time = time();

Expand Down

0 comments on commit 1c6603f

Please sign in to comment.