public function ordersPaymentCreate(array $payment, $site = null)
    {
        if (!count($payment)) {
            throw new \InvalidArgumentException(
                'Parameter `payment` must contains a data'
            );
        }

        /* @noinspection PhpUndefinedMethodInspection */
        return $this->client->makeRequest(
            '/orders/payments/create',
            "POST",
            $this->fillSite(
                $site,
                ['payment' => json_encode($payment)]
            )
        );
    }
public function ordersPaymentCreate(array $payment, $site = null)
    {
        if (!count($payment)) {
            throw new \InvalidArgumentException(
                'Parameter `payment` must contains a data'
            );
        }

        /* @noinspection PhpUndefinedMethodInspection */
        return $this->client->makeRequest(
            '/orders/payments/create',
            "POST",
            $this->fillSite(
                $site,
                ['payment' => json_encode($payment)]
            )
        );
    }
public function ordersPaymentCreate ( array $ payment , $ site = null ) { if ( ! count ( $ payment ) ) { throw new \ InvalidArgumentException ( 'Parameter `payment` must contains a data' ) ; } /* @noinspection PhpUndefinedMethodInspection */ return $ this -> client -> makeRequest ( '/orders/payments/create' , "POST" , $ this -> fillSite ( $ site , [ 'payment' => json_encode ( $ payment ) ] ) ) ; }
Create an order payment

@param array $payment order data
@param null  $site    site code

@throws \InvalidArgumentException
@throws \RetailCrm\Exception\CurlException
@throws \RetailCrm\Exception\InvalidJsonException

@return \RetailCrm\Response\ApiResponse
Create an order payment