-
Notifications
You must be signed in to change notification settings - Fork 24
SimplePaymentProcessor
Marvin Kruse edited this page Jul 27, 2023
·
3 revisions
File: SimplePaymentProcessor.sol
- The SimplePaymentProcessor is a module to process payment orders from other modules.
- In order to process a module's payment orders, the module must implement the
{IPaymentClient}
interface.
This contract does not define any modifiers.
1. token
function token() external view returns (IERC20);
Returns the IERC20 token the payment processor can process.
Return Data
-
IERC20
token that the payment processor can process.
1. processPayment
function processPayments(IPaymentClient client) external;
Processes all payments from an {IPaymentClient}
instance. It's up to the implementation to keep up with what has been paid out or not.
NOTE: From the perspective of
IPaymentClient
, the orders are fulfilled as soon as thecollectPaymentOrders
function is called. The responsibility to actually send the tokens lies then with theIPaymentProcessor
, and should be done in exactly this function -processPayments
.
Parameters
-
IPaymentClient client
-> The{IPaymentClient}
instance to process its to payments.