-
Notifications
You must be signed in to change notification settings - Fork 79
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
Pass hasUserLocationConsent to DataCollector #472
Pass hasUserLocationConsent to DataCollector #472
Conversation
} | ||
// TODO: set hasUserLocationConsent on paypalRequest | ||
dropInRequest.hasUserLocationConsent(); |
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.
hasUserLocationConsent
is set on the PayPalRequest
directly. No need to set it here.
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 the merchant has set hasUserLocationConsent
on their dropInRequest
already - can we pass that value in when creating the default PayPalVaultRequest
?
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.
yep, great suggestion! i'll update this.
unrelated question - if this function gets called with a null PayPalRequest
and a default one is created, are there scenarios where payPalClient.tokenizePayPalAccount()
will ever succeed? are there required fields on the request?
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.
Before this change, there were no required fields for a PayPalVaultRequest
(checkout request requires amount). So if a merchant doesn't pass a custom PayPalRequest
to their DropInRequest
, drop-ins default behavior is the PayPal billing agreement/vault flow - it should succeed when we create the default vault request.
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 was seeing some errors thrown when returnUrl
is not set on the request. I'm not sure if this was just an issue in the PayPal Native module. I'll do some testing outside the scope of this PR/story.
I just pushed the change to pass hasUserLocationConsent
from the dropInRequest
.
Is there going to be a separate PR to pass this flag to all other instances of collectDeviceData throughout drop-in? |
I was intending this to be the final PR for drop-in. I wasn't able to find any other instances where we'd need to pass the flag when searching for "collectDeviceData" in the repo. Are there other callsites that I'm currently missing? |
Summary of changes
hasUserLocationConsent
paramhasUserLocationConsent
toDataCollector.collectDeviceData()
Checklist
Authors