Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement isPending() #11

Open
judgej opened this issue Jul 9, 2020 · 1 comment
Open

Implement isPending() #11

judgej opened this issue Jul 9, 2020 · 1 comment
Assignees
Labels
bug Something isn't working enhancement New feature or request

Comments

@judgej
Copy link
Member

judgej commented Jul 9, 2020

Some mPAY24 responses must be interpreted as pending. At the moment they are not caught.

According to the mpay24 documentation, there are those values possible:
https://docs.mpay24.com/docs/transaction-overview#transaction-state

  • Capture : isSuccessful() -> true (for captures)
  • Failed : isSuccessful(), isCancelled(), isPending() -> false
  • Authorization : isSuccessful() -> true (for authorizations)
  • Credit : Can there be an isRefund() method returning true for that case?
  • Cancelled : isCancelled() -> true
  • Redirect : isPending() -> true
  • Pending : isPending() -> true
  • Waiting for confirmation : isPending() -> true
  • Chargeback : Maybe also isRefund()?
  • Withdraw : isSuccessful() -> true

The \Omnipay\Common\Message\NotificationInterface defines STATUS_PENDING
as additional status for $omniRequest->getTransactionStatus() when
isSuccessful() returns true.

@judgej judgej added bug Something isn't working enhancement New feature or request labels Jul 9, 2020
@judgej judgej self-assigned this Jul 9, 2020
@judgej
Copy link
Member Author

judgej commented Jul 9, 2020

The main issue is that there is no one place to find a list of all transaction states. The table linked above is about a third of them, and the field shown is what is displayed in the administration screens and not what is sent in the API. For exampe Credit is sent as CREDITED. They are different values and could actually mean different things, possibly depending on the context.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant