Returns a PSR-7 request to create a payment order into Paylands.

@param $customerExtId
@param $amount
@param $description
@param $operative
@param $service

@return RequestInterface
483975
public function createPaymentRequest($customerExtId, $amount, $description, $operative, $service)
    {
        return $this->createRequest('POST', '/payment', [
            'customer_ext_id' => (string) $customerExtId,
            'amount' => $amount,
            'operative' => $operative,
            'service' => $service,
            'description' => $description,
        ]);
    }
635643
public function invoiceFor($description, $amount, array $options = [])
    {
        if (!$this->stripe_id) {
            throw new InvalidArgumentException('User is not a customer. See the createAsStripeCustomer method.');
        }

        $options = array_merge([
            'customer' => $this->stripe_id,
            'amount' => $amount,
            'currency' => $this->preferredCurrency(),
            'description' => $description,
        ], $options);

        StripeInvoiceItem::create(
            $options, ['api_key' => $this->getStripeKey()]
        );

        return $this->invoice();
    }
1213399
public function createRole($organizationUuid, $name, array $permissions, $description = null)
    {
        $options = [
            'form_params' => [
                'name' => $name,
                'permissions' => $permissions,
                'description' => $description,
            ],
        ];

        return new OperationResponse(
            $this->connector->request('post', "/organizations/${organizationUuid}/roles", $this->query, $options)
        );
    }
250685
public function createPaymentById($orderId)
    {
        $query = $this->getFactory()->createPaymentPayoneQuery();
        $query->findByFkSalesOrder($orderId);

        return $query;
    }
1350294
public function doExpressCheckoutPayment($data, $token, $payerid)
    {
        $this->setItemSubTotal($data);

        $this->post = $this->setCartItems($data['items'])->merge([
            'TOKEN'                          => $token,
            'PAYERID'                        => $payerid,
            'PAYMENTREQUEST_0_ITEMAMT'       => $this->subtotal,
            'PAYMENTREQUEST_0_AMT'           => $data['total'],
            'PAYMENTREQUEST_0_PAYMENTACTION' => !empty($this->config['payment_action']) ? $this->config['payment_action'] : 'Sale',
            'PAYMENTREQUEST_0_CURRENCYCODE'  => $this->currency,
            'PAYMENTREQUEST_0_DESC'          => $data['invoice_description'],
            'PAYMENTREQUEST_0_INVNUM'        => $data['invoice_id'],
            'PAYMENTREQUEST_0_NOTIFYURL'     => $this->notifyUrl,
        ]);

        $this->setShippingAmount($data);

        return $this->doPayPalRequest('DoExpressCheckoutPayment');
    }
613123
public function createApiLogsByOrderIdAndRequest($idOrder, $request)
    {
        $query = $this->getFactory()->createPaymentPayoneApiLogQuery()
            ->useSpyPaymentPayoneQuery()
            ->filterByFkSalesOrder($idOrder)
            ->endUse()
            ->filterByRequest($request)
            ->orderByCreatedAt(Criteria::DESC) //TODO: Index?
            ->orderByIdPaymentPayoneApiLog(Criteria::DESC);

        return $query;
    }
59185
public function executePayment($dAmount, & $oOrder)
    {
        /** @var oxUserPayment|OxpsPaymorrowOxUserPayment $oUserPayment */
        $oUserPayment = $this->_oPaymentInfo;

        if (is_object($oUserPayment) && $oUserPayment->isUserPaymentPaymorrowMethod()) {

            // Set real order ID (OXID field) to session to be used in order confirmation during payment.
            $oOrderId = $oOrder->getId();
            $oOrder->savePaymorrowTemporaryOrderIdToSession($oOrderId);

            /** @var OxpsPaymorrowModule $oModule */
            $oModule = oxRegistry::get('OxpsPaymorrowModule');

            /** @var OxpsPaymorrowRequestControllerProxy $oPmRequestControllerProxy */
            $oPmRequestControllerProxy = oxNew('OxpsPaymorrowRequestControllerProxy');
            $oPmRequestControllerProxy->confirmOrder($oModule->getPaymentMethodName(), $oOrderId);

            /** @var OxpsPaymorrowResponseHandler $oPmResponseHandler */
            $oPmResponseHandler = oxRegistry::get('OxpsPaymorrowResponseHandler');

            /**
             * If Order has an error after validation from Paymorrow services invalidate order and delete it
             * If Payment data save failed return an error
             */
            if ($oPmResponseHandler->hasErrors() or
                !$this->_savePaymorrowUserPaymentData($oOrder, $oPmResponseHandler)
            ) {
                $this->_handleOrderResponseErrors($oPmResponseHandler);

                return false;
            }
        }

        return $this->_OxpsPaymorrowOxPaymentGateway_executePayment_parent($dAmount, $oOrder);
    }
637980
public function generateAction(Request $request, $order_id)
    {
        $manager = $this->getDoctrine()->getManager();
        $repo = $manager->getRepository('LibrinfoEcommerceBundle:Order');

        $order = $repo->find($order_id);
        if (!$order) {
            throw $this->createNotFoundException(sprintf('Unable to find the order with id : %s', $order_id));
        }

        $this->admin->checkAccess('create');

        if ($order->getCheckoutState() != 'completed') {
            throw new \Exception('Checkout is not completed');
        }

        if (count($order->getInvoices()) > 0) {
            throw new \Exception('Invoice has already been generated');
        }

        $invoiceFactory = $this->container->get('librinfo_ecommerce.factory.invoice');
        $invoice = $invoiceFactory->createForOrder($order);
        $manager->persist($invoice);
        $manager->flush();

        $order->addInvoice($invoice);

        $html = $this->renderView('LibrinfoEcommerceBundle:OrderAdmin/Show:_invoices_inner.html.twig', ['object' => $order]);

        return new JsonResponse(['html' => $html]);
    }
976565
function DoVFTInquiry($ccno,
                          $amount,
                          $instnumber,
                          $vftcode) {

        $posnetRequest = new PosnetRequest();

        $posnetRequest->ccno = $ccno;
        $posnetRequest->amount = $amount;
        $posnetRequest->instnumber = $instnumber;
        $posnetRequest->vftcode = $vftcode;

        return $this->DoTran($posnetRequest, "vftinquiry");
    }
91359
public function createCustomerCardsRequest($customerExtId, $status, $unique)
    {
        $resource = sprintf('/customer/%s/cards?status=%s&unique=%s', $customerExtId, $status, $unique);

        return $this->createRequest('GET', $resource);
    }
907976
public static function create(
        int $paymentId,
        int $monetaryAccountId = null,
        string $content = null,
        array $customHeaders = []
    ): BunqResponseInt {
        $apiClient = new ApiClient(static::getApiContext());
        $responseRaw = $apiClient->post(
            vsprintf(
                self::ENDPOINT_URL_CREATE,
                [static::determineUserId(), static::determineMonetaryAccountId($monetaryAccountId), $paymentId]
            ),
            [self::FIELD_CONTENT => $content],
            $customHeaders
        );

        return BunqResponseInt::castFromBunqResponse(
            static::processForId($responseRaw)
        );
    }
292937
public function getCustomerByExtUid($customerExtUid)
    {
        /** @var CustomerFbApi $response */
        $response = $this->call(new Request('customer.get', array('customer_ext_uid' => $customerExtUid)), 'DVelopment\FastBill\Model\CustomerFbApi');
        $customers = $response->getResponse()->getCustomers();

        return reset($customers);
    }
392183
public function createPaymentReference(Structure\RequestReferenceDetails $paymentData)
    {
        $this->response = parent::createPaymentReference($this->entity, $paymentData);

        /**
         * Checks the state of the platform integration.
         */
        if (Exception\IntegrationState::check($this->response->integrationState)) {
            throw new Exception\IntegrationState($this->response->integrationState);
        }

        /**
         * In case an error code is returned not related to the integration state.
         * (eg.: maximum daily amount exceeded, maximum reference amount, etc.)
         */
        if ($this->response->state == 0) {
            throw new Exception\IntegrationResponse(
                $this->response->err_msg,
                $this->response->err_code
            );
        }

        return $this->response;
    }
644439
public function tab($description, $amount, array $options = []): Successful
    {
        return $this->charge($amount, array_merge($options, [
            'customFields' => [
                'description' => $description,
            ],
        ]));
    }
444614
public function ExecutePayment(&$oPaymentHandler, $sMessageConsumer = '')
    {
        $bPaymentOk = false;
        $bAllowEdit = $this->bAllowEditByAll;
        $this->AllowEditByAll(true);
        $aData = $this->sqlData;
        $aData['system_order_payment_method_executed'] = '0';
        $aData['system_order_payment_method_executed_date'] = date('Y-m-d H:i:s');
        $this->LoadFromRow($aData);
        $this->Save();

        $bPaymentOk = $this->ExecutePaymentHook($oPaymentHandler, $sMessageConsumer);

        $this->AllowEditByAll($bAllowEdit);

        return $bPaymentOk;
    }
45520
public function createTransaction(PaylandsMethod $paymentMethod)
    {
        $paymentOrder = $this->client->createPayment(
            $paymentMethod->getCustomerExternalId(),
            $this->paymentBridge->getAmount(),
            (string)$this->paymentBridge->getOrder(),
            $this->currencyServiceResolver->getService()
        );

        $transaction = $this->client->directPayment(
            $this->requestStack->getMasterRequest()->getClientIp(),
            $paymentOrder['order']['uuid'],
            $paymentMethod->getCardUuid()
        );

        $paymentMethod
            ->setPaymentStatus($transaction['order']['paid'] ? PaylandsMethod::STATUS_OK : PaylandsMethod::STATUS_KO)
            ->setPaymentResult($transaction);
    }
398506
@Override
	@Transactional(enabled = false)
	public CommerceOrderPayment createCommerceOrderPayment(
		long commerceOrderPaymentId) {
		return commerceOrderPaymentPersistence.create(commerceOrderPaymentId);
	}