mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-04 08:47:23 +08:00
Capture payment only if intent setting is capture
This commit is contained in:
parent
0ea8a77359
commit
6649a362f6
1 changed files with 4 additions and 1 deletions
|
@ -173,7 +173,10 @@ trait ProcessPaymentTrait {
|
|||
if ( $tokens ) {
|
||||
$this->logger->info( "Payment for subscription parent order #{$order_id} was saved correctly." );
|
||||
|
||||
$this->authorized_payments_processor->capture_authorized_payment( $wc_order );
|
||||
if ( $this->config->has( 'intent' ) && strtoupper( (string) $this->config->get( 'intent' ) ) === 'CAPTURE' ) {
|
||||
$this->authorized_payments_processor->capture_authorized_payment( $wc_order );
|
||||
}
|
||||
|
||||
$this->session_handler->destroy_session_data();
|
||||
|
||||
return array(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue