Hi all,
I am using the payment module to let user pay extra features.
What I want to do is the following:
- add an paiment reference field to a given content type, so the user pay before saving the content type (this is done)
- regularly update the content user paid for, so it appears on top of the website. However, for doing this, I need to create a view that returns all the nodes for which the payment refered by the payment reference field has status completed.
I cannot do this, and I do not see any relationship within the views module that allows to establish a relationship between a given node and a given payment, so that I can check the status of the paiment.
Please could help me doing this.
Thanks.

CommentFileSizeAuthor
#2 paiment.png17.84 KBi2dotnet
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Xano’s picture

Version: 7.x-1.12 » 8.x-2.x-dev
Component: Documentation » Code
Category: Support request » Feature request
Issue tags: -entity payment relationship

This is not possible in 7.x-1.x, because the relationship isn't event stored in the database, which is a prerequisite for adding Views integration. We could add such storage, but that would have to be done for 8.x-2.x first in order to prevent regressions. I won't have time to build this anytime soon, but I'll gladly review patches.

Please don't add random tags to issues. See the handbook for how to use issue tags effectively.

i2dotnet’s picture

FileSize
17.84 KB

Thank you for this reply.
However, it is strange, because when you edit a node that contains a payment reference field, the status of the field is dependent on the payment.
Otherly said, the status of the payment is visible on the field, and we can access the payment through clicking on the link within the field.
How can this be done if there is no relationship between node and payment?
I added a picture to illustrate this.

Xano’s picture

That's the payment reference field widget. Its storage does not support Views integration.

Xano’s picture

This may well work out of the box in 8.x-2.x because of the improved support for entity references, upon which the Payment Reference field is built. Let's wait for #2108025: Port Views integration and then evaluate this issue again.

dgastudio’s picture

any update? normally, payment must be related to something, node for example...