Move capture authorized payment into authorized payment processor

This commit is contained in:
dinamiko 2021-10-14 15:45:57 +02:00
parent ab0ed12495
commit 457ebeeb8c
15 changed files with 271 additions and 376 deletions

View file

@ -171,7 +171,7 @@ class OrderProcessor {
if ( $order->intent() === 'AUTHORIZE' ) {
$order = $this->order_endpoint->authorize( $order );
$wc_order->update_meta_data( PayPalGateway::CAPTURED_META_KEY, 'false' );
$wc_order->update_meta_data( AuthorizedPaymentsProcessor::CAPTURED_META_KEY, 'false' );
}
$transaction_id = $this->get_paypal_order_transaction_id( $order );
@ -186,7 +186,7 @@ class OrderProcessor {
$wc_order->add_order_note(
__( 'Payment successfully captured.', 'woocommerce-paypal-payments' )
);
$wc_order->update_meta_data( PayPalGateway::CAPTURED_META_KEY, 'true' );
$wc_order->update_meta_data( AuthorizedPaymentsProcessor::CAPTURED_META_KEY, 'true' );
$wc_order->update_status( 'processing' );
}
WC()->cart->empty_cart();