Implementing payment providers, the mock reference provider, Nuvei production setup, order-to-cash flow, Quick Pay, credit memos, and error handling.
Create a plugin class that inherits from BasePaymentsProviderPlugin and set the Key property to a unique provider identifier.
Define a settings class for provider-specific configuration (API keys, endpoints, merchant IDs, secret keys).
Register the plugin, settings, and DI bindings for the provider implementation in the client startup configuration.
Create a frontend extension component for the provider's payment form (card input, ACH fields, etc.) using the wallet extension point.
Implementation split across partial classes: CreditCard, Method, and ACH for clear separation of payment type logic.
// Mock token format
Token = "MOCK:Token-{Guid}"
// Mock transaction format
TransactionId = "MOCK:Transaction-{Guid}"
UserTokenId derived from UserId/CustomerId for wallet association. Enables multi-card wallet management per customer.
Credit cards, ACH, and subscriptions fully supported. Secret key used for request signing and authentication.
End-to-end flow from sales collection through payment capture and ERP synchronization.
PayOnAccountPipeline
PayInvoicePipeline
CalculateBalanceDuePipeline
Token-based payment flow for invoice links. Allows customers to pay invoices directly via a secure link without logging in.
Creates a secure, time-limited token that identifies the invoice and customer for payment.
Validates the token is not expired, not already used, and resolves to a valid invoice.
Executes the quick pay transaction using the validated token and provided payment method details.
Combined operation that generates the invoice and quick pay token in a single pipeline execution.
Credits can be applied as a payment source alongside card or ACH payments, reducing the amount charged to external payment methods.
Credit-type payment methods track CurrentBalance and OriginalBalance for balance management.
UpdateSurchargeForDeclinedPaymentPipeline adjusts surcharge records when a payment is declined by the provider.
RefundPaymentPipeline processes full or partial refunds through the original payment provider.
Errors during ERP synchronization are logged and counted but do not roll back the payment transaction. Sync retries are handled by the connector layer.