Skip to content
This repository has been archived by the owner on Jul 20, 2020. It is now read-only.

IOS app returning Invoice ID for declined payments #50

Open
REDDFS opened this issue Nov 16, 2016 · 9 comments
Open

IOS app returning Invoice ID for declined payments #50

REDDFS opened this issue Nov 16, 2016 · 9 comments

Comments

@REDDFS
Copy link

REDDFS commented Nov 16, 2016

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
Copy link

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

@REDDFS
Copy link
Author

REDDFS commented Jun 23, 2017

@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.

@REDDFS REDDFS closed this as completed Jun 23, 2017
@Pivovar63
Copy link

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

@REDDFS
Copy link
Author

REDDFS commented Jun 30, 2017

@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)

@REDDFS REDDFS reopened this Jun 30, 2017
@Pivovar63
Copy link

@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
Copy link
Author

REDDFS commented Jun 30, 2017

@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
Copy link

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

@glaidler
Copy link

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

@joshucar
Copy link

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants