Problem/Motivation

The current status mapping does not fully align with Paystack’s official transaction status documentation. In particular, failed transactions are mapped to 'refunded', which is not accurate—failed payments should be mapped to 'authorization_voided'.

Proposed resolution

Updated mapping:

  • 'success' → 'completed'
  • 'abandoned' → 'authorization_voided'
  • 'failed' → 'authorization_voided'
  • 'ongoing', 'pending', 'processing', 'queued' → 'pending'
  • 'reversed' → 'refunded'

This update ensures that order states in Drupal Commerce correctly reflect the true status of Paystack transactions, improving reliability and user experience.

I am creating a merge request for the fix.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

chike created an issue. See original summary.

chike’s picture

Status: Active » Needs review
i-trokhanenko’s picture

Status: Needs review » Reviewed & tested by the community

i-trokhanenko’s picture

Status: Reviewed & tested by the community » Fixed

I merged these changes to the 8.x and 2.x branches.
Thanks!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.