An Oqtane module for selling and managing gift certificates. Customers enter gift certificate details, pay via PayPal, and the module can generate a PDF certificate and send email notifications.
- Oqtane Framework: 6.2.1
- Target Framework: .NET 9 (
net9.0) - Module Name:
GiftCert - Package Id:
GIBS.Module.GiftCert
- Customer gift certificate purchase flow (amount, recipient, sender, notes)
- PayPal Checkout (Sandbox and Production)
- Persists purchases and PayPal capture response details
- Admin management UI:
- View payment status
- Mark certificates as processed
- Generate/download PDF after payment is
PAID
- Email notifications (HTML) using MailKit/MimeKit
- PDF generation using PDFsharp/MigraDoc
Client/
Blazor UI components (Index.razor,List.razor,Edit.razor,Settings.razor) and client-side services.Server/
Controllers, services, repository/data access, PDF + email implementation.Shared/
Shared models and DTOs used by client and server.Package/
NuGet packaging assets includingGIBS.Module.GiftCert.nuspec.
- Build the module in Release configuration.
- Create the
.nupkgfrom thePackageproject/build step. - Install the package into your Oqtane site using the Oqtane module installation process.
Note: This project uses a
.nuspecand explicitly includes third-party DLLs in the package.
Settings UI: Client/Modules/GIBS.Module.GiftCert/Settings.razor
PayPalSandboxMode(true/false)- Sandbox credentials:
PayPalSandboxPayeePayPalSandboxClientIdPayPalSandboxClientSecret
- Production credentials:
PayPalPayeeOAuthClientIdOAuthClientSecret
DefaultValue(default certificate amount)ModuleInstructionsNumPerPageFileFolder(PDF output folder)
CertBannerTextCertFooterTextCertWatermarkCertLogoCertReturnAddress
EmailReplyToEmailNotifyEmailBCCEmailSubjectSpecialInstructions
Controller: Server/Controllers/GiftCertController.cs
GET /api/[...]/GiftCert?moduleid={moduleId}- list certificatesGET /api/[...]/GiftCert/{id}/{moduleid}- get certificatePOST /api/[...]/GiftCert- create certificatePUT /api/[...]/GiftCert/{id}- update certificateDELETE /api/[...]/GiftCert/{id}/{moduleid}- delete certificatePOST /api/[...]/GiftCert/SendEmail- send email (authorized)GET /api/[...]/GiftCert/pdf/{id}/{moduleid}- download generated PDF
Oqtane performs assembly scanning during startup. If any module assembly has missing dependencies, the site can fail to start with HTTP 500.30.
If you see errors like:
ReflectionTypeLoadExceptionCould not load file or assembly 'APIMatic.Core'
then your package is missing transitive dependencies. Ensure that required third-party DLLs (for example, APIMatic.Core.dll required by PayPalServerSDK) are included in the .nupkg under lib/net9.0.
Packaging file: Package/GIBS.Module.GiftCert.nuspec
- Open the solution in Visual Studio.
- Ensure you are targeting the same Oqtane version as production (
6.2.1). - Build in
Releasebefore generating the installation package.
MIT (see Package/GIBS.Module.GiftCert.nuspec for the package license expression).