sumup / sumup-ios-url-scheme

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

Fail Callback URL Formatted Incorrectly #9

Open robwatkiss opened 5 years ago

robwatkiss commented 5 years ago

When the callbackfail URL is called it is incorrectly formatted and places the query parameters before other parts of the URL needed for some web apps using /# based routing.

Expected Redirect: https://some.website.com/#/callback/payment-fail?smpt-status=failed Actual Redirect: https://some.website.com/?smpt-status=failed#/callback/payment-fail

mollidor commented 5 years ago

Hi @robwatkiss

Nice catch and thanks for debugging this. Can you provide an example URL you call (including the callback you would expect) so I can add it to our tests?

Best, Lukas

robwatkiss commented 5 years ago

Hi @mollidor - here's that example for you:

sumupmerchant://pay/1.0?affiliate-key=00000000-0000-0000-0000-000000000000&app-id=com.company.pointofsale.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

mollidor commented 5 years ago

Thanks a lot. So you would expect us to open https://pos.website.com/#/callback/payment-fail?smpt-status=failed but we do open https://pos.website.com/?smpt-status=failed#/callback/payment-fail

Is that what you observe?

robwatkiss commented 5 years ago

That's correct, yep.