Skip to content

Commit

Permalink
fix: payment_method_id can be string or null (#77)
Browse files Browse the repository at this point in the history
The API docs state that the payment_method_id can be a `string` or `null` - but the PHP code only expects a string.

The value is `null` when the payment amount has been reduced to zero by a discount.
  • Loading branch information
tpetry authored Sep 18, 2024
1 parent 20a3d11 commit 3935bf3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Entities/Shared/TransactionPaymentAttempt.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class TransactionPaymentAttempt
*/
private function __construct(
public string $paymentAttemptId,
public string $paymentMethodId,
public string|null $paymentMethodId,
public string $storedPaymentMethodId,
public string $amount,
public PaymentAttemptStatus $status,
Expand Down

0 comments on commit 3935bf3

Please sign in to comment.