Returns form parameters for sendbank.

@param OrderInterface $order

@return array
426827
protected function getFormParameters(OrderInterface $order)
    {
        return [
            'PSPID' => $this->getOption('pspid'),
            'orderId' => $order->getReference(),
            'amount' => $order->getTotalInc() * 100,
            'currency' => $order->getCurrency()->getLabel(),
            'language' => $order->getLocale(),
            'CN' => $order->getBillingName(),
            'EMAIL' => $order->getBillingEmail(),
            'ownerZIP' => $order->getBillingPostcode(),
            'owneraddress' => $this->getAddress($order),
            'ownercty' => $order->getBillingCity(),
            'ownertelno' => $order->getBillingPhone() ?: $order->getBillingMobile(),

            'homeurl' => $this->getOption('home_url'),
            'catalogurl' => $this->getOption('catalog_url'),

            'COMPLUS' => '',
            'PARAMPLUS' => 'bank='.$this->getCode(),
            'PARAMVAR' => '',

            'PM' => 'CreditCard',
            'WIN3DS' => 'MAINW',
            'PMLIST' => 'VISA;MasterCard;CB',
            'PMListType' => 2,

            'accepturl' => $this->generateAbsoluteUrlFromOption('url_callback', $order),
            'declineurl' => $this->generateAbsoluteUrlFromOption('url_callback', $order),
            'exceptionurl' => $this->generateAbsoluteUrlFromOption('url_return_ko', $order),
            'cancelurl' => $this->generateAbsoluteUrlFromOption('url_return_ko', $order),

            'operation' => $this->getOperation(),
        ];
    }
937288
public function parseOrderByField($order)
	{
		if(isset($order[0],$order[1]))
		{
			if(!is_array($order[1]))
			{
				$order[1] = explode(',', $order[1]);
			}
			$list = array();
			foreach($order[1] as $item)
			{
				$paramName = $this->getParamName();
				$this->operationOption['params'][$paramName] = $item;
				$list[] = ':' . $paramName;
			}
			return 'field(' . $this->parseKeyword($order[0]) . ',' . implode(',', $list) . ')';
		}
		else
		{
			return 1;
		}
	}
1080198
public function getFieldByOrder($order)
    {
        foreach ($this->_fields as $field) {
            if ($field instanceof FieldInterface) {
                if ($field->getOrder() == $order) {
                    return $field;
                }
            }
        }

        return null;
    }
592579
private function handleIdentity(OrderInterface $order)
    {
        if (null !== $user = $order->getUser()) {
            if (0 == strlen($order->getEmail())) {
                $order->setEmail($user->getEmail());
            }
            if (0 == strlen($order->getGender())) {
                $order->setGender($user->getGender());
            }
            if (0 == strlen($order->getFirstName())) {
                $order->setFirstName($user->getFirstName());
            }
            if (0 == strlen($order->getLastName())) {
                $order->setLastName($user->getLastName());
            }
        }
    }
584862
private function getOptions(MethodInterface $method)
    {
        if ($method->getMethod() == $method::GET) {
            return [
                'query' => $method->getAttributes(),
            ];
        }

        return [
            'headers' => [
                'Content-Type' => 'application/json',
            ],
            'body' => json_encode(
                $this->prepareAttributes($method->getAttributes()),
                JSON_FORCE_OBJECT
            )
        ];
    }
967307
public function getFormFieldValueOptions(FieldInterface $field)
    {
        $formFieldOptions = [];
        $formFieldOptions['choices'] = array_flip($this->getFieldOptionsArray($field));
        $formFieldOptions['expanded'] = $this->isExpanded;
        $formFieldOptions['multiple'] = $this->getIsMultipleChoice($field);

        return $formFieldOptions;
    }
493697
public function createForOrder(OrderInterface $order, $type = Invoice::TYPE_DEBIT)
    {
        $invoice = new Invoice();
        $number = $this->codeGenerator::generate($invoice);

        $data = [
            'order'        => $order,
            'number'       => $number,
            'date'         => date('d/m/Y'),
            'base_dir'     => $this->rootDir . '/../web',
            'invoice_type' => $type,
        ];

        $html = $this->templating->render($this->template, $data);
        $pdf = $this->pdfGenerator->getOutputFromHtml($html);

        $total = $type === Invoice::TYPE_DEBIT ?
            $order->getTotal() :
            $order->getTotal() * -1
        ;

        $order->addInvoice($invoice);
        $invoice->setOrder($order);
        $invoice->setNumber($number);
        $invoice->setMimeType('application/pdf');
        $invoice->setFile($pdf);
        $invoice->setType($type);
        $invoice->setTotal($total);

        return $invoice;
    }
324896
public function getBankInfo($index = 0)
    {
        $orderStatuses = $this->getOrderStatuses();
        return array_key_exists('bankInfo', $orderStatuses[$index]) ? $orderStatuses[$index]['bankInfo'] : [];
    }
929978
public function getFormFieldValueOptions(FieldInterface $field)
    {
        $options = $field->getOptions();

        $message = '';
        if (isset($options['message'])) {
            $message = $options['message'];
        }

        return ['message' => $message];
    }
80452
protected function build($payment, $order)
    {
        return  [
            'date'             => $this->formatDate($order),
            'magento_id'       => $this->formatMagentoId($order),
            'magento_status'   => $this->formatMagentoStatus($order),
            'pagseguro_id'     => $payment->getCode(),
            'pagseguro_status' => $this->formatPagSeguroStatus($payment),
            'order_id'         => $order->getId(),
            'details'          => $this->details($order, $payment)
        ];
    }
876758
protected function getPaymentTransactionStructure()
    {
        return [
            'amount'             => $this->transformAmount($this->amount, $this->currency),
            'currency'           => $this->currency,
            'customer_email'     => $this->customer_email,
            'customer_phone'     => $this->customer_phone,
            'holder_name'        => $this->holder_name,
            'iban'               => $this->iban,
            'swift_code'         => $this->swift_code,
            'account_number'     => $this->account_number,
            'bank_name'          => $this->bank_name,
            'bank_city'          => $this->bank_city,
            'bank_code'          => $this->bank_code,
            'branch_code'        => $this->branch_code,
            'branch_check_digit' => $this->branch_check_digit,
            'billing_address'    => $this->getBillingAddressParamsStructure(),
            'shipping_address'   => $this->getShippingAddressParamsStructure()
        ];
    }
1309221
public function getViewParameters(
        Action $action,
        Request $request,
        FamilyInterface $family,
        FormInterface $form = null,
        $data = null,
        array $listRouteParameters = []
    ): array {
        $listRouteParameters['familyCode'] = $family->getCode();
        $parameters = $this->baseTemplatingHelper->getViewParameters(
            $action,
            $request,
            $form,
            $data,
            $listRouteParameters
        );
        $parameters['family'] = $family;

        return $parameters;
    }
318162
private function getCurrentShippingMethodCostsCollection(OrderInterface $order) : Collection
    {
        return $this->methodProvider->getShippingMethodCosts($order->getShippingMethod(), new OrderContext($order));
    }
636643
protected static function parseOrderParameters($order)
    {
        $parsedOrder = [];
        if (count($order) > 0) {
            foreach ($order as $key => $o) {
                // Check if $order array is already formatted properly
                if (!is_numeric($key) && is_numeric($o)) {
                    $parsedOrder[$key] = $o;
                    continue;
                }
                $o = self::str($o);
                if ($o->startsWith('-')) {
                    $parsedOrder[$o->subString(1, 0)->val()] = -1;
                } elseif ($o->startsWith('+')) {
                    $parsedOrder[$o->subString(1, 0)->val()] = 1;
                } else {
                    $parsedOrder[$o->val()] = 1;
                }
            }
        }

        return $parsedOrder;
    }
719857
private function toArray($payment, $order, $conciliate = false)
    {
        return  [
            'date'             => $this->formatDate($order),
            'magento_id'       => $this->formatMagentoId($order),
            'magento_status'   => $this->formatMagentoStatus($order),
            'validate'         => $this->abandonedIntervalToDate(
                new \DateTime(
                    $order->getCreatedAtFormatted(\IntlDateFormatter::MEDIUM)
                )
            ),
            'sent'             => current($this->getSent($order->getId())),
            'order_id'         => $order->getId(),
            'details'          => $this->details($order, $payment, ['conciliate' => $conciliate])
        ];
    }
429943
public function getFormattedQueryParameters(RequestInterface $request)
    {
        return $this->getString($this->getQueryParameters($request->getUri()->getQuery()));
    }
143981
protected function getPaymentTransactionStructure()
    {
        return [
            'return_success_url'   => $this->return_success_url,
            'return_failure_url'   => $this->return_failure_url,
            'amount'               => $this->transformAmount($this->amount, $this->currency),
            'currency'             => $this->currency,
            'is_payout'            => var_export($this->is_payout, true),
            'customer_bank_id'     => $this->customer_bank_id,
            'order_description'    => $this->order_description,
            'payout_order_id'      => $this->payout_order_id,
            'payout_bank_country'  => $this->payout_bank_country,
            'payout_bank_name'     => $this->payout_bank_name,
            'payout_swift'         => $this->payout_swift,
            'payout_acc_number'    => $this->payout_acc_number,
            'payout_bank_address'  => $this->payout_bank_address,
            'payout_owner_name'    => $this->payout_owner_name,
            'payout_owner_address' => $this->payout_owner_address,
            'customer_email'       => $this->customer_email,
            'customer_phone'       => $this->customer_phone,
            'billing_address'      => $this->getBillingAddressParamsStructure(),
            'shipping_address'     => $this->getShippingAddressParamsStructure()
        ];
    }