mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-01 07:02:48 +08:00
Merge branch 'trunk' into PCP-1393-update-to-vault-v-3
# Conflicts: # modules/ppcp-api-client/services.php # modules/ppcp-wc-gateway/src/Processor/OrderProcessor.php # tests/PHPUnit/WcGateway/Processor/OrderProcessorTest.php
This commit is contained in:
commit
fb1ceeba76
27 changed files with 658 additions and 231 deletions
|
@ -15,6 +15,7 @@ use WC_Session_Handler;
|
|||
use WooCommerce\PayPalCommerce\ApiClient\Endpoint\OrderEndpoint;
|
||||
use WooCommerce\PayPalCommerce\ApiClient\Entity\OrderStatus;
|
||||
use Psr\Log\LoggerInterface;
|
||||
use WooCommerce\PayPalCommerce\ApiClient\Exception\RuntimeException;
|
||||
use WooCommerce\PayPalCommerce\Session\MemoryWcSession;
|
||||
use WooCommerce\PayPalCommerce\Session\SessionHandler;
|
||||
use WooCommerce\PayPalCommerce\WcGateway\FundingSource\FundingSourceRenderer;
|
||||
|
@ -228,12 +229,14 @@ class CheckoutOrderApproved implements RequestHandler {
|
|||
continue;
|
||||
}
|
||||
|
||||
if ( ! $this->order_processor->process( $wc_order ) ) {
|
||||
try {
|
||||
$this->order_processor->process( $wc_order );
|
||||
} catch ( RuntimeException $exception ) {
|
||||
return $this->failure_response(
|
||||
sprintf(
|
||||
'Failed to process WC order %s: %s.',
|
||||
(string) $wc_order->get_id(),
|
||||
$this->order_processor->last_error()
|
||||
$exception->getMessage()
|
||||
)
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue