Shopware 6fuer Shopware
fuer Shopware
SEPA QR-Codes
Professionelle GiroCode Integration fuer Shopware 6. Automatische SEPA QR-Codes auf Rechnungen, in E-Mails und im Kundenbereich.
Vorteile
Warum GiroCode fuer Shopware?
Shopware 6 Native
Nahtlose Integration in die moderne Shopware 6 Architektur mit Symfony und Vue.js.
Automatische Generierung
QR-Codes werden bei Bestellabschluss automatisch generiert und gespeichert.
PDF-Integration
GiroCodes erscheinen automatisch auf Rechnungs-PDFs und Lieferscheinen.
Multi-Shop faehig
Unterschiedliche Bankverbindungen pro Sales Channel konfigurierbar.
Integration
Schnelle Einrichtung
In wenigen Schritten zur vollstaendigen Integration
1
Plugin installieren
Laden Sie das Plugin ueber den Shopware Store oder installieren Sie es manuell.
2
API verbinden
Hinterlegen Sie Ihre GiroCode API Zugangsdaten in der Plugin-Konfiguration.
3
Bankdaten konfigurieren
Geben Sie IBAN und Empfaengername fuer jeden Sales Channel ein.
4
Templates anpassen
Optional: Passen Sie Position und Groesse in den E-Mail/PDF-Templates an.
Code-Beispiele
Shopware 6 Integration
Service-Klasse und Twig-Template fuer Ihre Plugin-Entwicklung
GiroCodeService.php
<?php declare(strict_types=1);
namespace YourVendor\GiroCodeIntegration\Service;
use Shopware\Core\Checkout\Order\OrderEntity;
use GuzzleHttp\Client;
use GuzzleHttp\Exception\GuzzleException;
class GiroCodeService
{
private Client $client;
private string $apiUser;
private string $apiSecret;
private string $iban;
private string $recipient;
public function __construct(
string $apiUser,
string $apiSecret,
string $iban,
string $recipient
) {
$this->client = new Client([
'base_uri' => 'https://api.girocode-api.de/',
'timeout' => 30.0,
]);
$this->apiUser = $apiUser;
$this->apiSecret = $apiSecret;
$this->iban = $iban;
$this->recipient = $recipient;
}
public function generateForOrder(OrderEntity $order): ?string
{
try {
$response = $this->client->post('generate', [
'json' => [
'user' => $this->apiUser,
'secret' => $this->apiSecret,
'iban' => $this->iban,
'paymentrecipient' => $this->recipient,
'purpose' => 'Bestellung ' . $order->getOrderNumber(),
'amount' => (string) $order->getAmountTotal(),
'imageformat' => 'png',
'dimension' => '256',
'output' => 'json',
],
]);
$data = json_decode(
$response->getBody()->getContents(),
true,
512,
JSON_THROW_ON_ERROR
);
if ($data['success'] && isset($data['data']['data'])) {
return $data['data']['data']; // Base64 Data URL
}
} catch (GuzzleException | \JsonException $e) {
// Log error
}
return null;
}
}invoice.html.twig
{# In Resources/views/documents/invoice.html.twig #}
{% if order.customFields.girocode_dataurl is defined %}
<div class="girocode-section" style="text-align: center; margin-top: 30px;">
<h4>Schnell bezahlen mit GiroCode</h4>
<p style="font-size: 12px; color: #666;">
Scannen Sie den QR-Code mit Ihrer Banking-App
</p>
<img
src="{{ order.customFields.girocode_dataurl }}"
alt="GiroCode SEPA QR-Code"
style="width: 150px; height: 150px;"
/>
</div>
{% endif %}Features
Alle Funktionen im Ueberblick
Shopware 6.4+ kompatibel
Sales Channel spezifische Konfiguration
Automatische Bestellnummer als Verwendungszweck
PDF-Rechnung Integration
E-Mail Template Support
Custom Fields fuer Orders
CLI-Befehle fuer Batch-Generierung
DSGVO-konform
Shopware Vorteile
Perfekt fuer Shopware Shops
Sales Channels
Unterschiedliche Bankverbindungen pro Sales Channel. Ideal fuer Multi-Brand-Shops oder B2B/B2C Trennung.
Flow Builder
Integration mit dem Shopware Flow Builder fuer automatische QR-Code Generierung bei bestimmten Events.