mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
Merge branch 'trunk' into PCP-591-save-and-display-vaulted-payment-methods-in-woo-commerce-native-endpoint
This commit is contained in:
commit
17211a8de9
51 changed files with 1400 additions and 305 deletions
|
@ -9,6 +9,7 @@ declare(strict_types=1);
|
|||
|
||||
namespace WooCommerce\PayPalCommerce\ApiClient;
|
||||
|
||||
use WooCommerce\PayPalCommerce\Session\SessionHandler;
|
||||
use WooCommerce\PayPalCommerce\Vendor\Psr\Container\ContainerInterface;
|
||||
use WooCommerce\PayPalCommerce\ApiClient\Authentication\Bearer;
|
||||
use WooCommerce\PayPalCommerce\ApiClient\Authentication\PayPalBearer;
|
||||
|
@ -177,12 +178,13 @@ return array(
|
|||
$patch_collection_factory = $container->get( 'api.factory.patch-collection-factory' );
|
||||
$logger = $container->get( 'woocommerce.logger.woocommerce' );
|
||||
|
||||
/**
|
||||
* The settings.
|
||||
*
|
||||
* @var Settings $settings
|
||||
*/
|
||||
$settings = $container->get( 'wcgateway.settings' );
|
||||
$session_handler = $container->get( 'session.handler' );
|
||||
assert( $session_handler instanceof SessionHandler );
|
||||
$bn_code = $session_handler->bn_code();
|
||||
|
||||
$settings = $container->get( 'wcgateway.settings' );
|
||||
assert( $settings instanceof Settings );
|
||||
|
||||
$intent = $settings->has( 'intent' ) && strtoupper( (string) $settings->get( 'intent' ) ) === 'AUTHORIZE' ? 'AUTHORIZE' : 'CAPTURE';
|
||||
$application_context_repository = $container->get( 'api.repository.application-context' );
|
||||
$subscription_helper = $container->get( 'subscription.helper' );
|
||||
|
@ -196,7 +198,8 @@ return array(
|
|||
$application_context_repository,
|
||||
$subscription_helper,
|
||||
$container->get( 'wcgateway.is-fraudnet-enabled' ),
|
||||
$container->get( 'wcgateway.fraudnet' )
|
||||
$container->get( 'wcgateway.fraudnet' ),
|
||||
$bn_code
|
||||
);
|
||||
},
|
||||
'api.endpoint.billing-agreements' => static function ( ContainerInterface $container ): BillingAgreementsEndpoint {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue