academe / Omnipay-Wirecard

Wirecard payment gateway driver for the Omnipay
GNU Lesser General Public License v3.0
1 stars 0 forks source link

A paymentState of PENDING should be treated as NOT successful #9

Closed judgej closed 7 years ago

judgej commented 7 years ago

The accept notification handler and complete* messages return true from isSuccessful() when the paymentState is PENDING. It should return false because the transaction is not yet complete.

judgej commented 7 years ago

Release under release 2.1.0

judgej commented 7 years ago

Just a bit of history: this SO question concerns the PayPal driver returning true for a pending transaction. Adrian seems to say (quite some time ago, it may be added) that this is how it should work. Later issues raised on OmniPay say the opposite (that you cannot consider the transaction finally complete and successful until you get the final success indicator sent).

https://stackoverflow.com/questions/20848860/how-do-i-use-omnipay-to-check-if-its-a-pending-payment-or-not

Most people recommend adding a isPending() method, which we have here, even though that is not yet in Omnipay core.

The Omipay documentation needs to be updated to make it clear how PENDING should be handled, so both driver developers and driver users know how they should be handling this situation:

https://omnipay.thephpleague.com/api/responses/