question

justinsouter avatar image
justinsouter asked justinsouter edited

Can't read Customer, but only in production

We are having an issue reading Customer information from an Order in a custom tender app. Although everything works great with our DevKits, the feature fails in production with our customers.

OrderConnector.getOrder(o).getCustomers()

We discovered that our app did not have the Customer READ permissions and have since added that, but the production behavior did not improve. That also raises the question of why this ever worked on our DevKits.

Questions:

1. Anything obvious being missed here? I'm a veteran developer but relatively new to Android.

2. Recommendations for production debugging?

Thanks.

Custom Tenders
10 |2000

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

1 Answer

David Marginian avatar image
David Marginian Deactivated answered justinsouter edited

Sandbox and production are separate environments. I just checked your application in the Sandbox environment and it has every permission checked/enabled. I suggest that you update the permissions for your sandbox application to reflect production for testing purposes. When the permissions change on your application all merchants will need to uninstall and then re-install the application.

https://docs.clover.com/docs/permissions


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.

justinsouter avatar image justinsouter commented ·

Thanks David. We had an offshore team do the core app dev, so they must have set the permissions that way. I say this because I've looked for the corresponding permissions in the sandbox and can't find them.

The doc you reference says "On the Developer Dashboard, click App Settings on the side-nav." When I'm logged into https://sandbox.dev.clover.com/dashboard and click Dashboard, I do not see any App Settings nav item.

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

You need to login to your developer not merchant dashboard - sandbox.dev.clover.com/developer-home.

0 Likes 0 ·
justinsouter avatar image justinsouter commented ·

I changed the permissions in the sandbox to match production, deleted the app, side-loaded it, and still it works. Was expecting it to fail now.

Reviewing the permissions I was thinking that the Orders READ permission might be needed, since Customer is accessed via Order. But that's off in sandbox and still it works.

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

I don't know what deleted the app means, but when the permissions change the app needs to be uninstalled and reinstalled. Instructions on doing that are here - https://community.clover.com/articles/23744/resolving-401-unauthorized-responses-when-making-a.html

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

By "delete" I meant on the device Settings->Apps->MyApp->Uninstall. Anyway, I went to Market Preview and clicked Uninstall and the permissions shown there updated from the app config (they still had the old permissions before). Now I can finally duplicate the issue via sandbox. Thanks for your help.

0 Likes 0 ·

Welcome to the
Clover Developer Community