Merge pull request #767 from woocommerce/pcp-834-id-after-manual-capture

Update transaction id after manual capture
This commit is contained in:
Emili Castells 2022-08-10 09:19:08 +02:00 committed by GitHub
commit 6704bc1f53
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 20 additions and 8 deletions

View file

@ -31,7 +31,7 @@ use WooCommerce\PayPalCommerce\WcGateway\Notice\AuthorizeOrderActionNotice;
*/
class AuthorizedPaymentsProcessor {
use PaymentsStatusHandlingTrait;
use PaymentsStatusHandlingTrait, TransactionIdHandlingTrait;
const SUCCESSFUL = 'SUCCESSFUL';
const ALREADY_CAPTURED = 'ALREADY_CAPTURED';
@ -200,6 +200,9 @@ class AuthorizedPaymentsProcessor {
$this->handle_capture_status( $capture, $wc_order );
$transaction_id = $capture->id();
$this->update_transaction_id( $transaction_id, $wc_order );
if ( self::SUCCESSFUL === $result_status ) {
if ( $capture->status()->is( CaptureStatus::COMPLETED ) ) {
$wc_order->add_order_note(