WSOD on payment with Commerce Funds, getPurchasedEntity is null

Created on 1 February 2021, almost 4 years ago
Updated 30 October 2023, about 1 year ago

Problem/Motivation

I am trying to integrate Commerce Funds with Auctions . User wins an auction (auction item on content type auction) and a new item is added to cart. When payment attempt is made it returns a WSOD on having null instead of purchased entity, see screenshot.

Attaching the auction-item on Product - variation type - default enabled the payment to go through, but it breaks the auctions display because it no longer triggered the auctions_node_view hook and I don't know how to fix that. I have all the parts and it even works together... almost.

Steps to reproduce

  1. Install fresh Drupal 8.9.x
  2. Install Commerce, Commerce Funds and Auctions modules with dependencies
  3. Setup a store and custom currency (CZK), Enable manual payment gateway
  4. Create funds wallet for account in CZK, deposit 2000 CZK, approve this deposit
  5. Create a new auction (content node with auction-item reference)
  6. Win auction using buy now to get content item added to cart
  7. Try to pay with remaining fund balance

Proposed resolution

I am marking this a support request because I do not know for sure if it is a bug. I believe a way of creating the order-items from auctions is relevant place to examine this issue.

The funds payment gateway is not tolerant to auctions, but it otherwise works well so I figured to post this support request here.

I will be glad for any help and directions and I'd like to thank you all for your great work on this impressive module!

💬 Support request
Status

Active

Version

1.0

Component

Code

Created by

🇨🇿Czech Republic Thebys Hradec Králové

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024