Enhanced error logging for PayPal API exceptions to provide more detailed information for troubleshooting and debugging.
Added ErrorDetail domain class and updated PayPalErrorResponse to map fine-grained API error details.
Centralized exception processing by copying processException and moving its associated helper methods from DefaultPayPalCheckoutTransactionService to PayPalUtils. Introduced support for 404 (mapped to a new RESOURCE_NOT_FOUND failure type) and 422 (mapped to a new UNPROCESSABLE_ENTITY failure type) via the newly added PayPalTransactionFailureTypes enum. Also added try-catch blocks in DefaultPayPalOrderService and DefaultPayPalCheckoutReportingService to consistently handle API exceptions through PayPalUtils.
Protected methods isPaymentMethodDecline and isPaymentDecline were moved from DefaultPayPalCheckoutTransactionService to PayPalUtils to ensure consistent handling of payment declines across the service.
Modified DefaultPayPalCheckoutTransactionService to call PayPalUtils#processException when exceptions are caught.
Deprecated DefaultPayPalCheckoutTransactionService#processException, which now delegates to PayPalUtils.processException to ensure backward compatibility for any classes extending the service.
By default, the WebClient bean(s) declared in this module are now configured to leverage the new shared dedicated blc-external-service connection pool from MicroExtensionCommon (and in test contexts where that bean may not be available, quietly fall back to the previous anonymous pool).
This improves upon the previous configuration by having published metrics, while still remaining backward compatible with the previous behavior.
New ClientHttpConnector beans introduced in this module (can be overridden to customize as needed):
paypalClientHttpConnector
The existing WebClient bean(s) have been updated to inject these new connectors to absorb their connection pool configuration. If you are currently overriding the WebClient bean(s) in this module, please ensure you update your overrides to similarly inject and use the new connectors.
Additionally, see External Service Connection Pool Properties for properties to modify the external pool configuration.