-
Notifications
You must be signed in to change notification settings - Fork 27
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 Option to Select Merchant Integration Credential in Demo App #168
Conversation
Signed-off-by: Steven Shropshire <steven.shropshire@paypal.com>
@@ -0,0 +1,21 @@ | |||
import Foundation | |||
|
|||
enum MerchantIntegration { |
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.
Will we add a UI option to toggle this setting in the future?
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.
Yes, we are still figuring out the UI in demo app that would help us to test different scenarios.
@@ -37,18 +39,22 @@ class BaseViewModel: ObservableObject, PayPalWebCheckoutDelegate, CardDelegate { | |||
} | |||
} | |||
|
|||
func createOrder(amount: String?) async -> String? { | |||
func createOrder(amount: String?, selectedMerchantIntegration: MerchantIntegration) async -> String? { | |||
// might need to pass in payee as payee object or as auth header |
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.
Is this comment for a specific merchant integration type?
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.
Yes, Steven and I talked about having different parameters for creating order for different integration patterns. I wanted to leave a note there to remember that's the place I'd pass in the optional parameters in the future.
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.
I would just add TODO: -
syntax to it so we don't forget about it!
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.
➕ on adding a TODO
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.
done in commit db28708
@@ -8,6 +8,7 @@ import PayPalCheckout | |||
|
|||
/// This class is used to share the orderID across shared views, update the text of `bottomStatusLabel` in our `FeatureBaseViewController` | |||
/// as well as share the logic of `processOrder` across our duplicate (SwiftUI and UIKit) card views. | |||
|
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.
We don't need this added line break
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.
fixed in commit db28708
@@ -37,18 +39,22 @@ class BaseViewModel: ObservableObject, PayPalWebCheckoutDelegate, CardDelegate { | |||
} | |||
} | |||
|
|||
func createOrder(amount: String?) async -> String? { | |||
func createOrder(amount: String?, selectedMerchantIntegration: MerchantIntegration) async -> String? { | |||
// might need to pass in payee as payee object or as auth header |
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.
➕ on adding a TODO
Summary of changes
selectedMerchantIntegration
property inBaseViewModel
andPayPalViewModel
DemoMerchantAPI
functions to addselectedMerchantIntegration
into url path for request to merchant serverprocessOrder
functions not used anywhereclientID
inbaseViewModel
since user can select different credentials in single run of the appChecklist
- [ ] Added a changelog entryAuthors