paypal / android-checkout-sdk

Apache License 2.0
77 stars 38 forks source link

If returnUrl contain the underscore character then it is not validate #197

Open tgloc opened 1 year ago

tgloc commented 1 year ago

Before you create a new issue, please search for similar issues. It's possible somebody has encountered this bug already. PLEASE REMOVE THIS LINE TO ACKNOWLEDGE THAT AN ISSUE DOESN'T ALREADY EXIST FOR THIS BUG

Describe the bug When I set the returnUrl contain a underscore character, it throw exception INVALID_RETURN_URL

To Reproduce Steps to reproduce the behavior:

  1. Set returnUrl contain a underscore character like 'com.example.easy_paypal://paypalpay'
  2. Call PayPalCheckout.setConfig the config above
  3. See error

Expected behavior returnUrl can contain underscore character, because I can set this url on Developer Portal

Screenshots

image

Smartphone (please complete the following information):

mahmoud-turki commented 1 year ago

Hi @tgloc96, please follow these instructions to customize the url as you can not have _ in the url. https://developer.paypal.com/limited-release/paypal-mobile-checkout/android/customize-return-url/

Screen Shot 2023-02-05 at 9 26 53 PM
tgloc commented 1 year ago

Hi @tgloc96, please follow these instructions to customize the url as you can not have _ in the url. https://developer.paypal.com/limited-release/paypal-mobile-checkout/android/customize-return-url/

Screen Shot 2023-02-05 at 9 26 53 PM

Hi @mahmoud-turki,

Thank you so much for quick reply, but when I set the returnUrl like document, it open the sandbox webview to login sandbox account, but I can not login to dashboard. But when I go to the url sandbox.paypal.com I can login properly, so please help me.

It always say information isn't correct. But when I go to url sandbox.paypal.com I can login properly

image
gabo-alv commented 1 year ago

Hi @tgloc96 , I think this could be related to a cache issue on the Sandbox developer account when you added the new return url.

I was able to reproduce the issue myself on Sandbox just after I changed the return url and, after a couple of hours , I was able to successfully login. Please try again, at this point in time you shouldn't have any cache issue. Please confirm if this worked for you. Thank you for your feedback and collaboration.

image