title: How do i get the return_url after payment approval so i can get the Payer ID within return_url?
body: <p>To execute the payment I need to Payment ID and Payer ID. Now I have the Payment ID which I get it from the create payment call. But the Payer ID isn't included inside. I understand that one can obtain the Payer ID from the return_url after payment approval. So how do I get that return_url / Payer ID?</p>
  
  <p>I have tried looking at the docs at paypal website and it is written "# Execute payment with the payer ID from the create payment call (following redirect)". This is the part I cant get. </p>
  
  <pre><code>class PayPal():
      paypalrestsdk.configure({
          "mode": "sandbox", # sandbox or live
          "client_id": "XXXXXXXXXXXXXXXXXXX",
          "client_secret": "XXXXXXXXXXXXXXXXXX" })
  
      def create_payment(self):
          payment = paypalrestsdk.Payment({
              "intent": "sale",
              "payer": {
                  "payment_method": "paypal"},
              "redirect_urls": {
                  "return_url": "http://www.example.com",
                  "cancel_url": "http://www.example.com"},
              "transactions": [{
                  "item_list": {
                      "items": [{
                          "name": "item",
                          "sku": "pcs",
                          "price": "5.00",
                          "currency": "USD",
                          "quantity": 1}]},
                  "amount": {
                      "total": "5.00",
                      "currency": "USD"},
                  "description": "This is the payment transaction description."}]})
  
          if payment.create():
              # Extract redirect url
              for link in payment.links:
                  if link.method == "REDIRECT":
                      # Capture redirect url
                      redirect_url = (link.href)
                      webbrowser.open("%s"% (redirect_url))
                      print(link)
              print("Payment created successfully")
              print (payment)
          else:
              print("Error while creating payment:")
  
              print(payment.error)
      def execute_payment(self):
          payment = paypalrestsdk.Payment.find("%s" % payment.id)
          if payment.execute({"payer_id": "%s" % payment.payerid}):
              print("Payment[%s] execute successfully" % (payment.id))
          else:
              print(payment.error)
  </code></pre>
  
  <p>This is what I get in the create payment call:</p>
  
  <p>{'intent': 'sale', 'payer': {'payment_method': 'paypal'}, 'redirect_urls': {'return_url': '<a href="http://www.example.com" rel="nofollow noreferrer">http://www.example.com</a>', 'cancel_url': '<a href="http://www.example.com" rel="nofollow noreferrer">http://www.example.com</a>'}, 'transactions': [{'amount': {'total': '5.00', 'currency': 'USD'}, 'description': 'This is the payment transaction description.', 'item_list': {'items': [{'name': 'item', 'sku': 'pcs', 'price': '5.00', 'currency': 'USD', 'quantity': 1}]}, 'related_resources': []}], 'id': 'PAYID-xxxxxxxxxxxxxx', 'state': 'created', 'create_time': '2019-05-12T06:37:19Z', 'links': [{'href': '<a href="https://api.sandbox.paypal.com/v1/payments/payment/PAYID-xxxxxxxxxxxxxxxxx" rel="nofollow noreferrer">https://api.sandbox.paypal.com/v1/payments/payment/PAYID-xxxxxxxxxxxxxxxxx</a>', 'rel': 'self', 'method': 'GET'}, {'href': '<a href="https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_express-checkout&amp;token=EC-xxxxxxxxxxxxx" rel="nofollow noreferrer">https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_express-checkout&amp;token=EC-xxxxxxxxxxxxx</a>', 'rel': 'approval_url', 'method': 'REDIRECT'}, {'href': '<a href="https://api.sandbox.paypal.com/v1/payments/payment/PAYID-xxxxxxxxxxxx/execute" rel="nofollow noreferrer">https://api.sandbox.paypal.com/v1/payments/payment/PAYID-xxxxxxxxxxxx/execute</a>', 'rel': 'execute', 'method': 'POST'}]}</p>