-
Notifications
You must be signed in to change notification settings - Fork 235
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
Move Shipping Callback URL to PayPalCheckoutRequest
#1200
Move Shipping Callback URL to PayPalCheckoutRequest
#1200
Conversation
shippingCallbackUrl?.let { | ||
if (it.toString().isNotEmpty()) parameters.put(SHIPPING_CALLBACK_URL_KEY, 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.
Should this logic move into PayPalCheckoutRequest
?
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.
Logic is already there
braintree_android/PayPal/src/main/java/com/braintreepayments/api/paypal/PayPalCheckoutRequest.kt
Line 113 in 388c2d6
shippingCallbackUrl?.let { |
My mistake was approaching this change differently in iOS. In iOS, I created the feature branch from scratch, while here, I only removed shippingCallbackUrl
from the Vault flow, keeping the changes from the PR previously merged into this feature branch.
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.
Ah gotcha, no worries! Thanks for pointing out where it was since the approach was slightly different.
@@ -301,57 +299,4 @@ public void createRequestBody_sets_userPhoneNumber_when_not_null() throws JSONEx | |||
|
|||
assertTrue(requestBody.contains("\"phone_number\":{\"country_code\":\"1\",\"national_number\":\"1231231234\"}")); | |||
} | |||
|
|||
@Test | |||
public void createRequestBody_sets_shippingCallbackUri_when_not_null() throws JSONException { |
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.
Are we able to add these tests to PayPalCheckoutRequestUnitTest
?
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, there are already 3 unit tests that cover this in PayPalCheckoutRequestUnitTest
Line 162 in 388c2d6
public void createRequestBody_sets_shippingCallbackUri_when_not_null() throws JSONException { |
Summary of changes
shippingCallbackUrl
parameter toPayPalCheckoutRequest
to limit it to checkout flows. Shipping callbacks should only be available for PayPal checkout flows.Checklist
Authors