mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-08-31 06:52:50 +08:00
Add webhook status to status report
This commit is contained in:
parent
27d71e14c3
commit
f845acefbe
5 changed files with 124 additions and 4 deletions
|
@ -32,11 +32,13 @@ return array(
|
|||
$factory = $container->get( 'api.factory.webhook' );
|
||||
$endpoint = $container->get( 'api.endpoint.webhook' );
|
||||
$rest_endpoint = $container->get( 'webhook.endpoint.controller' );
|
||||
$last_webhook_storage = $container->get( 'webhook.last-webhook-storage' );
|
||||
$logger = $container->get( 'woocommerce.logger.woocommerce' );
|
||||
return new WebhookRegistrar(
|
||||
$factory,
|
||||
$endpoint,
|
||||
$rest_endpoint,
|
||||
$last_webhook_storage,
|
||||
$logger
|
||||
);
|
||||
},
|
||||
|
@ -48,6 +50,7 @@ return array(
|
|||
$verify_request = ! defined( 'PAYPAL_WEBHOOK_REQUEST_VERIFICATION' ) || PAYPAL_WEBHOOK_REQUEST_VERIFICATION;
|
||||
$webhook_event_factory = $container->get( 'api.factory.webhook-event' );
|
||||
$simulation = $container->get( 'webhook.status.simulation' );
|
||||
$last_webhook_storage = $container->get( 'webhook.last-webhook-storage' );
|
||||
|
||||
return new IncomingWebhookEndpoint(
|
||||
$webhook_endpoint,
|
||||
|
@ -56,6 +59,7 @@ return array(
|
|||
$verify_request,
|
||||
$webhook_event_factory,
|
||||
$simulation,
|
||||
$last_webhook_storage,
|
||||
... $handler
|
||||
);
|
||||
},
|
||||
|
@ -183,6 +187,13 @@ return array(
|
|||
);
|
||||
},
|
||||
|
||||
'webhook.last-webhook-storage' => static function ( ContainerInterface $container ): WebhookInfoStorage {
|
||||
return new WebhookInfoStorage( $container->get( 'webhook.last-webhook-storage.key' ) );
|
||||
},
|
||||
'webhook.last-webhook-storage.key' => static function ( ContainerInterface $container ): string {
|
||||
return 'ppcp-last-webhook';
|
||||
},
|
||||
|
||||
'webhook.module-url' => static function ( ContainerInterface $container ): string {
|
||||
return plugins_url(
|
||||
'/modules/ppcp-webhooks/',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue