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
Inject siteId #13
Inject siteId #13
Conversation
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.
@momo-ozawa works as described!
I'd just change siteId
to be optional, given it's not a mandatory field.
Source/MobilePayKit.swift
Outdated
|
||
public init(oAuthToken: String, bundleId: String?) { | ||
public init(oAuthToken: String, bundleId: String?, siteId: String) { |
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.
siteId
is optional, I think we can make it optional and assign a default nil value, wdyt?
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! 033e9f5
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.
There's a build error after this change, you need to update the remaining places too. :D
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.
Oof! Fixed... updated site_id
to Int?
as well, per D65254-code
The site_id type is integer
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.
Backend is currently failing if no site_id
is given, this will be addressed in a diff.
Description
This PR injects the site id into MobilePayKit.
Notes
Apply patch to test the new createOrders endpoint (D65254-code)
For sandbox info, follow instructions in these posts:
How to test
Running tests
Running the app
ProductListViewModel
MobilePay-Apple/Example/iOS/MobilePayKit-iOS/ProductListViewModel.swift
Lines 31 to 35 in 03400b3