Closed scannillo closed 1 year ago
This GitHub Issue (https://github.com/braintree/braintree-ios-drop-in/issues/383) surfaced a case where we are returning back (nil, nil) to the merchant when they call the mostRecentPaymentMethod() function.
(nil, nil)
mostRecentPaymentMethod()
Apparently, our tests were asserting/expecting to return (nil, nil) when no recent payment methods were found). I think this is weird and confusing behavior.
This PR treats this (nil, nil) case as a bug and fixes it by returning a proper merchant-facing error in the case of an empty vault list returned from the Gateway.
BTDropInErrorTypeNoRecentPaymentMethods
Return error when no payment method nonces are returned from gateway, but the API call 200s
@scannillo
Bitcode CI failure addressed here.
Just merged this into master!
Background
This GitHub Issue (https://github.com/braintree/braintree-ios-drop-in/issues/383) surfaced a case where we are returning back
(nil, nil)
to the merchant when they call themostRecentPaymentMethod()
function.Apparently, our tests were asserting/expecting to return
(nil, nil)
when no recent payment methods were found). I think this is weird and confusing behavior.This PR treats this
(nil, nil)
case as a bug and fixes it by returning a proper merchant-facing error in the case of an empty vault list returned from the Gateway.Summary
BTDropInErrorTypeNoRecentPaymentMethods
error codeReturn error when no payment method nonces are returned from gateway, but the API call 200s
Checklist
Authors
@scannillo