interface PaymentMethodUpdatePaymentStatusInterface in Payment 8.2
Defines a payment method that controls payment status updates.
Users can update payment statuses if they have the "payment.payment.update_status.any" and/or "payment.payment.update_status.own" permissions. By implementing this interface, payment methods can exercise additional control on top of these permissions.
Hierarchy
- interface \Drupal\payment\Plugin\Payment\Method\PaymentMethodUpdatePaymentStatusInterface
Expanded class hierarchy of PaymentMethodUpdatePaymentStatusInterface
All classes that implement PaymentMethodUpdatePaymentStatusInterface
4 files declare their use of PaymentMethodUpdatePaymentStatusInterface
- PaymentAccessControlHandler.php in src/
Entity/ Payment/ PaymentAccessControlHandler.php - PaymentAccessControlHandlerTest.php in tests/
src/ Unit/ Entity/ Payment/ PaymentAccessControlHandlerTest.php - PaymentStatusForm.php in src/
Entity/ Payment/ PaymentStatusForm.php - PaymentStatusFormTest.php in tests/
src/ Unit/ Entity/ Payment/ PaymentStatusFormTest.php
File
- src/
Plugin/ Payment/ Method/ PaymentMethodUpdatePaymentStatusInterface.php, line 21
Namespace
Drupal\payment\Plugin\Payment\MethodView source
interface PaymentMethodUpdatePaymentStatusInterface {
/**
* Checks if the payment status can be updated.
*
* @param \Drupal\Core\Session\AccountInterface $account
*
* @return \Drupal\Core\Access\AccessResultInterface
*/
public function updatePaymentStatusAccess(AccountInterface $account);
/**
* Returns the statuses that can be set on a payment.
*
* @param \Drupal\Core\Session\AccountInterface $account
* @param \Drupal\payment\Entity\PaymentInterface $payment
* The payment to set the status on.
*
* @return string[]
* The plugin IDs of the settable statuses.
*/
public function getSettablePaymentStatuses(AccountInterface $account, PaymentInterface $payment);
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
PaymentMethodUpdatePaymentStatusInterface:: |
public | function | Returns the statuses that can be set on a payment. | 1 |
PaymentMethodUpdatePaymentStatusInterface:: |
public | function | Checks if the payment status can be updated. | 1 |