Skip to content

Conversation

@toupper
Copy link
Contributor

@toupper toupper commented Nov 3, 2022

Closes: #8016

Description

With this PR we route the MobilePay "create orders" API request to the developer wp.com sandbox in debug mode. That way we avoid having to set up Charles to map the request, and ensure that all calls to create an order goes to the wp.com sandbox. It actually uses the user credentials to get the wp.com username, so it can compose the sandbox URL that replaces wp.com public API base URL.
Firstly I intended to add a debug setting to switch on or off routing to the wp.com sandbox, but I ended up discarding that given the complexity of configuring all remotes to use the wp.com username. If we need to be pointing to the wp.com sandbox to test other functionalities in the future we can extend it anyways.

Testing instructions

Prerequisites

  • Have a wp.com sandbox linked to the same wp.com account you use to authenticate in the app
  • Login in the terminal to that sandbox via ssh so the server can start
  • With a debug build, purchase an In-App purchase product and be sure that when submitting the request to our IAP backend it is pointing to your wp.com sandbox ("https://your wp.com user name.dev.dfw.wordpress.com/sandboxed-api/")

  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.

@toupper toupper added type: task An internally driven task. feature: in-app purchases Related to In-app purchases and subscriptions labels Nov 3, 2022
@toupper toupper added this to the 11.2 milestone Nov 3, 2022
@toupper toupper requested a review from koke November 3, 2022 15:24
@wpmobilebot
Copy link
Collaborator

You can test the changes from this Pull Request by:
  • Clicking here or scanning the QR code below to access App Center
  • Then installing the build number pr8018-efbd00b on your iPhone

If you need access to App Center, please ask a maintainer to add you.

@toupper toupper closed this Nov 3, 2022
@toupper toupper deleted the issue/8016-iap-wpcom-sandbox branch November 3, 2022 20:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature: in-app purchases Related to In-app purchases and subscriptions type: task An internally driven task.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add debug option to sandbox wpcom public API

3 participants