How is a payment method's canReviewPayment() implemented and used?

Context: How is \Magento\Sales\Model\Order\Payment::canReviewPayment() implemented and used?

Declaration

Definition






Usage

Magento’s Order View block will check $order->canReviewPayment() which will look at the _canReviewPayment variable on the payment method, and if true, display two buttons on the Order View : “Accept Payment” and “Deny Payment”. When clicked, the two new Payment Method functions we just added above will be called as appropriate.



Branch 1

Branch 2

Branch 3

Branch 3.1

Branch 3.2

See also: