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

Allow setting message when registering payment #1003

Open
CherryDT opened this issue Apr 10, 2024 · 2 comments
Open

Allow setting message when registering payment #1003

CherryDT opened this issue Apr 10, 2024 · 2 comments

Comments

@CherryDT
Copy link

CherryDT commented Apr 10, 2024

Is your feature request related to a problem? Please describe.
When an external payment is manually registered using the "Pay now" button, there are only fields for payment method and amount but no additional notes/message field for saving payment details such as a payment transaction ID for future reference.

Describe the solution you'd like
I'd like there to be a "Message" field when registering a payment.

Additional context
I can see a column "Message" in the table after registering the payment, but it's empty and I don't have a way to set it... So I guess it shouldn't be too complicated to add it, as the field seemingly already exists in the DB? If I were to implement it myself, are there any gotchas to consider?

@pierredup
Copy link
Member

The current message field is used to capture a message from the payment gateway after a payment has been made. Currently it's only used by paypal_express and is only populated when a payment fails, then it captures the failure details in the message field.

For this request, I would add 2 new fields: transaction_id varchar(255) and notes text.
The transaction_id can then be used to manually capture a transaction id, and the notes fields can be used for custom information when manually capturing a payment.

If I were to implement it myself, are there any gotchas to consider?

These additional fields should only be added when a payment is manually captured by an admin user, and not when the client initiates the payment. There are already a check in place to ensure a user is set when adding specific fields, so these new fields can be added in the same condition

if (null !== $options['user']) {

@pierredup pierredup added this to the 2.3.0 milestone Apr 11, 2024
@CherryDT
Copy link
Author

CherryDT commented Apr 21, 2024

When registering payment is allowed in the API, it should also be possible to add the comment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants