sumup / sumup-ios-url-scheme

URL scheme documentation and sample app for iOS
17 stars 5 forks source link

Calling SumUp from a PWA #10

Open robwatkiss opened 5 years ago

robwatkiss commented 5 years ago

The iOS (v12.1) SumUp app (v2.0.4) is being opened using a sumupmerchant://pay/1.0 link and works almost as expected when using the webapp in Safari however when the same URI is called from our WebApp installed as a PWA the SumUp app it throws an error. The error text and the test URI are included below.

(native popup) Server Error Something went wrong! Please try again.

(app popup) Connection Error We lost connection to the SumUp server

(URI) sumupmerchant://pay/1.0?affiliate-key=<affiliate-key>&app-id=com.company.basecamppos.test&amount=1.56&currency=CHF&title=Test%20Title&callbacksuccess=https%3A%2F%2Fpos.website.com%2F%23%2Fcallback%2Fpayment-success&callbackfail=https%3A%2F%2Fpos.website.com%2F%23%2Fcallback%2Fpayment-fail

The only difference here is that we are calling the link from a PWA not from Safari. We need to be able to run our webapp as a PWA as opposed to in Safari as it prevents the need to click 'open SumUp' every time and also helps us lock down the security of our POS devices.

mollidor commented 5 years ago

Hi @robwatkiss

My assumption is that installing your app as a PW will create a bundle identifier that is not whitelisted for your affiliate key. Please get in touch with integration@sumup.com so we can get you up and running.

Regards, Lukas

robwatkiss commented 5 years ago

Hi @mollidor

I understand why you have closed this issue but perhaps it's worth keeping it open until we can find a resolution? I very much doubt I'm going to be the last person to be frustrated by this issue! In the mean time I've sent a message to integration@ with some more details of our integration.

Cheers, Rob

mollidor commented 5 years ago

Sorry about that. Indeed!

steffanhalv commented 4 years ago

@robwatkiss Got any feedback?

phoebusryan commented 3 years ago

Is there a fix? I've got the same issue.

dnstufff commented 3 years ago
  1. Open your SumUp dashboard -> Profile -> Developers.
  2. Add your app bundle identifier at the provided field
  3. All Done.

Note for iOS and Expo: If using expo and your app runs in expo client, add host.exp.Exponent - the bundle id of iOS expo client. Android uses the new API, so it's fine if you add the app-id param.

gmwilhelm commented 3 years ago

I also have this problem. I did add the bundle id in the sumup dashboard and it is working fine for android. But on iOS i always get the connection error.

phoebusryan commented 3 years ago

@gmwilhelm Try add the App-IDs com.apple.mobilesafari and com.sumup.appswitch in the SumUp Dashboard.

o-zz-kx commented 3 years ago

@phoebusryan Thanks a lot man. You fixed my issue. Added the two App-IDs and now it works.

phoebusryan commented 3 years ago

@okx your welcome :)

ifixr commented 2 years ago

com.sumup.appswitch is what makes the difference.

kuzmadomen commented 1 year ago

Thank you that fixed the problem.

Bart-Westenenk commented 6 months ago

Still having the same problem. Even though I have added both the payment switch bundle id and mobile safari. Any further clues?

phoebusryan commented 6 months ago

Still having the same problem. Even though I have added both the payment switch bundle id and mobile safari. Any further clues?

That should really work.. or are you using android?

Bart-Westenenk commented 6 months ago

I am for sure using IOS. I have tested it only with my own device (Iphone 13 pro) as I dont have any other available. On Android it worked for multiple different devices.

phoebusryan commented 5 months ago

Whats your URI? Android and iOS uses different URIs for this scheme

christianRusso18 commented 3 months ago

Hello could someone help me ? I have this same problem but can't find how to solve it.

phoebusryan commented 3 months ago

@christianRusso18 Try add the App-IDs com.apple.mobilesafari and com.sumup.appswitch in the SumUp Dashboard. Super simple