diff --git a/CHANGELOG.md b/CHANGELOG.md index 0b3ea8e46..16de52ede 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ ## unreleased * BraintreeApplePay - * Add `isDeviceToken` to POST `v1/payment_methods/apple_payment_tokens` + * Add `BTApplePayCardNonce.isDeviceToken` for MPAN identification ## 6.28.0 (2025-02-05) * BraintreeVenmo diff --git a/Sources/BraintreeApplePay/BTApplePayCardNonce.swift b/Sources/BraintreeApplePay/BTApplePayCardNonce.swift index d5e16c81e..f20d030c2 100644 --- a/Sources/BraintreeApplePay/BTApplePayCardNonce.swift +++ b/Sources/BraintreeApplePay/BTApplePayCardNonce.swift @@ -10,7 +10,7 @@ import BraintreeCore /// The BIN data for the card number associated with this nonce. public let binData: BTBinData - /// This Boolean indicates whether this tokenized card is a device-specific account number (DPAN) or merchant/cloud token (MPAN). + /// This Boolean indicates whether this tokenized card is a device-specific account number (DPAN) or merchant/cloud token (MPAN). Available on iOS 16+. /// If `isDeviceToken` is `false`, then token type is MPAN public var isDeviceToken: Bool @@ -19,9 +19,8 @@ import BraintreeCore let cardType = json["details"]["cardType"].asString() ?? "ApplePayCard" let isDefault = json["default"].isTrue - let isDeviceToken = json["details"]["isDeviceToken"].asBool() ?? true - self.isDeviceToken = isDeviceToken + self.isDeviceToken = json["details"]["isDeviceToken"].asBool() ?? true binData = BTBinData(json: json["binData"]) super.init(nonce: nonce, type: cardType, isDefault: isDefault)