paypal / here-sideloader-api-samples

Sideloader API samples that enable to integrate PayPal Here into other apps
Other
24 stars 32 forks source link

IOS app returning Invoice ID for declined payments #50

Open REDDFS opened 8 years ago

REDDFS commented 8 years ago

Version 2.6.11 of the Paypal Here app on IOS is returning a non empty Invoice ID in the return url for declined payments. Therefore there is no way to determine if a payment was successful or not purely from the return url.

glaidler commented 7 years ago

We are getting the same thing. How can we determine a declined payment?

REDDFS commented 7 years ago

@glaidler @Pivovar63 Apologies for keeping this open, I actually found the solution to this after re-reading the docs. If a payment is declined or cancelled the URL actually contains Type=UNKNOWN.

from the docs : "However, if a payment is cancelled, the response of the PayPal Here app would be similar to the following:

YourAppReturnURLRoot://takePayment?Type=UNKNOWN"

I updated my app to check for this instead of just an empty invoice id and it now functions as expected.

Pivovar63 commented 7 years ago

@REDDFS I have Type=CHIP and not empty InvoiceId if payment declined. Type is not actually UNKNOWN. This is a bug.

REDDFS commented 7 years ago

@Pivovar63 That's interesting, their documentation definitely seems to suggest that UNKNOWN should be the type for cancelled and declined payments.

Is there anyway you could tell me the steps to replicate the response you're seeing? (I'll re-open this issue and hope we can get an official response on the expected return for declined payments)

Pivovar63 commented 7 years ago

@REDDFS I make a request like this: paypalhere://takePayment?accepted=cash%2Ccard%2Cpaypal%2Cinvoice%2Ccheck&returnUrl=<my_return_url_scheme_and_host>%3FType%3D%7BType%7D%26InvoiceId%3D%7BInvoiceId%7D&invoice=<invoice_info>&step=choosePayment"

Then I'm trying to pay with chip credit card in my card reader, enter PIN, but transaction is cancelled (I don't know why). And here what I have in the response: <my_return_url_scheme_and_host>?Type=CHIP&InvoiceId=<invoice_id>

REDDFS commented 7 years ago

@Pivovar63 Thanks for that (your request is pretty much the same as mine so I can only attribute the difference in behaviour to OS and app-version), could I also check what OS you're using (IOS or android) and what version of the app you're using?

Pivovar63 commented 7 years ago

@REDDFS Of course. I use iOS and latest PPH application v2.8.4

glaidler commented 7 years ago

This behaviour has reverted to being broken. Declined payments now have a Type param of "CHIP". Using iOS and latest version of app.

joshucar commented 7 years ago

Reporting in that I'm still seeing this issue, exactly as described above. Any update?