mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-01 07:02:48 +08:00
Move payment tokens repository to vaulting package
This commit is contained in:
parent
60dc34e510
commit
2db0162988
11 changed files with 19 additions and 23 deletions
|
@ -14,7 +14,7 @@ use Dhii\Modular\Module\ModuleInterface;
|
|||
use Psr\Log\LoggerInterface;
|
||||
use WooCommerce\PayPalCommerce\ApiClient\Exception\RuntimeException;
|
||||
use WooCommerce\PayPalCommerce\Subscription\Helper\SubscriptionHelper;
|
||||
use WooCommerce\PayPalCommerce\Subscription\Repository\PaymentTokenRepository;
|
||||
use WooCommerce\PayPalCommerce\Vaulting\PaymentTokenRepository;
|
||||
use WooCommerce\PayPalCommerce\WcGateway\Gateway\PayPalGateway;
|
||||
use WooCommerce\PayPalCommerce\WcGateway\Gateway\CreditCardGateway;
|
||||
use Interop\Container\ServiceProviderInterface;
|
||||
|
@ -66,7 +66,7 @@ class SubscriptionModule implements ModuleInterface {
|
|||
add_action(
|
||||
'woocommerce_subscription_payment_complete',
|
||||
function ( $subscription ) use ( $container ) {
|
||||
$payment_token_repository = $container->get( 'subscription.repository.payment-token' );
|
||||
$payment_token_repository = $container->get( 'vaulting.repository.payment-token' );
|
||||
$logger = $container->get( 'woocommerce.logger.woocommerce' );
|
||||
|
||||
$this->add_payment_token_id( $subscription, $payment_token_repository, $logger );
|
||||
|
@ -76,7 +76,7 @@ class SubscriptionModule implements ModuleInterface {
|
|||
add_filter(
|
||||
'woocommerce_gateway_description',
|
||||
function ( $description, $id ) use ( $container ) {
|
||||
$payment_token_repository = $container->get( 'subscription.repository.payment-token' );
|
||||
$payment_token_repository = $container->get( 'vaulting.repository.payment-token' );
|
||||
$settings = $container->get( 'wcgateway.settings' );
|
||||
$subscription_helper = $container->get( 'subscription.helper' );
|
||||
|
||||
|
@ -89,7 +89,7 @@ class SubscriptionModule implements ModuleInterface {
|
|||
add_filter(
|
||||
'woocommerce_credit_card_form_fields',
|
||||
function ( $default_fields, $id ) use ( $container ) {
|
||||
$payment_token_repository = $container->get( 'subscription.repository.payment-token' );
|
||||
$payment_token_repository = $container->get( 'vaulting.repository.payment-token' );
|
||||
$settings = $container->get( 'wcgateway.settings' );
|
||||
$subscription_helper = $container->get( 'subscription.helper' );
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue