adyen-ios
adyen-ios copied to clipboard
[NEED ASSIST] 3D Secure 2 redirect
Describe the challenge Hi, I'm trying to implement redirect component. I'm getting CVC / CVV error when I enter card details in Adyen component. Also, as you can see card numbers are not grouped together in 4 rows. Any suggestions what it could be?
Documentation update (optional) I found test card here
Screenshots
Hello @Mihailo94
That looks like an American Express card number which needs 4 digits for CVV (the link should be fixed but try 7373). Also, Amex card numbers are formatted 4-6-6 instead of 4-4-4-4.
You can use more test cards on our test cards page!
@erenbesel Thank you for clarification.
Hi @erenbesel, I closed this issue but I stuck on next step for redirect component so I would ask you for help here.
So, RedirectComponent not showing to me. What I did: I created and persist instance of RedirectComponent on the same way as I did for AdyenActionComponent. Here is my code:
internal lazy var redirectComponent: RedirectComponent = {
let component = RedirectComponent(context: adyenContext)
component.delegate = self
component.presentationDelegate = self
return component
}()
Then decode data and handle action:
action = try JSONDecoder().decode(RedirectAction.self, from: data)
self?.redirectComponent.handle(action)
As I understand RedirectComponent should be opened but nothing happened in my case.
Do you know what could be a problem?
Hi @erenbesel, could you please help me with this?
Hi @erenbesel, any chance to help me with this?
Hey @Mihailo94 , although it's not possible to figure out from a code piece, my guess would be the action object may not be of type RedirectAction
. You need to create an AdyenActionComponent
and call handle(action...
function on this object instead of the redirect component (you can see these usages in the demo app).
I suggest checking our docs and the demo app in this repo for more details.
You can also contact our support team from your Customer Area.
Hi @erenbesel, thank you for your response I tried what you suggested before I asked for help but it doesn't work for me.
About your assumption that action object is not type of RedirectAction
I would say that I use correct object.
var data = Data()
var action: RedirectAction?
do {
data = try JSONSerialization.data(withJSONObject: actionData.toJSON() as Any, options:[])
action = try JSONDecoder().decode(RedirectAction.self, from: data)
} catch {
log.debug("Error during parsing: \(error.localizedDescription)")
}
guard let action = action else { return }
self?.redirectComponent.handle(action)
Hi @erenbesel I contacted support team and waiting for response. Also one thing as you mention to try with Demo app. When I use Demo app, enter the data in CardComponent and tap on pay button I get error about shopperInteraction field. Do do know what it could be?
Feel free to create a new ticket for anything additional or re-open if your issue is not solved.