Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

App link setup docs #1171

Merged
merged 4 commits into from
Oct 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions APP_LINK_SETUP.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
## Set Up App Links

In order to use the PayPal flow your application must be set up for [App Links](https://developer.android.com/training/app-links).

### Register App Link in Control Panel

Before using this feature, you must register your App Link domain in the Braintree Control Panel:

1. Log into your Control Panel (e.g. [Sandbox](https://sandbox.braintreegateway.com/login), or [Production](https://www.braintreegateway.com/login)).
2. Click on the **gear icon** in the top right corner. A drop-down menu will open.
3. Click **Processing** from the drop-down menu.
4. Scroll to the **Payment Methods** section.
5. Next to **PayPal**, click the **Options** link. This will take you to your linked PayPal Account(s) page.
6. Click the **View Domain Names** button. This will take you to the **PayPal Domain Names** page.
- Note: If you have a single PayPal account, it will be at the bottom of the page. If you have multiple PayPal accounts, it will be at the top right of the page.
7. Click the **+ Add** link on the top right of the page or scroll to the **Specify Your Domain Names** section.
8. In the text box enter your list of domain names separated by commas.
- Note: The value you enter must match your fully qualified domain name exactly – including the "www." if applicable.
9. Click the **Add Domain Names** button.
10. If the domain registration was successful for all the domain names listed in the text box, a banner will display the text "Successfully added domains". The registered domain names will be displayed in alphabetical order under the **+ Add** button.
11. If the registration was not successful for any of the domain names listed in the text box, a banner will display a list of domain names that failed qualified domain name validation along with their reasons for rejection. Any domain names that were successfully registered will be displayed in alphabetical order under the **+ Add** button.
- Note: You can re-enter the rejected domain names in the text area with the corrections applied.

### Set App Link in SDK

Pass your App Link to the `PayPalClient` constructor:

```kotlin
val payPalClient = PayPalClient(
this,
"<#CLIENT_AUTHORIZATION#>",
Uri.parse("https://demo-app.com/braintree-payments") // Merchant App Link
)
```
2 changes: 1 addition & 1 deletion v5_MIGRATION_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ before the `OnResume` method of your Activity or Fragment.
do not need to be instantiated in `OnCreate`.

The PayPal integration now requires an Android App link be configured to return to your app from the
PayPal flow.
PayPal flow. See the [App Link Setup Guide](APP_LINK_SETUP.md) for more information.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of linking to a new markdown file do we want to link to the dev docs for app switch? I know they are currently under the v4 section which we call out, but could update to the v5 links once the docs are updated.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seemed a little confusing to link directly to those since they reference app switch and app links are now required on Android for any PayPal flow, not just app switch. I think for the v5 dev docs we should have a separate page for app link setup that we can refer to from any of the pages (PayPal web or app switch)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, yeah didn't think about that! That's a good call to move it into it's own page when we do the v5 docs.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also like the idea of having this live in the Docs vs the repo when we start Android V5 docs!


```diff
class MyActivity : FragmentActivity() {
Expand Down
Loading