paypal / paypal-here-sdk-ios-distribution

Add credit card (tap, insert, swipe & key-in) capabilities to your iOS app
Other
81 stars 91 forks source link

Please Remove Card modal not dismissing #131

Closed joeynelson42 closed 6 years ago

joeynelson42 commented 6 years ago

When using processPaymentUsingUI a transaction with a chip reader in swift, the next screen that shows up is frozen and doesn't allow me to do anything. I am returning the correct navigation controller and everything. Is there a solution for this? img_0355

jnwagstaff commented 6 years ago

I have the same problem when trying to call processPaymentUsingUI within a swift file.

ppmtscory commented 6 years ago

I'm not able to reproduce the same behavior in my Swift sample app so a couple of questions:

  1. Do you see the first modal of 'Do Not Remove Card' messaging?
  2. Are you able to sign at all? It seems weird that the remove card message would be on top of an empty signature screen.
  3. Are you sure that the window/view you're currently acting on is at the top of your window/view hierarchy? The SDK UI will act funny if it's trying to run on a view that's hidden
  4. Are you calling processPaymentUsingUI from within the userDidSelectPaymentOption function?
joeynelson42 commented 6 years ago

I think #3 might be our issue, we have a somewhat complex UI structure. I'll let you know how things go! Thanks!

jnwagstaff commented 6 years ago

So before I had a tab bar hidden in my app and even when not hiding it I am getting the same problem. Is there any way you could send me your swift sample app? Whenever a signature is required it shows the signature view with the modal already on top of it and you can't navigate anywhere with it.

jnwagstaff commented 6 years ago

Also this only happens when a signature is required could I be missing another element for that?

ppmtscory commented 6 years ago

As long as the SDK UI is being presented from the top view of your hierarchy, with nothing else in the way, it should be fine. I can share my very simple sample, sure, but I need to clean it up first because there's a done of random commented code. I'll see if I can get some time to do that today sometime.

ppmtscory commented 6 years ago

@jnwagstaff attached is a zip of my very simple sample app. It was an app put together through an online Swift course and not all of the functionality of the app itself works (the pictures don't xfer in the segue because I broke it somehow) but the PayPal Here portion definitely works just fine. Also, don't make fun of my coding skills - I'm a rookie yet. :)

The merchant loads on the first page, invoice is created when the second page loads, and you click the Buy Now link at the bottom of the second page to activate the reader to show payment options.

Algorhythm.zip

jnwagstaff commented 6 years ago

Thanks so much! I was able to solve my problem

ppmtscory commented 6 years ago

Thanks for the update @jnwagstaff.

@joeynelson42 were you able to get your UI all configured correctly?

joeynelson42 commented 6 years ago

I did! Thanks @ppmtscory!