🔀 Merge branch 'trunk'

This commit is contained in:
Philipp Stracker 2024-09-03 18:45:51 +02:00
commit d370f70d86
No known key found for this signature in database
73 changed files with 4096 additions and 251 deletions

View file

@ -267,7 +267,8 @@ return array(
$container->get( 'wcgateway.processor.refunds' ),
$container->get( 'wcgateway.transaction-url-provider' ),
$container->get( 'session.handler' ),
$container->get( 'googlepay.url' )
$container->get( 'googlepay.url' ),
$container->get( 'woocommerce.logger.woocommerce' )
);
},
);

View file

@ -10,6 +10,7 @@ declare(strict_types=1);
namespace WooCommerce\PayPalCommerce\Googlepay;
use Exception;
use Psr\Log\LoggerInterface;
use WC_Order;
use WC_Payment_Gateway;
use WooCommerce\PayPalCommerce\ApiClient\Exception\PayPalApiException;
@ -72,6 +73,13 @@ class GooglePayGateway extends WC_Payment_Gateway {
*/
private $module_url;
/**
* The logger.
*
* @var LoggerInterface
*/
private $logger;
/**
* GooglePayGateway constructor.
*
@ -81,6 +89,7 @@ class GooglePayGateway extends WC_Payment_Gateway {
* @param TransactionUrlProvider $transaction_url_provider Service providing transaction view URL based on order.
* @param SessionHandler $session_handler The Session Handler.
* @param string $module_url The URL to the module.
* @param LoggerInterface $logger The logger.
*/
public function __construct(
OrderProcessor $order_processor,
@ -88,7 +97,8 @@ class GooglePayGateway extends WC_Payment_Gateway {
RefundProcessor $refund_processor,
TransactionUrlProvider $transaction_url_provider,
SessionHandler $session_handler,
string $module_url
string $module_url,
LoggerInterface $logger
) {
$this->id = self::ID;
@ -113,6 +123,7 @@ class GooglePayGateway extends WC_Payment_Gateway {
$this->refund_processor = $refund_processor;
$this->transaction_url_provider = $transaction_url_provider;
$this->session_handler = $session_handler;
$this->logger = $logger;
add_action(
'woocommerce_update_options_payment_gateways_' . $this->id,