adyen-ios icon indicating copy to clipboard operation
adyen-ios copied to clipboard

[NEED ASSIST] 3D Secure 2 redirect

Open Mihailo94 opened this issue 7 months ago • 8 comments

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 IMG_3297

Mihailo94 avatar Jan 09 '24 14:01 Mihailo94

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 avatar Jan 09 '24 15:01 erenbesel

@erenbesel Thank you for clarification.

Mihailo94 avatar Jan 10 '24 10:01 Mihailo94

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?

Mihailo94 avatar Jan 10 '24 13:01 Mihailo94

Hi @erenbesel, could you please help me with this?

Mihailo94 avatar Jan 11 '24 10:01 Mihailo94

Hi @erenbesel, any chance to help me with this?

Mihailo94 avatar Jan 12 '24 11:01 Mihailo94

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.

erenbesel avatar Jan 12 '24 12:01 erenbesel

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)

Mihailo94 avatar Jan 12 '24 13:01 Mihailo94

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? Screenshot 2024-01-19 at 12 50 45

Mihailo94 avatar Jan 19 '24 11:01 Mihailo94

Feel free to create a new ticket for anything additional or re-open if your issue is not solved.

goergisn avatar May 14 '24 14:05 goergisn