Skip to content

Commit

Permalink
Add Payer Email to Base Parameters if not empty (#1497)
Browse files Browse the repository at this point in the history
* Add isEmpty validation to add payer_email when it exists

* Update CHANGELOG
  • Loading branch information
richherrera authored Jan 13, 2025
1 parent 652e696 commit 226e00c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Braintree iOS SDK Release Notes

## unreleased
* BraintreePayPal
* Fix bug to ensure that `BTPayPalVaultRequest.userAuthenticationEmail` is not sent as an empty string

## 6.25.0 (2024-12-11)
* BraintreePayPal
* Add `BTPayPalRequest.userPhoneNumber` optional property
Expand Down
2 changes: 1 addition & 1 deletion Sources/BraintreePayPal/BTPayPalVaultRequest.swift
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ import BraintreeCore
) -> [String: Any] {
var baseParameters = super.parameters(with: configuration)

if let userAuthenticationEmail {
if let userAuthenticationEmail, !userAuthenticationEmail.isEmpty {
baseParameters["payer_email"] = userAuthenticationEmail
}

Expand Down

0 comments on commit 226e00c

Please sign in to comment.