Closed (fixed)
Project:
Payment
Version:
8.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
26 Apr 2013 at 11:12 UTC
Updated:
22 Jul 2013 at 11:41 UTC
Jump to comment: Most recent file
Comments
Comment #1
xanoWe should leverage #1839516: Introduce entity operation providers.
Comment #2
xanoComment #3
xanoAs we have a number of different operations, and more may be added by payment method plugins, these should be dynamic. In order to let plugins provide them, add the following three methods:
This will replace PaymentProcessingInterface::validatePayment(), PaymentProcessingInterface::executePayment(), Payment::execute(), and part of Payment::validate().
The future PaymentListController::getOperations() can then call Payment::getPaymentMethod()->getPlugin()->paymentOperations() and merge those with the default entity operations for use in the UI later on.
Comment #4
xanoNote that this also replaces hook_payment_validate() and the corresponding Rules event. Next to that, operations should have a flag to indicate whether or not they need a permission to be generated for them.
Comment #5
xanoComment #6
xanoFollow-up: #2037071: Make "execute" operation part of PaymentProcessingInterface.