-
Notifications
You must be signed in to change notification settings - Fork 295
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
Expose isDeviceToken
on BTApplePayCardNonce
#1516
Conversation
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.
👏 Thanks for also including details on testing / seeing it working E2E
❓ Actually, is the We will have to decide what value to use if there is NONE returned back from API - either true (is DPAN) or nil. |
I believe the value is coming from the SDK. I'm not sure if I exposed the key properly for the value to come from API... |
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.
LGTM!!
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.
Couple of very minor comments but otherwise looks great!
CHANGELOG.md
Outdated
@@ -1,5 +1,9 @@ | |||
# Braintree iOS SDK Release Notes | |||
|
|||
## unreleased | |||
* BraintreeApplePay | |||
* Add BTApplePayCardNonce.isDeviceToken for MPAN identification |
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.
* Add BTApplePayCardNonce.isDeviceToken for MPAN identification | |
* Add `BTApplePayCardNonce.isDeviceToken` for MPAN identification |
let isDeviceToken = json["details"]["isDeviceToken"].asBool() ?? true | ||
|
||
self.isDeviceToken = isDeviceToken |
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 think we just extract the properties above because it'd make the super init a mess. Here I think we can do:
let isDeviceToken = json["details"]["isDeviceToken"].asBool() ?? true | |
self.isDeviceToken = isDeviceToken | |
self.isDeviceToken = json["details"]["isDeviceToken"].asBool() ?? true |
Great thank you! |
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.
lgtm! 🚀
With this PR, Merchants will have the ability to see if their ApplePay payment was tokenized as an MPAN or DPAN.
Summary of changes
isDeviceToken
false
== DPANtrue
== MPANChecklist
Authors