Calls the PagSeguro web service and create this request for payment.
 Return boolean.
558341
def create
      request = if receivers.empty?
                  Request.post('transactions', api_version, params)
                else
                  Request.post_xml('transactions/', nil, credentials, xml_params)
                end

      Response.new(request, self).serialize
    end
996516
public function execute()
    {
        parent::execute();

        $addValueSvc = new HpsGiftCardService($this->service->servicesConfig());
        if ($this->token != null && ($this->token instanceof HpsTokenData)) {
            if ($this->card == null) {
                $this->card = new HpsGiftCard();
            }
            $this->card->tokenValue = $this->token->tokenValue;
        }
        return $addValueSvc->addValue(
            $this->amount,
            $this->currency,
            $this->card
        );
    }
182875
def checkout(self, transparent=False, **kwargs):
        
        self.data['currency'] = self.config.CURRENCY
        self.build_checkout_params(**kwargs)
        if transparent:
            response = self.post(url=self.config.TRANSPARENT_CHECKOUT_URL)
        else:
            response = self.post(url=self.config.CHECKOUT_URL)
        return PagSeguroCheckoutResponse(response.content, config=self.config)
105205
public function pay()
    {
        if (!Settings::first()->ready()) {
            return false;
        }

        if ($this->ammount != 0) {
            try {
                Charge::create([
                    'amount'      => $this->ammount,
                    'currency'    => $this->currency,
                    'source'      => $this->source,
                    'description' => $this->description,
                ]);
            } catch (Exception $e) {
                $this->error = $e;

                return false;
            }
        }

        return true;
    }
1174947
protected function verifyPayment()
	{

		$fields = array(
			'MerchantID' => $this->config->get('gateway.zarinpal.merchant-id'),
			'Authority' => $this->refId,
			'Amount' => $this->amount,
		);

		try {
			$soap = new SoapClient($this->serverUrl, ['encoding' => 'UTF-8']);
			$response = $soap->PaymentVerification($fields);

		} catch (\SoapFault $e) {
			$this->transactionFailed();
			$this->newLog('SoapFault', $e->getMessage());
			throw $e;
		}

		if ($response->Status != 100 && $response->Status != 101) {
			$this->transactionFailed();
			$this->newLog($response->Status, ZarinpalException::$errors[$response->Status]);
			throw new ZarinpalException($response->Status);
		}

		$this->trackingCode = $response->RefID;
		$this->transactionSucceed();
		$this->newLog($response->Status, Enum::TRANSACTION_SUCCEED_TEXT);
		return true;
	}
955038
public function execute() {
        // Get the request parameters
        $params = $this->getRequest()->getParams();

        // Get the quote
        $quote = $this->checkoutSession->getQuote();

        // Check for guest user quote
        if ($this->customerSession->isLoggedIn() === false)
        {
            $quote = $this->helper->prepareGuestQuote($quote);
        }
        
        // Send the charge request
        $success = $this->tokenChargeService->sendApplePayChargeRequest($params, $quote);

        // If charge is successful, create order
        if ($success) {
            $orderId = $this->createOrder($quote);
        }

        return $this->resultJsonFactory->create()->setData([
            'status' => $success
        ]);
    }
1351036
protected function sendPayRequest()
	{
		$this->newTransaction();

		$fields = array(
			'MerchantID' => $this->config->get('gateway.zarinpal.merchant-id'),
			'Amount' => $this->amount,
			'CallbackURL' => $this->getCallback(),
			'Description' => $this->description ? $this->description : $this->config->get('gateway.zarinpal.description', ''),
			'Email' => $this->email ? $this->email :$this->config->get('gateway.zarinpal.email', ''),
			'Mobile' => $this->mobileNumber ? $this->mobileNumber : $this->config->get('gateway.zarinpal.mobile', ''),
		);

		try {
			$soap = new SoapClient($this->serverUrl, ['encoding' => 'UTF-8']);
			$response = $soap->PaymentRequest($fields);

		} catch (\SoapFault $e) {
			$this->transactionFailed();
			$this->newLog('SoapFault', $e->getMessage());
			throw $e;
		}

		if ($response->Status != 100) {
			$this->transactionFailed();
			$this->newLog($response->Status, ZarinpalException::$errors[$response->Status]);
			throw new ZarinpalException($response->Status);
		}

		$this->refId = $response->Authority;
		$this->transactionSetRefId();
	}
598761
public function request()
    {
        $this->getTransactions();
        if (! is_null($this->_PagSeguroPaymentList->getTransactions())) {
            $partiallyRefundedOrdersArray = $this->getPartiallyRefundedOrders();

            foreach ($this->_PagSeguroPaymentList->getTransactions() as $payment) {
                $order = $this->decryptOrderById($payment);

                if (!in_array($order->getId(), $partiallyRefundedOrdersArray)) {
                    if (! $this->addPayment($this->decryptOrderById($payment), $payment))
                        continue;
                }
            }
        }
        return $this->_arrayPayments;
    }
180918
protected function userPayment()
	{
		$this->authority = Input::get('Authority');
		$status = Input::get('Status');

		if ($status == 'OK') {
			return true;
		}

		$this->transactionFailed();
		$this->newLog(-22, ZarinpalException::$errors[-22]);
		throw new ZarinpalException(-22);
	}
573393
public void presentPaymentMethodSelection() {
        final Intent paymentMethodsIntent = mPaymentMethodsActivityStarter.newIntent()
                .putExtra(EXTRA_PAYMENT_SESSION_ACTIVE, true);
        mHostActivity.startActivityForResult(paymentMethodsIntent, PAYMENT_METHOD_REQUEST);
    }
809303
def process(self, request, item):
        """"""
        warn_untested()
        from paypal.pro.helpers import PayPalWPP

        wpp = PayPalWPP(request)

        # Change the model information into a dict that PayPal can understand.
        params = model_to_dict(self, exclude=self.ADMIN_FIELDS)
        params['acct'] = self.acct
        params['creditcardtype'] = self.creditcardtype
        params['expdate'] = self.expdate
        params['cvv2'] = self.cvv2
        params.update(item)

        # Create recurring payment:
        if 'billingperiod' in params:
            return wpp.createRecurringPaymentsProfile(params, direct=True)
        # Create single payment:
        else:
            return wpp.doDirectPayment(params)
527315
protected function sendPayRequest()
    {
        $this->newTransaction();
        $fields = [
            'api'      => $this->config->get('gateway.payir.api'),
            'amount'   => $this->amount,
            'redirect' => $this->getCallback(),
        ];

        if (isset($this->factorNumber))
            $fields['factorNumber'] = $this->factorNumber;

        $ch = curl_init();
        curl_setopt($ch, CURLOPT_URL, $this->serverUrl);
        curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($fields));
        curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
        $response = curl_exec($ch);
        $response = json_decode($response, true);
        curl_close($ch);
        if (is_numeric($response['status']) && $response['status'] > 0) {
            $this->refId = $response['transId'];
            $this->transactionSetRefId();
            return true;
        }
        $this->transactionFailed();
        $this->newLog($response['errorCode'], PayirSendException::$errors[ $response['errorCode'] ]);
        throw new PayirSendException($response['errorCode']);
    }
480267
public function execute()
    {
        $result = $this->payment->createPaymentRequest();
        $resultPage = $this->resultPageFactory->create();
        $code = $result->getCode();
        $resultPage->getLayout()->getBlock('pagseguro.payment.checkout')
            ->setCode($code);
        $resultPage->getLayout()->getBlock('pagseguro.payment.checkout')
            ->setPaymentJs($this->getPagSeguroPaymentJs());
        $resultPage->getLayout()->getBlock('pagseguro.payment.checkout')
            ->setPaymentUrl($this->payment->checkoutUrl($code, 'paymentService'));

        return $resultPage;
    }
1092440
public function execute()
    {
        $resultPage = $this->_resultPageFactory->create();
        $resultPage->getLayout()->getBlock('pagseguro.direct.payment')->setData('order', $this->_checkoutSession->getLastRealOrder()->getId());
        try {
            $this->_library->setEnvironment();
            $resultPage->getLayout()->getBlock('pagseguro.direct.payment')->setData(
                'sessionCode',
                $this->_library->getSession()
            );
            $resultPage->getLayout()->getBlock('pagseguro.direct.payment')->setData(
                'paymentUrl',
                $this->_library->getDirectPaymentUrl()
            );
        } catch (\Exception $exc) {
            /** @var \Magento\Sales\Model\Order $order */
            $order = $this->_objectManager->create('\Magento\Sales\Model\Order')->load(
                $this->_checkoutSession->getLastRealOrder()->getId()
            );
            /** change payment status in magento */
            $order->addStatusToHistory('pagseguro_cancelada', null, true);
            /** save order */
            $order->save();

            return $this->_redirect('pagseguro/payment/failure');
        }
        return $resultPage;
    }
249792
public function execute()
    {
        parent::execute();

        $voidSvc = new HpsGiftCardService($this->service->servicesConfig());
        return $voidSvc->void(
            $this->transactionId
        );
    }
825432
public function isPublicEndpoint(): bool
    {

        // Public calls need no checking.
        if ($this->public_call || is_null($this->token) || $this->scope === 'public')
            return true;

        return false;
    }
158303
public function execute()
    {
        parent::execute();

        $activateSvc = new HpsGiftCardService($this->service->servicesConfig());
        if ($this->token != null && ($this->token instanceof HpsTokenData)) {
            if ($this->card == null) {
                $this->card = new HpsGiftCard();
            }
            $this->card->tokenValue = $this->token->tokenValue;
        }
        return $activateSvc->activate(
            $this->amount,
            $this->currency,
            $this->card
        );
    }