我目前无法使用iOS(Swift)授权SquareReaserSDK。
成功获取移动身份验证令牌并将其提供给以下对象后,首次调用该令牌便没有回调。 if语句永远不会触发。
冗余调用会导致 authorization_already_in_progress 错误(if语句被触发)。
SQRDReaderSDK.shared.authorize(withCode: mobileAuthToken) { location, error in
if let authError = error {
print("Authorize SquareReaderSDK", authError.localizedDescription)
} else {
print("Authorize SquareReaderSDK", location)
Defaults[.establishment]?.squareMobileAuthToken = mobileAuthToken as! String
}
}
authorize()端点参考: https://developer.squareup.com/docs/api/reader/ios/Classes/SQRDReaderSDK.html#/Authorization
冗余呼叫导致:
vvvvv SQUARE ERROR vvvvv
ERROR: Something went wrong. Please contact the developer of this application and provide them with this error code: authorization_already_in_progress
DEBUG CODE: authorization_already_in_progress
DEBUG MESSAGE: Authorization is already in progress. Please wait for SQRDReaderSDK.shared.authorize() to complete.
^^^^^ SQUARE ERROR ^^^^^
尝试授权设备时,在任何时候尝试显示checkoutController时都会出现以下错误:
Checkout Failed:
This device is not currently authorized to accept payments with Square.