-
Notifications
You must be signed in to change notification settings - Fork 241
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
251073e
commit a364c93
Showing
3 changed files
with
27 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,6 +7,7 @@ | |
import com.braintreepayments.api.paypal.PayPalBillingInterval; | ||
import com.braintreepayments.api.paypal.PayPalBillingPricing; | ||
import com.braintreepayments.api.paypal.PayPalCheckoutRequest; | ||
import com.braintreepayments.api.paypal.PayPalContactInformation; | ||
import com.braintreepayments.api.paypal.PayPalLandingPageType; | ||
import com.braintreepayments.api.paypal.PayPalPaymentIntent; | ||
import com.braintreepayments.api.paypal.PayPalPaymentUserAction; | ||
|
@@ -111,7 +112,8 @@ public static PayPalCheckoutRequest createPayPalCheckoutRequest( | |
String amount, | ||
String buyerEmailAddress, | ||
String buyerPhoneCountryCode, | ||
String buyerPhoneNationalNumber | ||
String buyerPhoneNationalNumber, | ||
Boolean isContactInformationEnabled | ||
) { | ||
PayPalCheckoutRequest request = new PayPalCheckoutRequest(amount, true); | ||
|
||
|
@@ -158,6 +160,10 @@ public static PayPalCheckoutRequest createPayPalCheckoutRequest( | |
request.setShippingAddressOverride(shippingAddress); | ||
} | ||
|
||
if (isContactInformationEnabled) { | ||
request.setContactInformation(new PayPalContactInformation("[email protected]", new PayPalPhoneNumber("1", "1234567890"))); | ||
} | ||
|
||
return request; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters