question

richa avatar image
richa asked infoysr answered

redirection issue with oauth

Hi,

I have two merchant accounts say M1(by default first created) and M2(added later).When I click for example oauth request in developers account , it asks me to select one merchant out of the two.When I select M1 it redirects to the url mentioned but when I select M2 it takes me to sandbox account instead of url specified in REST configuration settings.Can you please help me with why this is happening?

OAuth
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

David Marginian avatar image
David Marginian Deactivated answered richa commented

You are likely being redirected to your sandbox account because M2 doesn't have your app installed (and thus the merchant has not authorized you access). You should be directed to the app market listing of your site where you can choose the "Connect" button to install it.

5 comments
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

richa avatar image richa commented ·

But I am testing this with the sample request link generated from developers account.Also as I am being asked in testing that which merchant I wish to user would it be same for production or in production it will connect with the merchant that is selected by me

0 Likes 0 ·
David Marginian avatar image David Marginian ♦♦ richa commented ·

That is what my answer was based on (I logged into your developer account and looked at it).

0 Likes 0 ·
richa avatar image richa David Marginian ♦♦ commented ·

So as in testing environment I am being asked about which merchant to choose would I be asked same way in production environment too?

0 Likes 0 ·
Show more comments
infoysr avatar image
infoysr answered

It seems that there may be a misconfiguration causing your second merchant account (M2) to default to the sandbox environment instead of Royal Mail Redirection to the URL specified in your REST configuration settings. First, double-check the REST API settings for M2 to ensure the URLs are correctly specified for the live environment, not just for sandbox. Make sure that both sandbox and live configurations are clearly separated and properly filled out. Additionally, verify that M2 is properly linked to your live environment, as an incomplete or incorrect link may cause the system to default to sandbox. Review the OAuth configuration settings to ensure M2 is set to use live credentials for the OAuth flow. Re-establishing or updating the connection between M2 and the live environment might help resolve the issue.

10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Welcome to the
Clover Developer Community