1
0
mirror of synced 2024-11-28 00:06:06 +03:00

add site attribute in ordersPaymentCreate method

This commit is contained in:
Vladimir Stakheev 2017-08-18 11:16:21 +05:00
parent 3dd663e7a6
commit 25f9010793

View File

@ -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)]
)
);
}