From f61a8c3cfa0824eb8718438893a8ed7c0bc5b4e1 Mon Sep 17 00:00:00 2001 From: R Daitan <66294995+rdaitan-cp@users.noreply.github.com> Date: Tue, 1 Jun 2021 17:45:23 +0800 Subject: [PATCH 1/2] Reintroduce `paymongo.webhook_signature` config The key is being used in the [middleware](https://github.com/rdaitan-cp/laravel-paymongo/blob/1.x/src/Middlewares/PaymongoValidateSignature.php#L71) but no longer exists in the configuration. This caused existing installations of the library to no longer accept Source Chargeable webhooks. The problem can be replicated by using the middleware without the event parameter. --- config/config.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/config/config.php b/config/config.php index 55cf93b..ebaf628 100644 --- a/config/config.php +++ b/config/config.php @@ -44,6 +44,11 @@ 'payment_failed' => env('PAYMONGO_WEBHOOK_SIG_PAYMENT_FAILED', env('PAYMONGO_WEBHOOK_SIG')), 'source_chargeable' => env('PAYMONGO_WEBHOOK_SIG_SOURCE_CHARGABLE', env('PAYMONGO_WEBHOOK_SIG')), ], + + /** + * Webhook signature configuration for backwards compatibility. + */ + 'webhook_signature' => env('PAYMONGO_WEBHOOK_SIG'), /* * This is the name of the header where the signature will be added. From e886dfb7e005be6d672ace7bf711260b405b15b3 Mon Sep 17 00:00:00 2001 From: R Daitan <66294995+rdaitan-cp@users.noreply.github.com> Date: Tue, 1 Jun 2021 17:49:35 +0800 Subject: [PATCH 2/2] Remove unnecessary whitespace --- config/config.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/config.php b/config/config.php index ebaf628..559e91e 100644 --- a/config/config.php +++ b/config/config.php @@ -44,7 +44,7 @@ 'payment_failed' => env('PAYMONGO_WEBHOOK_SIG_PAYMENT_FAILED', env('PAYMONGO_WEBHOOK_SIG')), 'source_chargeable' => env('PAYMONGO_WEBHOOK_SIG_SOURCE_CHARGABLE', env('PAYMONGO_WEBHOOK_SIG')), ], - + /** * Webhook signature configuration for backwards compatibility. */