render the authorize action depending on the orders status

This commit is contained in:
David Remer 2020-09-30 08:18:17 +03:00
parent d28f763115
commit e3055a69f0
3 changed files with 71 additions and 6 deletions

View file

@ -15,6 +15,7 @@ use WooCommerce\PayPalCommerce\ApiClient\Helper\Cache;
use WooCommerce\PayPalCommerce\Onboarding\State;
use WooCommerce\PayPalCommerce\WcGateway\Admin\OrderTablePaymentStatusColumn;
use WooCommerce\PayPalCommerce\WcGateway\Admin\PaymentStatusOrderDetail;
use WooCommerce\PayPalCommerce\WcGateway\Admin\RenderAuthorizeAction;
use WooCommerce\PayPalCommerce\WcGateway\Checkout\CheckoutPayPalAddressPreset;
use WooCommerce\PayPalCommerce\WcGateway\Checkout\DisableGateways;
use WooCommerce\PayPalCommerce\WcGateway\Endpoint\ReturnUrlEndpoint;
@ -137,6 +138,10 @@ return array(
$payments_endpoint = $container->get( 'api.endpoint.payments' );
return new AuthorizedPaymentsProcessor( $order_endpoint, $payments_endpoint );
},
'wcgateway.admin.render-authorize-action' => static function ( $container ): RenderAuthorizeAction {
return new RenderAuthorizeAction();
},
'wcgateway.admin.order-payment-status' => static function ( $container ): PaymentStatusOrderDetail {
return new PaymentStatusOrderDetail();
},