Skip to content

Commit e45ddfc

Browse files
authored
Fix undefined array key error on stored_payment_method_id (#115)
1 parent 622451b commit e45ddfc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Entities/Shared/TransactionPaymentAttempt.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class TransactionPaymentAttempt
2121
private function __construct(
2222
public string $paymentAttemptId,
2323
public string|null $paymentMethodId,
24-
public string $storedPaymentMethodId,
24+
public string|null $storedPaymentMethodId,
2525
public string $amount,
2626
public PaymentAttemptStatus $status,
2727
public ErrorCode|null $errorCode,
@@ -36,7 +36,7 @@ public static function from(array $data): self
3636
return new self(
3737
$data['payment_attempt_id'],
3838
$data['payment_method_id'] ?? null,
39-
$data['stored_payment_method_id'],
39+
$data['stored_payment_method_id'] ?? null,
4040
$data['amount'],
4141
PaymentAttemptStatus::from($data['status']),
4242
isset($data['error_code']) ? ErrorCode::from($data['error_code']) : null,

0 commit comments

Comments
 (0)