diff --git a/Controller/Payment/Webhook.php b/Controller/Payment/Webhook.php index cb59a25a..b0884712 100644 --- a/Controller/Payment/Webhook.php +++ b/Controller/Payment/Webhook.php @@ -135,7 +135,9 @@ public function execute() try { - $this->rzp->utility->verifyWebhookSignature(json_encode($post), $_SERVER['HTTP_X_RAZORPAY_SIGNATURE'], $webhookSecret); + $postData = file_get_contents('php://input'); + + $this->rzp->utility->verifyWebhookSignature($postData, $_SERVER['HTTP_X_RAZORPAY_SIGNATURE'], $webhookSecret); } catch (Errors\SignatureVerificationError $e) { diff --git a/composer.json b/composer.json index 8eedf3f6..34860e4f 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "name": "razorpay/magento", "description": "Razorpay Magento 2.0 plugin for accepting payments.", - "version": "3.5.2", + "version": "3.5.3", "require": { "php": "~5.5.0|~5.6.0|^7.0", "razorpay/razorpay": "2.*" diff --git a/etc/module.xml b/etc/module.xml index ec2d6feb..afdd6a61 100644 --- a/etc/module.xml +++ b/etc/module.xml @@ -1,6 +1,6 @@ - +