Loading src/Plugin/Commerce/PaymentGateway/Sevd.php +13 −0 Original line number Diff line number Diff line Loading @@ -277,6 +277,19 @@ class Sevd extends OffsitePaymentGatewayBase implements SevdInterface { // have been successful and we consider the payment voided. $payment->setState('authorization_voided'); $payment->save(); // Void the transaction as well so that it is in the correct state. $transaction_storage = $this->entityTypeManager ->getStorage('commerce_transaction'); $transaction = $transaction_storage->loadPrincipalForPayment( $payment, TransactionBundle::CHARGE ); $transaction ->get(TransactionField::REMOTE_STATE) ->first() ->applyTransitionById('void_authorization'); $transaction_storage->save($transaction); } /** Loading Loading
src/Plugin/Commerce/PaymentGateway/Sevd.php +13 −0 Original line number Diff line number Diff line Loading @@ -277,6 +277,19 @@ class Sevd extends OffsitePaymentGatewayBase implements SevdInterface { // have been successful and we consider the payment voided. $payment->setState('authorization_voided'); $payment->save(); // Void the transaction as well so that it is in the correct state. $transaction_storage = $this->entityTypeManager ->getStorage('commerce_transaction'); $transaction = $transaction_storage->loadPrincipalForPayment( $payment, TransactionBundle::CHARGE ); $transaction ->get(TransactionField::REMOTE_STATE) ->first() ->applyTransitionById('void_authorization'); $transaction_storage->save($transaction); } /** Loading