@param string $requestMethod

@return Payment
171135
public function setRequestMethod($requestMethod)
    {
        $lcRequestMethod = strtolower($requestMethod);
        if (self::REQUEST_METHOD_GET !== $lcRequestMethod
            && self::REQUEST_METHOD_POST !== $lcRequestMethod
        ) {
            throw new UnsupportedRequestMethodException(
                sprintf('Unsupported request method "%s".', $requestMethod)
            );
        }

        $this->requestMethod = $lcRequestMethod;

        return $this;
    }
1219438
public static function castFrom($requestUri, string $requestMethod = null)
    {
        if ($requestUri instanceof self) {
            return $requestUri;
        }

        return new self($requestUri, (string) $requestMethod);
    }
1354381
public function add(HpsPayPlanPaymentMethod $paymentMethod)
    {
        $result = null;
        if ($paymentMethod->paymentMethodType == HpsPayPlanPaymentMethodType::ACH) {
            $result = $this->addACH($paymentMethod);
        } else {
            $result = $this->addCreditCard($paymentMethod);
        }
        return $this->hydrateObject($result, 'HpsPayPlanPaymentMethod');
    }
7904
public function listPaymentMethods()
    {
        $request = new ListPaymentMethods($this->config->getMerchantId());

        $this->request = $request->getXml();

        $this->send();

        $result = new ListPaymentMethodsResponse($this->response);

        return $result;
    }
999992
protected function doVerifyWithPayPal($requestData)
    {
        $callerService = $this->getCommunicationService();
        $payPalPayPalRequest = $this->getPayPalRequest();
        foreach ($requestData as $requestParameterName => $requestParameterValue) {
            $payPalPayPalRequest->setParameter($requestParameterName, $requestParameterValue);
        }
        $responseDoVerifyWithPayPal = $callerService->doVerifyWithPayPal($payPalPayPalRequest, $requestData['charset']);

        return $responseDoVerifyWithPayPal;
    }
603055
protected function getHttpMethod($method)
    {
        if (!$this->methodAvailable($method)) {
            throw new \Payrexx\PayrexxException('Method ' . $method . ' not implemented');
        }
        return self::$methods[$method];
    }
464585
protected function createRequest($method, $url, $requestHeaders, $requestPayload, $protocolVersion)
    {
        $request = new Request(
            $method,
            $url,
            $requestHeaders,
            $requestPayload,
            $protocolVersion
        );

        return $request;
    }
1353201
public function setPayment($iPaymentId)
    {
        //  Validate
        $oPayment = $this->oPaymentModel->getById(
            $iPaymentId,
            ['expand' => ['invoice']]
        );

        if (empty($oPayment)) {
            throw new RequestException('Invalid payment ID.');
        }

        $this->oPayment = $oPayment;
        return $this;
    }
1316246
protected function prepareOrderPayment($requestOrderPayment)
    {
        $request = $this->getRequest();

        $requestOrderPayment->setStatus($request->getRequestParameter(self::PAYPAL_PAYMENT_STATUS));
        $requestOrderPayment->setTransactionId($request->getRequestParameter(self::PAYPAL_TRANSACTION_ID));
        $requestOrderPayment->setCurrency($request->getRequestParameter(self::MC_CURRENCY));
        $requestOrderPayment->setAmount($this->getAmount());
        $requestOrderPayment->setAction($this->getAction());

        $correlationId = $request->getRequestParameter(self::CORRELATION_ID);
        if (!$correlationId) {
            $correlationId = $request->getRequestParameter(self::IPN_TRACK_ID);
        }
        $requestOrderPayment->setCorrelationId($correlationId);

        $date = 0 < strlen($request->getRequestParameter(self::PAYMENT_DATE)) ?
                date('Y-m-d H:i:s', strtotime($request->getRequestParameter(self::PAYMENT_DATE))) : null;
        $requestOrderPayment->setDate($date);
    }
630741
public function createRequest($httpMethod, $path, $body = null, array $headers = [])
	{
		return new Request(
			$httpMethod,
			$path,
			array_merge($this->headers, $headers),
			$body
		);
	}
9539
public HttpRequest setRequestMethod(String requestMethod) {
    Preconditions.checkArgument(requestMethod == null || HttpMediaType.matchesToken(requestMethod));
    this.requestMethod = requestMethod;
    return this;
  }
1273977
private function addCreditCard(HpsPayPlanPaymentMethod $paymentMethod)
    {
        $data = $paymentMethod->getEditableFieldsWithValues();
        $data['customerKey'] = $paymentMethod->customerKey;
        if (isset($paymentMethod->accountNumber)) {
            $data['accountNumber'] = $paymentMethod->accountNumber;
        } else if (isset($paymentMethod->paymentToken)) {
            $data['paymentToken'] = $paymentMethod->paymentToken;
        }
        $result = $this->doRequest($data, array(
            'verb'     => 'POST',
            'endpoint' => 'paymentMethodsCreditCard',
        ));
        return $this->hydrateObject($result, 'HpsPayPlanPaymentMethod');
    }
488882
public function receiveMethod()
    {
        if ($requestMethod = (isset($_SERVER['REQUEST_METHOD'])) ? $_SERVER['REQUEST_METHOD'] : null) {
            $requestMethod = strtoupper($requestMethod);
        }

        return $requestMethod;
    }
481225
public function refundCardChargeRequest(RequestModels\ChargeRefund
	                                        $requestModel)
	{

		$chargeMapper = new ChargesMapper($requestModel);

		$requestPayload = array (
			'authorization' => $this->_apiSetting->getSecretKey(),
			'mode'          => $this->_apiSetting->getMode(),
			'postedParam'   => $chargeMapper->requestPayloadConverter(),

		);
		$refundUri = sprintf ($this->_apiUrl->getChargeRefundsApiUri(),$requestModel->getChargeId());

		$processCharge = \com\checkout\helpers\ApiHttpClient::postRequest($refundUri,
			$this->_apiSetting->getSecretKey(),$requestPayload);

		$responseModel = new ResponseModels\Charge($processCharge);


		return $responseModel;
	}
108792
public function withMethod($method)
    {
        $this->assertMethod($method);
        
        $request = $this->copy();
        $request->method = $method;
        
        return $request;
    }
400312
public function paymentMethod()
    {
        $customer = $this->asBraintreeCustomer();

        foreach ($customer->paymentMethods as $paymentMethod) {
            if ($paymentMethod->isDefault()) {
                return $paymentMethod;
            }
        }
    }
737398
public function voidCharge($chargeId , RequestModels\ChargeVoid
                                            $requestModel)
    {

        $chargeMapper = new ChargesMapper($requestModel);

        $requestPayload = array (
            'authorization' => $this->_apiSetting->getSecretKey(),
            'mode'          => $this->_apiSetting->getMode(),
            'postedParam'   => $chargeMapper->requestPayloadConverter(),

        );
        $refundUri = sprintf ($this->_apiUrl->getVoidChargesApiUri(),$chargeId);

        $processCharge = \com\checkout\helpers\ApiHttpClient::postRequest($refundUri,
            $this->_apiSetting->getSecretKey(),$requestPayload);

        $responseModel = new ResponseModels\Charge($processCharge);


        return $responseModel;
    }