mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-07 19:54:15 +08:00
Refactor payment source to handle arbitrary types
This commit is contained in:
parent
99d05ca44d
commit
518a1f4e4e
13 changed files with 59 additions and 287 deletions
|
@ -10,7 +10,9 @@ declare(strict_types=1);
|
|||
namespace WooCommerce\PayPalCommerce\SavePaymentMethods;
|
||||
|
||||
use Psr\Log\LoggerInterface;
|
||||
use WC_Order;
|
||||
use WooCommerce\PayPalCommerce\ApiClient\Authentication\UserIdToken;
|
||||
use WooCommerce\PayPalCommerce\ApiClient\Entity\Order;
|
||||
use WooCommerce\PayPalCommerce\ApiClient\Exception\PayPalApiException;
|
||||
use WooCommerce\PayPalCommerce\ApiClient\Exception\RuntimeException;
|
||||
use WooCommerce\PayPalCommerce\Vendor\Dhii\Container\ServiceProvider;
|
||||
|
@ -90,5 +92,14 @@ class SavePaymentMethodsModule implements ModuleInterface {
|
|||
return $data;
|
||||
}
|
||||
);
|
||||
|
||||
add_action(
|
||||
'woocommerce_paypal_payments_after_order_processor',
|
||||
function( WC_Order $wc_order, Order $order ) {
|
||||
// vault payment here ...
|
||||
},
|
||||
10,
|
||||
2
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue