mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-01 07:02:48 +08:00
Rename payment status related classes
This commit is contained in:
parent
7e41ca3852
commit
25c09fb198
4 changed files with 16 additions and 16 deletions
|
@ -5,9 +5,9 @@ declare(strict_types=1);
|
|||
namespace Inpsyde\PayPalCommerce\WcGateway;
|
||||
|
||||
use Dhii\Data\Container\ContainerInterface;
|
||||
use Inpsyde\PayPalCommerce\WcGateway\Admin\AuthorizedPaymentStatus;
|
||||
use Inpsyde\PayPalCommerce\WcGateway\Admin\AuthorizedPaymentStatusColumn;
|
||||
use Inpsyde\PayPalCommerce\WcGateway\Admin\OrderDetail;
|
||||
use Inpsyde\PayPalCommerce\WcGateway\Admin\OrderTablePaymentStatusColumn;
|
||||
use Inpsyde\PayPalCommerce\WcGateway\Admin\PaymentStatusOrderDetail;
|
||||
use Inpsyde\PayPalCommerce\WcGateway\Checkout\DisableGateways;
|
||||
use Inpsyde\PayPalCommerce\WcGateway\Gateway\WcGateway;
|
||||
use Inpsyde\PayPalCommerce\WcGateway\Gateway\WcGatewayBase;
|
||||
|
@ -70,11 +70,11 @@ return [
|
|||
$paymentsEndpoint = $container->get('api.endpoint.payments');
|
||||
return new AuthorizedPaymentsProcessor($orderEndpoint, $paymentsEndpoint);
|
||||
},
|
||||
'wcgateway.admin.authorized-payment-status' => function(ContainerInterface $container): AuthorizedPaymentStatus {
|
||||
return new AuthorizedPaymentStatus();
|
||||
'wcgateway.admin.order-payment-status' => function(ContainerInterface $container): PaymentStatusOrderDetail {
|
||||
return new PaymentStatusOrderDetail();
|
||||
},
|
||||
'wcgateway.admin.authorized-payment-status-column' => function(ContainerInterface $container): AuthorizedPaymentStatusColumn {
|
||||
'wcgateway.admin.orders-payment-status-column' => function(ContainerInterface $container): OrderTablePaymentStatusColumn {
|
||||
$settings = $container->get('wcgateway.settings');
|
||||
return new AuthorizedPaymentStatusColumn($settings);
|
||||
return new OrderTablePaymentStatusColumn($settings);
|
||||
}
|
||||
];
|
||||
|
|
|
@ -6,7 +6,7 @@ namespace Inpsyde\PayPalCommerce\WcGateway\Admin;
|
|||
|
||||
use Inpsyde\PayPalCommerce\WcGateway\Settings\Settings;
|
||||
|
||||
class AuthorizedPaymentStatusColumn
|
||||
class OrderTablePaymentStatusColumn
|
||||
{
|
||||
const COLUMN_KEY = 'ppcp_payment_status';
|
||||
const INTENT = 'authorize';
|
|
@ -4,7 +4,7 @@ declare(strict_types=1);
|
|||
|
||||
namespace Inpsyde\PayPalCommerce\WcGateway\Admin;
|
||||
|
||||
class AuthorizedPaymentStatus
|
||||
class PaymentStatusOrderDetail
|
||||
{
|
||||
public function render(int $wcOrderId)
|
||||
{
|
|
@ -6,9 +6,9 @@ namespace Inpsyde\PayPalCommerce\WcGateway;
|
|||
|
||||
use Dhii\Container\ServiceProvider;
|
||||
use Dhii\Modular\Module\ModuleInterface;
|
||||
use Inpsyde\PayPalCommerce\WcGateway\Admin\AuthorizedPaymentStatus;
|
||||
use Inpsyde\PayPalCommerce\WcGateway\Admin\AuthorizedPaymentStatusColumn;
|
||||
use Inpsyde\PayPalCommerce\WcGateway\Admin\OrderDetail;
|
||||
use Inpsyde\PayPalCommerce\WcGateway\Admin\OrderTablePaymentStatusColumn;
|
||||
use Inpsyde\PayPalCommerce\WcGateway\Admin\PaymentStatusOrderDetail;
|
||||
use Inpsyde\PayPalCommerce\WcGateway\Checkout\DisableGateways;
|
||||
use Inpsyde\PayPalCommerce\WcGateway\Gateway\WcGateway;
|
||||
use Inpsyde\PayPalCommerce\WcGateway\Notice\AuthorizeOrderActionNotice;
|
||||
|
@ -96,9 +96,9 @@ class WcGatewayModule implements ModuleInterface
|
|||
'woocommerce_order_actions_start',
|
||||
function ($wcOrderId) use ($container) {
|
||||
/**
|
||||
* @var AuthorizedPaymentStatus $class
|
||||
* @var PaymentStatusOrderDetail $class
|
||||
*/
|
||||
$class = $container->get('wcgateway.admin.authorized-payment-status');
|
||||
$class = $container->get('wcgateway.admin.order-payment-status');
|
||||
$class->render(intval($wcOrderId));
|
||||
}
|
||||
);
|
||||
|
@ -107,9 +107,9 @@ class WcGatewayModule implements ModuleInterface
|
|||
'manage_edit-shop_order_columns',
|
||||
function ($columns) use ($container) {
|
||||
/**
|
||||
* @var AuthorizedPaymentStatusColumn $paymentStatusColumn
|
||||
* @var OrderTablePaymentStatusColumn $paymentStatusColumn
|
||||
*/
|
||||
$paymentStatusColumn = $container->get('wcgateway.admin.authorized-payment-status-column');
|
||||
$paymentStatusColumn = $container->get('wcgateway.admin.orders-payment-status-column');
|
||||
return $paymentStatusColumn->register($columns);
|
||||
}
|
||||
);
|
||||
|
@ -118,9 +118,9 @@ class WcGatewayModule implements ModuleInterface
|
|||
'manage_shop_order_posts_custom_column',
|
||||
function ($column, $wcOrderId) use ($container) {
|
||||
/**
|
||||
* @var AuthorizedPaymentStatusColumn $paymentStatusColumn
|
||||
* @var OrderTablePaymentStatusColumn $paymentStatusColumn
|
||||
*/
|
||||
$paymentStatusColumn = $container->get('wcgateway.admin.authorized-payment-status-column');
|
||||
$paymentStatusColumn = $container->get('wcgateway.admin.orders-payment-status-column');
|
||||
$paymentStatusColumn->render($column, intval($wcOrderId));
|
||||
},
|
||||
10,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue