From 09f734a5b95e17021442e2a2ed4c90c0cd3da006 Mon Sep 17 00:00:00 2001 From: ndeet Date: Fri, 22 Nov 2024 17:32:22 +0100 Subject: [PATCH] BTCPay 2.0 compatibilty for pull payments due to changed parameter name. --- src/Client/PullPayment.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Client/PullPayment.php b/src/Client/PullPayment.php index 109d3da..a233d95 100644 --- a/src/Client/PullPayment.php +++ b/src/Client/PullPayment.php @@ -50,7 +50,7 @@ public function createPullPayment( ?bool $autoApproveClaims = false, ?int $startsAt, ?int $expiresAt, - array $paymentMethods, + ?array $paymentMethods = null, ?string $description = null ): ResultPullPayment { $url = $this->getApiUrl() . 'stores/' . @@ -70,7 +70,8 @@ public function createPullPayment( 'autoApproveClaims' => $autoApproveClaims, 'startsAt' => $startsAt, 'expiresAt' => $expiresAt, - 'paymentMethods' => $paymentMethods + 'paymentMethods' => $paymentMethods, + 'payoutMethods' => $paymentMethods ], JSON_THROW_ON_ERROR );