PaymentProvider
interface. This
interface is defined in
metering_billing/payment_providers.py).
You can see the implementation of the Stripe version (StripeConnector
class) in the file. The type hints should be relatively self-explanatory, but
if you have any doubts, don’t be afraid to reach out in the
Lotus Community Slack.metering_billing/invoice.py
file, and add an
instance of your connector to the PAYMENT_PROCESSOR_MAP
dictionary. From
here, the boilerplate will take care of using the methods you defined to
execute Lotus’ billing logic. To see how we did it with Stripe,
check out this line.frontend/src/types/payment-processor-type.ts
file, create a new
interface for the data sent in a request to Lotus’ backend and add it as an
option for the data
parameter in the
PaymentProcessorConnectionRequestType
interface. You can see that for the
Stripe integration, the only data we needed was the authorization code
provided by the Oauth integration.frontend/src/integrations/PaymentProcessorIntegrations.tsx
file,
create a new functional component that describes what should happen once we
get redirected from the authorization page for your payment processor. We
have an example of how we did it for Stripe in the file.frontend/src/config/Routes.tsx
file, add a new route for your
payment processor. You can see how we did it for Stripe in the file.