Skip to content

Commit

Permalink
Update PreventCapture.php
Browse files Browse the repository at this point in the history
  • Loading branch information
davidwindell authored Nov 11, 2022
1 parent f9c8a6e commit 4e0c065
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions Plugin/PreventCapture.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,7 @@ public function aroundCapture(PaymentMethod $subject, callable $proceed, InfoInt
$paymentIntentModel->setCustomerId($order->getCustomerId());
$paymentIntentModel->save();

// Set the transaction ID on order Invoice so it can be refunded in Admin
foreach($order->getInvoiceCollection() as $invoice) {
$invoice->setTransactionId($paymentIntentModel->getPiId())->save();
}
$payment->setTransactionId($paymentIntentModel->getPiId());
}

return null;
Expand Down

0 comments on commit 4e0c065

Please sign in to comment.