App\services\ImportService::createPayment PHP Method

createPayment() private method

private createPayment ( $source, $data, $clientId, $invoiceId )
$source
$data
$clientId
$invoiceId
    private function createPayment($source, $data, $clientId, $invoiceId)
    {
        $paymentTransformer = $this->getTransformer($source, ENTITY_PAYMENT, $this->maps);
        $data->client_id = $clientId;
        $data->invoice_id = $invoiceId;
        if ($resource = $paymentTransformer->transform($data)) {
            $data = $this->fractal->createData($resource)->toArray();
            $this->paymentRepo->save($data);
        }
    }