How to get the Order Total in PaymentMethodAddForm?

Created on 21 June 2023, over 1 year ago

This is for a gateway plugin that I am developing.

My Process
When the paymentMethodAddForm is submitted I create a transaction with the status of 'HOLD'. The user is then presented with a "review" form. When the review form is submitted the transaction is updated with a status of 'CAPTURE'.

The Issue
I need to submit the hold transaction with the actual price. If I set a generic price value it will be declined if it is not within 30% of the original amount of the hold. I do not know how to retrieve the total amount.

Can someone please tell me how to retrieve the total amount within the function: createPaymentMethod(PaymentMethodInterface $payment_method, array $payment_details)

I would really appreciate some direction. I have been stuck for a while now.

Thanks!

πŸ’¬ Support request
Status

Closed: won't fix

Version

2.0

Component

Payment

Created by

πŸ‡ΊπŸ‡ΈUnited States sleewok

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

Comments & Activities

Production build 0.71.5 2024