Problem/Motivation

Payment create endpoint provides alter hook "payment_create_prepare", but it does not pass information about the order, so there is no way to perform any order-related operations in the alter hook.

We've got a use case where we need to check order total price in order to alter the payment, and therefore order info is essential.

Proposed resolution

Add order_id to the $data array which is being passed to the alter hook.

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

Spleshka created an issue. See original summary.

  • Spleshka committed 8c12a3c2 on 8.x-1.x
    Issue #3368130 by Spleshka: Add information about the order ID to the...
spleshka’s picture

Status: Active » Fixed

Merging the proposed change.

Status: Fixed » Closed (fixed)

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