From 25f9010793ca6a00c55a3f7dc56a2992466049d5 Mon Sep 17 00:00:00 2001 From: Vladimir Stakheev Date: Fri, 18 Aug 2017 11:16:21 +0500 Subject: [PATCH] add site attribute in ordersPaymentCreate method --- lib/RetailCrm/Methods/V5/Orders.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/RetailCrm/Methods/V5/Orders.php b/lib/RetailCrm/Methods/V5/Orders.php index 182e677..8099925 100644 --- a/lib/RetailCrm/Methods/V5/Orders.php +++ b/lib/RetailCrm/Methods/V5/Orders.php @@ -71,6 +71,7 @@ trait Orders * Create an order payment * * @param array $payment order data + * @param null $site site code * * @throws \InvalidArgumentException * @throws \RetailCrm\Exception\CurlException @@ -78,7 +79,7 @@ trait Orders * * @return \RetailCrm\Response\ApiResponse */ - public function ordersPaymentCreate(array $payment) + public function ordersPaymentCreate(array $payment, $site = null) { if (!count($payment)) { throw new \InvalidArgumentException( @@ -89,7 +90,10 @@ trait Orders return $this->client->makeRequest( '/orders/payments/create', "POST", - ['payment' => json_encode($payment)] + $this->fillSite( + $site, + ['payment' => json_encode($payment)] + ) ); }