You are here

private function Redirect::verify in PayPal for Payment 8

Same name and namespace in other branches
  1. 2.0.x src/Controller/Redirect.php \Drupal\paypal_payment\Controller\Redirect::verify()
1 call to Redirect::verify()
Redirect::access in src/Controller/Redirect.php

File

src/Controller/Redirect.php, line 58

Class

Redirect
Handles the "redirect" route.

Namespace

Drupal\paypal_payment\Controller

Code

private function verify(PaymentInterface $payment) {

  /** @var PayPalBasic $payment_method */
  $payment_method = $payment
    ->getPaymentMethod();
  return $payment
    ->getOwnerId() === $this
    ->currentUser()
    ->id() && $this->request
    ->get('paymentId') === $payment_method
    ->getPaymentId();
}