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

Can't select payment method #160

Closed
PeterDolenec opened this issue Apr 25, 2020 · 7 comments
Closed

Can't select payment method #160

PeterDolenec opened this issue Apr 25, 2020 · 7 comments
Labels

Comments

@PeterDolenec
Copy link

Hi,
I am using the dropInComponent. After I receive payment methods from server I present the dropInComponent viewController. To here, everything works fine, but when I try to select one of the options nothing happens. I tried to debug the problem and I found out that the function "tableView didSelectRowAt indexPath" in class "ListViewController" is called and it triggers selection handler on selected component. But then in class "PaymentMethodListComponent" where selection handler should trigger delegate's function "didSelect" (in line 46), the delegate is nil, so the function is not triggered. Also the close button is not working. The problem is clearly seen in the attached gif (you can see the press event and that it doesn't open the next screen).

Expected behavior
It should display form for selected credit card.

Screenshots
Adyen

Smartphone

  • Device: iPhoneX
  • OS: iOS 13.4.1
  • iOS SDK Version 3.5.0
  • Xcode version 11.4
@mohammedDehairy
Copy link
Contributor

Hi @PeterDolenec ,

Thanks for reaching out.

Are you retaining the DropInComponent instance strongly?, the only reason I can think of for this behavior is that the DropInComponent instance is not retained, so it gets deallocated, since the DropInComponent instance is set as the delegate for the PaymentMethodListComponent, and PaymentMethodListComponent doesn't retain it to prevent a retain cycle.

@PeterDolenec
Copy link
Author

Hi @mohammedDehairy

Thanks for quick reply.

You were right. Setting strong retention to DropInComponent solved the problem. A rookie mistake. 🤦‍♂️

Thanks again.

@yuchuanxing
Copy link

I'm retaining the DropInComponent instance strongly, but when I click the Payment method Icon or the area
except the UIStackView of the ListCell, it works,

@descorp
Copy link
Contributor

descorp commented Nov 11, 2021

Hey @yuchuanxing

I am not sure that I understand your message correctly.
Could you provide more details and attach a Video / GIF ?

UPD

I assume the same issue is addressed in #705 ?

@Adyen Adyen deleted a comment from alinant87 Nov 16, 2021
@ronakcc
Copy link

ronakcc commented Feb 22, 2022

Hi @mohammedDehairy

Thanks for quick reply.

You were right. Setting strong retention to DropInComponent solved the problem. A rookie mistake. 🤦‍♂️

Thanks again.

How to set DropInComponent as strong retention?

Thanks
S1

@mohammedDehairy
Copy link
Contributor

Hi @ronakcc ,

you need to retain the dropInComponent instance to a property in the same class for example, i.e self.dropInComponent = DropInComponent()

Mohamed

@ronakcc
Copy link

ronakcc commented Feb 23, 2022

Thanks for quick reply

@goergisn goergisn unpinned this issue Nov 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants