@param string $paymentId
@param string $captureId
@param array $parameters

@return \Mollie\Api\Resources\BaseResource|\Mollie\Api\Resources\Capture
@throws \Mollie\Api\Exceptions\ApiException
434515
public function getForId($paymentId, $captureId, array $parameters = [])
    {
        $this->parentId = $paymentId;

        return parent::rest_read($captureId, $parameters);
    }
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);
    }
10992
public function acquireToken($parameters)
    {
        $request = $this->createRequest($parameters);
        $response = Requests::execute($request);
        $this->parseToken($response);
    }
364816
function _doCapt($oID, $captureType = 'Complete', $amt = 0, $currency = 'USD', $note = '') {
    global $db, $doPayPal, $messageStack;
    $doPayPal = $this->paypal_init();

    //@TODO: Read current order status and determine best status to set this to
    $new_order_status = (int)MODULE_PAYMENT_PAYPALDP_ORDER_STATUS_ID;

    $orig_order_amount = 0;
    $doPayPal = $this->paypal_init();
    $proceedToCapture = false;
    $captureNote = strip_tags(zen_db_input($_POST['captnote']));
    if (isset($_POST['captfullconfirm']) && $_POST['captfullconfirm'] == 'on') {
      $proceedToCapture = true;
    } else {
      $messageStack->add_session(MODULE_PAYMENT_PAYPALDP_TEXT_CAPTURE_FULL_CONFIRM_ERROR, 'error');
    }
    if (isset($_POST['captfinal']) && $_POST['captfinal'] == 'on') {
      $captureType = 'Complete';
    } else {
      $captureType = 'NotComplete';
    }
    if (isset($_POST['btndocapture']) && $_POST['btndocapture'] == MODULE_PAYMENT_PAYPAL_ENTRY_CAPTURE_BUTTON_TEXT_FULL) {
      $captureAmt = (float)$_POST['captamt'];
      if ($captureAmt == 0) {
        $messageStack->add_session(MODULE_PAYMENT_PAYPALDP_TEXT_INVALID_CAPTURE_AMOUNT, 'error');
        $proceedToCapture = false;
      }
    }
    // look up history on this order from PayPal table
    $sql = "select * from " . TABLE_PAYPAL . " where order_id = :orderID  AND parent_txn_id = '' ";
    $sql = $db->bindVars($sql, ':orderID', $oID, 'integer');
    $zc_ppHist = $db->Execute($sql);
    if ($zc_ppHist->RecordCount() == 0) return false;
    $txnID = $zc_ppHist->fields['txn_id'];
    /**
     * Submit capture request to PayPal
     */
    if ($proceedToCapture) {
      $response = $doPayPal->DoCapture($txnID, $captureAmt, $currency, $captureType, '', $captureNote);
      $error = $this->_errorHandler($response, 'DoCapture');
      $new_order_status = ($new_order_status > 0 ? $new_order_status : 1);
      if (!$error) {
        if (isset($response['PNREF'])) {
          if (!isset($response['AMT'])) $response['AMT'] = $captureAmt;
          if (!isset($response['ORDERTIME'])) $response['ORDERTIME'] = date("M-d-Y h:i:s");
        }
        // Success, so save the results
        $sql_data_array = array('orders_id' => (int)$oID,
                                'orders_status_id' => (int)$new_order_status,
                                'date_added' => 'now()',
                                'comments' => 'FUNDS COLLECTED. Trans ID: ' . urldecode($response['TRANSACTIONID']) . $response['PNREF']. "\n" . ' Amount: ' . urldecode($response['AMT']) . ' ' . $currency . "\n" . 'Time: ' . urldecode($response['ORDERTIME']) . "\n" . (isset($response['RECEIPTID']) ? 'Receipt ID: ' . urldecode($response['RECEIPTID']) : 'Auth Code: ' . $response['AUTHCODE']) . (isset($response['PPREF']) ? "\nPPRef: " . $response['PPREF'] : '') . "\n" . $captureNote,
                                'customer_notified' => 0
                             );
        zen_db_perform(TABLE_ORDERS_STATUS_HISTORY, $sql_data_array);
        $db->Execute("update " . TABLE_ORDERS  . "
                      set orders_status = '" . (int)$new_order_status . "'
                      where orders_id = '" . (int)$oID . "'");
        $messageStack->add_session(sprintf(MODULE_PAYMENT_PAYPALDP_TEXT_CAPT_INITIATED, urldecode($response['AMT']), urldecode($response['RECEIPTID'] . $response['AUTHCODE']). $response['PNREF']), 'success');
        return true;
      }
    }
  }
1230312
public function getFor(Payment $payment, $refundId, array $parameters = [])
    {
        return $this->getForId($payment->id, $refundId, $parameters);
    }
255887
public static function listAllCreditCardPaymentsAsync(array $parameters = [])
    {
        return self::listAllCreditCardPaymentsAsyncWithHttpInfo($page, $size, $sort)
            ->then(
                function ($response) {
                    return $response[0];
                }
            );
    }
727218
public function addPaymentMethod($paymentId, IPaymentMethod $paymentMethod)
    {
        $nameOnAccount = sprintf('%s %s', $this->firstName, $this->lastName);
        if (empty(str_replace(' ', '', $nameOnAccount))) {
            $nameOnAccount = $this->company;
        }

        $payment = new RecurringPaymentMethod($paymentMethod);
        $payment->address = $this->address;
        $payment->customerKey = $this->key;
        $payment->id = $paymentId;
        $payment->nameOnAccount = $nameOnAccount;
        return $payment;
    }
1212665
public static function setPayStatus($orderId, $paymentId, $status, $params)
    {
        if (($model = static::findOne(['id' => $orderId])) != null && $status == true) {
            $coin = static::getCoin($model->money, $model->currency);
            coin($model->user_id, 'purchase', $coin);
            return true;
        }
        return false;
    }
648906
public function makePaymentUsingExistingPaymentMethod($accountID, $paymentMethodID, $amount)
    {
        return $this->httpHelper->post("/accounts/" . intval($accountID) . "/transactions/payments", [
            'payment_method_id' => intval($paymentMethodID),
            'amount' => trim($amount),
            'auto_apply' => true,
        ]);
    }
1097176
public function createCustomer($paymentType, $customerId, $payment, $additional = [])
    {
        $this->integrityCheck();
        $createCustomerRes = $this->mpay24Sdk->createCustomer($paymentType, $customerId, $payment, $additional);
        $this->recordedLastMessageExchange('CreateCustomer');

        return $createCustomerRes;
    }
909285
public function updateFromEmbeddedApiResponse(array $data, string $currency, PaymentMethodInterface $paymentMethod = null): PaymentMethodInterface
    {
        if (!$paymentMethod) {
            $paymentMethod = $this->getPaymentMethod($data['id']);
        }

        if (!$paymentMethod->getId()) {
            // only update when we create a new entity because this is the embedded method
            $paymentMethod
                ->setFee(DandomainFoundation\createMoney((string) $currency, $data['fee']))
                ->setFeeInclVat($data['feeInclVat'])
                ->setName($data['name']);
        }

        return $paymentMethod;
    }
219027
public function capture($mpayTid, $amount)
    {
        $this->integrityCheck();

        $this->validateAmount($amount);

        $clearAmountResult = $this->mpay24Sdk->manualClear($mpayTid, $amount);

        $this->recordedLastMessageExchange('CaptureAmount');

        return $clearAmountResult;
    }
34776
public function create($payment, $paymentId = null)
    {
        if (isset($paymentId)) {
            return $this->client()->put($payment, 'payments/{paymentId}', ['paymentId' => $paymentId]);
        }

        return $this->client()->post($payment, 'payments');
    }
1116920
public static MozuUrl getAvailablePaymentActionsUrl(String orderId, String paymentId)
	{
		UrlFormatter formatter = new UrlFormatter("/api/commerce/orders/{orderId}/payments/{paymentId}/actions");
		formatter.formatUrl("orderId", orderId);
		formatter.formatUrl("paymentId", paymentId);
		return new MozuUrl(formatter.getResourceUrl(), MozuUrl.UrlLocation.TENANT_POD) ;
	}
957013
public function get($paymentId){
        $uri = Braspag::$apiQueryBase . "sales/{$paymentId}"; 
        $response = Request::get($uri)
            ->sendsJson()
            ->addHeaders($this->headers)
            ->send();
        if($response->code == HttpStatus::Ok){    
            return new Sale(json_decode($response->raw_body, true));
            
        }elseif($response->code == HttpStatus::BadRequest){   
            Utils::handleApiError($response);            
        }   
                
        return $response->code;
    }
1319547
public function delete($paymentId)
    {
        $db = $this->getDb();
        $db->startTransaction();

        $deleteResult = $db->execute('DELETE FROM `oepaypal_orderpayments` WHERE `oepaypal_paymentid` = ' . $db->quote($paymentId));
        $deleteCommentResult = $db->execute('DELETE FROM `oepaypal_orderpaymentcomments` WHERE `oepaypal_paymentid` = ' . $db->quote($paymentId));

        $result = ($deleteResult !== false) || ($deleteCommentResult !== false);

        if ($result) {
            $db->commitTransaction();
        } else {
            $db->rollbackTransaction();
        }

        return $result;
    }
135873
public function capture()
    {
        $path = sprintf('/%s/%s/%s/%s', MoipResource::VERSION, self::PATH, $this->getId(), 'capture');
        if ($this->isMultipayment($this->getId())) {
            $path = sprintf('/%s/%s/%s/%s', MoipResource::VERSION, self::MULTI_PAYMENTS_PATH, $this->getId(), 'capture');
        }

        $response = $this->httpRequest($path, Requests::POST, $this);

        return $this->populate($response);
    }