Skip to content

Commit 1313342

Browse files
committed
Improve code quality
1 parent c245ec5 commit 1313342

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Gateways.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,14 @@ function completeStripePayment(OrderPage $virtualOrderPage, array $data): OrderP
3838
$metadata = [
3939
'order_uid' => (string)$virtualOrderPage->uid(),
4040
];
41-
// Capture Payment Intent
41+
4242
if ($paymentIntent->status === 'requires_capture') {
43+
// Capture Payment Intent
4344
$paymentIntent = $paymentIntent->capture([
4445
'metadata' => $metadata,
4546
]);
4647
} else {
48+
// Update Payment Intent
4749
$paymentIntent = $paymentIntent->update($paymentIntentId, [
4850
'metadata' => $metadata,
4951
]);

0 commit comments

Comments
 (0)