mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 13:44:42 +08:00
♻️ Use the “paypal-bearer-cache” DI service
This commit is contained in:
parent
f7ec454474
commit
a28b084abc
1 changed files with 6 additions and 12 deletions
|
@ -116,19 +116,13 @@ return array(
|
|||
return 'WC-';
|
||||
},
|
||||
'api.bearer' => static function ( ContainerInterface $container ): Bearer {
|
||||
$cache = new Cache( 'ppcp-paypal-bearer' );
|
||||
$key = $container->get( 'api.key' );
|
||||
$secret = $container->get( 'api.secret' );
|
||||
$host = $container->get( 'api.host' );
|
||||
$logger = $container->get( 'woocommerce.logger.woocommerce' );
|
||||
$settings = $container->get( 'wcgateway.settings' );
|
||||
return new PayPalBearer(
|
||||
$cache,
|
||||
$host,
|
||||
$key,
|
||||
$secret,
|
||||
$logger,
|
||||
$settings
|
||||
$container->get( 'api.paypal-bearer-cache' ),
|
||||
$container->get( 'api.host' ),
|
||||
$container->get( 'api.key' ),
|
||||
$container->get( 'api.secret' ),
|
||||
$container->get( 'woocommerce.logger.woocommerce' ),
|
||||
$container->get( 'wcgateway.settings' )
|
||||
);
|
||||
},
|
||||
'api.endpoint.partners' => static function ( ContainerInterface $container ) : PartnersEndpoint {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue