title: Paypal payment - How to apply access token using paypal PHP SDK
body: <p>I am trying to implement PayPal payment using the access token. For this, I obtained the token and refresh token from our customer's PayPal account, when they are connected. I have successfully created the token using the refresh token and trying to create the payment with that token. I am not sure how to set the token in the Paypal PHP SDK.</p>
  
  <pre><code>$access_token = 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX';
  // obtained using refresh token
  
  $payer = new Payer();
     $payer-&gt;setPaymentMethod("paypal");
  
  $amount = new Amount();
  $amount-&gt;setCurrency("GBP")
     -&gt;setTotal(1);
  $transaction = new Transaction();
     $transaction-&gt;setAmount($amount);
  
     $baseUrl = base_url();
  $redirectUrls = new RedirectUrls();
  $redirectUrls-&gt;setReturnUrl("$baseUrl/customer/paypal/complete?success=true")
     -&gt;setCancelUrl("$baseUrl/paypal/complete?success=false");
     $payment = new Payment();
  $payment-&gt;setIntent("sale")
     -&gt;setPayer($payer)
     -&gt;setRedirectUrls($redirectUrls)
     -&gt;setTransactions(array($transaction));
  
    $request = clone $payment;
      try {
         $payment-&gt;create($apiContext);
       } catch (Exception $ex) {    
  
     }
  </code></pre>
  
  <p>Here I have the access token, But I don't get any method to apply this access token in this code. Does anyone know how to make payment using the access token?</p>