Skip to content

Commit af4f41f

Browse files
cast PreviousInvoiceID at getPaymentParameters function to string for Psalm type checks
1 parent 69abb7c commit af4f41f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/RobokassaApi.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ public function getPaymentParameters(InvoiceOptions $invoiceOptions): array
149149
'MerchantLogin' => $this->merchantLogin,
150150
'OutSum' => $invoiceOptions->outSum,
151151
'Description' => $invoiceOptions->description,
152-
'PreviousInvoiceID' => $invoiceOptions->previousInvoiceId ?? null,
152+
'PreviousInvoiceID' => isset($invoiceOptions->previousInvoiceId) ? (string)$invoiceOptions->previousInvoiceId : null,
153153
'SignatureValue' => $invoiceOptions->signatureValue ?? $this->generateSignatureForPayment($invoiceOptions),
154154
'IncCurrLabel' => $invoiceOptions->incCurrLabel,
155155
'InvId' => isset($invoiceOptions->invId) ? (string)$invoiceOptions->invId : null,

0 commit comments

Comments
 (0)