mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-05 08:59:14 +08:00
Update transaction id after manual capture
This commit is contained in:
parent
f256134148
commit
878f271ae9
2 changed files with 20 additions and 8 deletions
|
@ -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(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue