title: Android - Paypal SDK verify a payment
body: <p>I'my trying to use <code>PayPal</code> payments in my Android app and i've managed so far to get PayPal's response in <code>onActivityResult</code> following the <a href="https://github.com/paypal/PayPal-Android-SDK/blob/master/docs/single_payment.md" rel="nofollow noreferrer">instructions here</a>.Now i need to verify the transaction and here is where i fail.This is what i've done so far, </p>
  
  <pre><code>   private void verifyPayment(String paymentKey){
  
      try {
  
          APIContext apiContext = new APIContext("my_access_token", "my_secret_token", "sandbox");
          Payment payment = Payment.get(apiContext, paymentKey);
  
      } catch (PayPalRESTException e) {e.printStackTrace();}
  }
  </code></pre>
  
  <p>And this is the error log,</p>
  
  <pre><code>response-code: 500  details: null
  at com.paypal.base.rest.PayPalResource.execute(PayPalResource.java:431)
  at com.paypal.base.rest.PayPalResource.configureAndExecute(PayPalResource.java:295)
  at com.paypal.base.rest.PayPalResource.configureAndExecute(PayPalResource.java:228)
  at com.paypal.api.payments.Payment.get(Payment.java:187)
  at com.mob.tr.Names.verifyPayment(Names.java:175)
  at com.mob.tr.Names.access$000(Names.java:39)
  at com.mob.tr.Names$1.run(Names.java:128)
  at java.lang.Thread.run(Thread.java:833)
  Caused by: com.paypal.base.exception.HttpErrorException: Response code: 500 Error response: &lt;ns1:XMLFault xmlns:ns1="http://cxf.apache.org/bindings/xformat"&gt;&lt;ns1:faultstring xmlns:ns1="http://cxf.apache.org/bindings/xformat"&gt;java.lang.NullPointerException&lt;/ns1:faultstring&gt;&lt;/ns1:XMLFault&gt;
  at com.paypal.base.HttpConnection.executeWithStream(HttpConnection.java:162)
  at com.paypal.base.HttpConnection.execute(HttpConnection.java:65)
  at com.paypal.base.rest.PayPalResource.execute(PayPalResource.java:417)
  java.io.FileNotFoundException: https://api.sandbox.paypal.com/v1/payments/payment/PAY-60892637K9684232WLDMQQYA
  at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getInputStream(HttpURLConnectionImpl.java:238)
  at com.android.okhttp.internal.huc.DelegatingHttpsURLConnection.getInputStream(DelegatingHttpsURLConnection.java:210)
  at com.android.okhttp.internal.huc.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:25)
  at com.paypal.base.HttpConnection.executeWithStream(HttpConnection.java:132)
  </code></pre>