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
Add PayPal instructions to README #4
Conversation
- Steps for setting up PayPal with PopupBridge iOS - Create popupbridge-paypaldatacollector-ios.md - Code snippets for data collector integration
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems fine to me. I don't have much context on the code snippets though, will want to get an iOS dev to look at those.
README.md
Outdated
Using PayPal in a WebView | ||
------------------------- | ||
|
||
WebView-based checkout flows can accept PayPal with PopupBridge the Braintree JS SDK. For the authentication flow, PayPal requires a popup window—which can be simulated with PopupBridge. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
WebView-based checkout flows can accept PayPal with PopupBridge and the Braintree JS SDK.
and I might just omit the second sentence.
README.md
Outdated
|
||
### Setup | ||
1. Create a web-based checkout that accepts PayPal using Braintree JS v3.9.0 or higher | ||
2. Show a loading indicator |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might want to mention when the loading indicator should be shown and hidden, e.g.
Show a loading indicator when the PayPal button is clicked
- Hide the loading indicator in the PayPal tokenize completion callback
README.md
Outdated
4. Integrate the PopupBridge library | ||
5. Collect device data | ||
- To help detect fraudulent activity, collect device data before performing PayPal transactions. This is similar to collecting device data with our [native iOS SDK](https://developers.braintreepayments.com/guides/paypal/vault/ios/v4) with a few differences: | ||
1. Rather than the entire data collector, you can add just PayPalDataCollector to your app: `pod 'Braintree/PayPalDataCollector'` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rather than importing the entire data collector
@@ -0,0 +1,48 @@ | |||
## One time payment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One-time payments
@@ -0,0 +1,48 @@ | |||
## One time payment | |||
|
|||
Implement the method that receives the popup URL and use this sample code to parse the `clientMetadataID`: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a bit ambiguous what the client metadata ID is, what merchants should do with the client metadata ID, what the result
is, and how that relates to the device data
that our merchants are already familiar with.
window.popupBridge.sendMessage('requestDeviceData'); | ||
``` | ||
|
||
If you have questions, create an Issue for this GitHub project. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+If you have questions, create an issue for this GitHub project.
@skunkworks Could you have another look at this? Thanks! |
README.md
Outdated
@@ -36,7 +36,7 @@ Quick Start | |||
- Click **[+]** to add a new URL type | |||
- Under **URL Schemes**, enter a unique URL scheme, e.g. `com.my-app.popupbridge` | |||
|
|||
2. In your application delegate, set up PopupBridge with the URL scheme: | |||
1. In your application delegate, set up PopupBridge with the URL scheme: | |||
|
|||
```objectivec |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code block indentation needs to be lined up one space over
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
popupbridge-paypaldatacollector-ios.md