mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 10:36:38 +08:00
Return success response if event type is BILLING_AGREEMENTS.AGREEMENT.CREATED
This commit is contained in:
parent
632409ef1c
commit
0a892a5f5b
1 changed files with 6 additions and 1 deletions
|
@ -248,9 +248,14 @@ class IncomingWebhookEndpoint {
|
|||
}
|
||||
}
|
||||
|
||||
$event_type = $request['event_type'] ?: '';
|
||||
if ( in_array( $event_type, array( 'BILLING_AGREEMENTS.AGREEMENT.CREATED' ), true ) ) {
|
||||
return $this->success_response();
|
||||
}
|
||||
|
||||
$message = sprintf(
|
||||
'Could not find handler for request type %s',
|
||||
$request['event_type'] ?: ''
|
||||
$event_type
|
||||
);
|
||||
return $this->failure_response( $message );
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue