Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[NEED ASSIST] 3D Secure 2 redirect #1502

Open
Mihailo94 opened this issue Jan 9, 2024 · 8 comments
Open

[NEED ASSIST] 3D Secure 2 redirect #1502

Mihailo94 opened this issue Jan 9, 2024 · 8 comments

Comments

@Mihailo94
Copy link

Mihailo94 commented Jan 9, 2024

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

@erenbesel
Copy link
Contributor

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!

@Mihailo94
Copy link
Author

@erenbesel Thank you for clarification.

@Mihailo94
Copy link
Author

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 Mihailo94 reopened this Jan 11, 2024
@Mihailo94
Copy link
Author

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

@Mihailo94
Copy link
Author

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

@erenbesel
Copy link
Contributor

erenbesel commented Jan 12, 2024

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.

@Mihailo94
Copy link
Author

Mihailo94 commented Jan 12, 2024

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
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants