pay.models.payment_providers.stripe
Attributes
Classes
Captures an open stripe charge when the transaction finishes. |
|
All stripe fee calculations in one place (should they ever change). |
|
Functions
|
Module Contents
- pay.models.payment_providers.stripe.stripe_api_key(key: str | None) collections.abc.Generator[None][source]
- class pay.models.payment_providers.stripe.StripeCaptureManager(api_key: str, charge_id: str)[source]
Captures an open stripe charge when the transaction finishes.
If there is an error during this step, it is logged, but the transaction still continues successfully.
The user is then supposed to manually capture the charge.
- class pay.models.payment_providers.stripe.StripeFeePolicy[source]
All stripe fee calculations in one place (should they ever change).
- class pay.models.payment_providers.stripe.StripePayment[source]
Bases:
onegov.pay.models.payment.Payment- provider: sqlalchemy.orm.Mapped[StripeConnect][source]
- class pay.models.payment_providers.stripe.StripeConnect[source]
Bases:
onegov.pay.models.payment_provider.PaymentProvider[StripePayment]- property payment_class: type[StripePayment][source]
- charge(amount: decimal.Decimal, currency: str, token: str) StripePayment[source]
- get_token(request: onegov.core.request.CoreRequest) str | None[source]
Extracts this provider’s specific token from the request.
- checkout_button(label: str, amount: decimal.Decimal | None, currency: str | None, complete_url: str, request: onegov.core.request.CoreRequest, **extra: Any) markupsafe.Markup[source]
Generates the html for the checkout button.
- oauth_url(redirect_uri: str, state: str, user_fields: stripe.OAuth.OAuthAuthorizeUrlParamsStripeUser) str[source]
Generates an oauth url to be shown in the browser.
- prepare_oauth_request(redirect_uri: str, success_url: str, error_url: str, user_fields: dict[str, Any] | None = None) str[source]
Registers the oauth request with the oauth_gateway and returns an url that is ready to be used for the complete oauth request.
- process_oauth_response(request_params: collections.abc.Mapping[str, Any]) None[source]
Takes the parameters of an incoming oauth request and stores them on the payment provider if successful.
- sync_payouts(session: sqlalchemy.orm.Session) None[source]
See https://stripe.com/docs/api/balance_transactions/list and https://stripe.com/docs/api/payouts