mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
Add save card payment for changing subscription payment method (WIP)
This commit is contained in:
parent
f081fc2392
commit
0262c28580
7 changed files with 149 additions and 19 deletions
|
@ -9,10 +9,9 @@ declare(strict_types=1);
|
|||
|
||||
namespace WooCommerce\PayPalCommerce\WcSubscriptions;
|
||||
|
||||
use WooCommerce\PayPalCommerce\PayPalSubscriptions\DeactivatePlanEndpoint;
|
||||
use WooCommerce\PayPalCommerce\PayPalSubscriptions\SubscriptionsApiHandler;
|
||||
use WooCommerce\PayPalCommerce\Vaulting\PaymentTokenRepository;
|
||||
use WooCommerce\PayPalCommerce\Vendor\Psr\Container\ContainerInterface;
|
||||
use WooCommerce\PayPalCommerce\WcSubscriptions\Endpoint\SubscriptionChangePaymentMethod;
|
||||
use WooCommerce\PayPalCommerce\WcSubscriptions\Helper\SubscriptionHelper;
|
||||
|
||||
return array(
|
||||
|
@ -45,4 +44,9 @@ return array(
|
|||
$endpoint = $container->get( 'api.endpoint.payment-token' );
|
||||
return new PaymentTokenRepository( $factory, $endpoint );
|
||||
},
|
||||
'wc-subscriptions.endpoint.subscription-change-payment-method' => static function( ContainerInterface $container ): SubscriptionChangePaymentMethod {
|
||||
return new SubscriptionChangePaymentMethod(
|
||||
$container->get( 'button.request-data' )
|
||||
);
|
||||
},
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue