shop.payment_providers.invoice

Attributes

Classes

Invoice

Invoice payment method for the ViUR Shop.

Module Contents

shop.payment_providers.invoice.logger
class shop.payment_providers.invoice.Invoice(*, image_path=None, is_available=None)

Bases: shop.payment_providers.PaymentProviderAbstract

Invoice payment method for the ViUR Shop.

Allows customers to place orders with the agreement to pay later via invoice. The order can be marked as ready to ship (RTS) immediately but is not considered paid.

Note:

Payment processing (the customer pays this order in the next x days) and verification are handled externally and not within this module.

Parameters:
  • image_path (str | None)

  • is_available (t.Callable[[t.Self, SkeletonInstance_T[viur.shop.skeletons.order.OrderSkel] | None], bool] | None)

name: Final[str] = 'invoice'

Define the internal name of the payment provider

checkout(order_skel)
Parameters:

order_skel (shop.types.SkeletonInstance_T[shop.skeletons.OrderSkel])

Return type:

None

charge(order_skel, payment=None)
Parameters:
Return type:

tuple[shop.types.SkeletonInstance_T[shop.skeletons.OrderSkel], Any]

check_payment_state(order_skel)

Check the payment state from the PaymentProvider API/service

Access OrderSkel.is_paid to get the payment state of an order.

Parameters:

order_skel (viur.core.skeleton.SkeletonInstance)

Return type:

tuple[bool, Any]

return_handler()

Frontend Endpoint where the might be redirected to by the payment provider during the payment flow

webhook()

API Endpoint (Webhook) to listen for events from payment provider

get_debug_information()

Provide information about the payment of an order.

Only for debugging purposes. It’s not an API endpoint.