preparePaymentData example


    public function create(array $params)
    {
        $this->checkPrivilege('create');

        $payment = new PaymentModel();

        $payment->setAdditionalDescription('');

        $params = $this->preparePaymentData($params);

        $payment->fromArray($params);

        $violations = $this->getManager()->validate($payment);

        if ($violations->count() > 0) {
            throw new ApiException\ValidationException($violations);
        }

        $this->getManager()->persist($payment);
        $this->flush();

        
Home | Imprint | This part of the site doesn't use cookies.