Skip to main navigation Skip to main content Skip to page footer

Basket order with SEPA (direct debit)

With SEPA direct debit as the payment method, the order is created as binding after checkout is completed (including order and invoice numbers). The subsequent steps are then performed manually in the backend: incoming payments are recorded after successful collection, shipping is manually initiated for physical goods, and the order can be canceled if payment is not received. Since payment and shipping may occur at different times depending on the process, the sequence is intentionally flexible; the process is only completed once the payment has been recorded and – if applicable – the order has been shipped.

stateDiagram-v2

    %% Frontend
    [*] --> prepared : Customer in cart / checkout

    prepared --> ordered : Checkout completed\nConfirmation email\nInvoice number

    %% Backend – manual steps
    ordered --> paid : Payment recorded manually
    ordered --> shipped : Shipment processed manually
    ordered --> canceled_unpaid : No payment\nCancellation

    %% Order intentionally flexible
    paid --> shipped : Shipment after payment
    shipped --> paid : Payment after shipment

    %% Finalization
    paid --> processed : Finalized without shipment\n(e.g. digital)
    shipped --> processed : Finalized after shipment
    canceled_unpaid --> processed : Cancellation completed

    %% Conditions
    note right of processed
    Conditions for "processed":
    - paid_date MUST be set
    - shipped_date MUST be set
    if shipment has taken place
    end note

Further actions:

  • Returns: Possible as soon as the goods have been shipped – i.e., in the status shipped or processed.
  • Deletion: Deleting an order is only possible in the status prepared.

TypoScript Configuration

plugin.tx_shop.settings.basketOrder {
    orderOptions {
        sepa {
            active = {$themes.configuration.extension.shop.checkout.sepa.active}
            attachProductFilesToAdminEmail = {$themes.configuration.extension.shop.checkout.sepa.attachProductFilesToAdminEmail}
            attachProductFilesToCustomerEmail = {$themes.configuration.extension.shop.checkout.sepa.attachProductFilesToCustomerEmail}
            attachInvoiceToAdminEmail = {$themes.configuration.extension.shop.checkout.sepa.attachInvoiceToAdminEmail}
            attachSepaMandateToAdminEmail = {$themes.configuration.extension.shop.checkout.sepa.attachSepaMandateToAdminEmail}
            attachInvoiceToCustomerEmail = {$themes.configuration.extension.shop.checkout.sepa.attachInvoiceToCustomerEmail}
            attachSepaMandateToCustomerEmail = {$themes.configuration.extension.shop.checkout.sepa.attachSepaMandateToCustomerEmail}
            attachDeliveryNoteToAdminEmail = {$themes.configuration.extension.shop.checkout.sepa.attachDeliveryNoteToAdminEmail}
            attachDeliveryNoteToCustomerEmail = {$themes.configuration.extension.shop.checkout.sepa.attachDeliveryNoteToCustomerEmail}
            attachOrderXmlToAdminEmail = {$themes.configuration.extension.shop.checkout.sepa.attachOrderXmlToAdminEmail}
            storeOrderXmlInFolder = {$themes.configuration.extension.shop.checkout.sepa.storeOrderXmlInFolder}
            storeOrderXmlInFolderName = {$themes.configuration.extension.shop.checkout.sepa.storeOrderXmlInFolderName}
            type = sepa
            minimumOrderValue = 0
            maximumOrderValue = 0
            checkoutPid = {$themes.configuration.pages.shop.checkout}
            successPid = {$themes.configuration.pages.shop.checkoutSuccess}
            errorPid = {$themes.configuration.pages.shop.checkoutError}
            service = CodingMs\Shop\Service\Checkout\SepaCheckoutService
            button {
                title = tx_shop_label.sepa_button_title
                label = tx_shop_label.sepa_button_label
                icon = fa fa-shopping-cart
            }
            fields {
                available = {$themes.configuration.extension.shop.checkout.sepa.fields.available}
                required = {$themes.configuration.extension.shop.checkout.sepa.fields.required}
            }
            status {
                prepared {
                    allowed {
                        ordered =
                    }
                }
                ordered {
                    allowed {
                        paid =
                        shipped =
                        canceled_unpaid =
                    }
                }
                shipped {
                    allowed {
                        paid {
                            # Zahlung nach Versand verbuchen
                            condition {
                                ordered_date = NotEmpty
                                paid_date = Empty
                            }
                        }
                        processed {
                            # Abschluss nur, wenn Zahlung erfolgt ist
                            condition {
                                paid_date = NotEmpty
                            }
                        }
                    }
                }
                paid {
                    # Zahlung wurde verbucht, Versand kann folgen
                    allowed {
                        shipped {
                            # Versand nach Zahlung
                            condition {
                                ordered_date = NotEmpty
                                shipped_date = Empty
                            }
                        }
                        processed {
                            # Abschluss ohne Versand (z. B. digitale Leistung)
                            # ODER nach Versand (shipped_date bereits gesetzt)
                            condition {
                                paid_date = NotEmpty
                            }
                        }
                    }
                }
                canceled_unpaid {
                    # Bestellung wird storniert, da keine Zahlung einging
                    allowed {
                        processed =
                    }
                }
                processed {
                    # End, but "allowed" must be defined!
                    allowed =
                }
            }
            email {
                customerConfirmation {
                    active = {$themes.configuration.extension.shop.checkout.sepa.email.customerConfirmation.active}
                    from {
                        name = {$themes.configuration.extension.shop.email.from.name}
                        email = {$themes.configuration.extension.shop.email.from.email}
                    }
                    to {
                        # Customer address data
                    }
                    cc {
                        name = {$themes.configuration.extension.shop.email.cc.name}
                        email = {$themes.configuration.extension.shop.email.cc.email}
                    }
                    subject = {$themes.configuration.extension.shop.email.templates.sepa.subjectCustomerConfirmation}
                }
                order {
                    active = {$themes.configuration.extension.shop.checkout.sepa.email.order.active}
                    from {
                        name = {$themes.configuration.extension.shop.email.from.name}
                        email = {$themes.configuration.extension.shop.email.from.email}
                    }
                    to {
                        name = {$themes.configuration.extension.shop.email.to.name}
                        email = {$themes.configuration.extension.shop.email.to.email}
                    }
                    cc {
                        name = {$themes.configuration.extension.shop.email.cc.name}
                        email = {$themes.configuration.extension.shop.email.cc.email}
                    }
                    subject = {$themes.configuration.extension.shop.email.templates.sepa.subjectOrder}
                }
            }
        }
    }
}
Documentation

TYPO3 Shop by coding.ms

An extensive shop for TYPO3 for realizing Webshops, Online-Shops or Payment-Subscriptions, comparable with tt_products, Cart or Aimeos. It includes PayPal, PayPal-Checkout, Klarna, Stripe, Bookmarks, UPS-API, invoice generation, a backend module, compare feature, graduated prices, plus product variants, filters, and tax and shipping logic for practical shop operations.

Menu
Shopping basket 0 Products

The Demo is build with*

EXT:bootstrap_package for site-package aka theme build on Bootsrap 5.

EXT:modules for user plugins like user-profile, registration, user-addresses, and more.

EXT:shop for the whole shop functionality.

EXT:questions for the FAQ page and FAQs attached in the product detail views.

EXT:glossaries for the glossaries and definitions.

EXT:fluid_fpdf for generating invoices, delivery-notes, product-sheets and more.

EXT:parsedown_extra for rendering the extension documentations from markdown to HTML.

* There are only build-in settings made using site-settings & TypoScript – no templates or other files were changed or overridden!