Closed haveeehr closed 4 months ago
@glyuck @andysg012 @javiersuweijie
I apologize for the direct mention. I understand if supporting async/await may not be your current priority, but could you please take a look at this so we can utilize withCheckedContinuation to use Xendit with async/await.
Thanks.
@adhiartaputra @duong-xendit Are there any plans to fix this? I think this is logically wrong. We should not continue to perform any subsequent operations after getting an error.
This problem will cause the user to still perform 3DS verification after seeing the error page. This can cause confusion for users.
I don't even remember working on this SDK. 🤦♂️ Created a pull request to fix the issue. Nothing else I can do)
@glyuck Thanks, hope it can be merged.
In the file XDTCards.swift
there is the function createToken, where there is a validation to check whether the card is valid or not. When the card is invalid it would throw a XenditError However, when we know that the card is invalid why would we still proceed to the API call? which would certainly return API_VALIDATION_ERROR
I suggest to change the code from
For context When we are usingasync await / withCheckedContinuation, It has to return continuation only one time
If it returns more than once it will shown an error:
For reference, changing it to something like the createAuthentication would work better
What's your take on this?