OpenCart Plugin
The Genius Checkout extension for OpenCart 4.x adds Genius Checkout as a payment method on OpenCart storefronts.
Install
- Download the extension zip from your merchant dashboard.
- OpenCart admin → Extensions → Installer → Upload.
- Then Extensions → Extensions → Payments → Genius Checkout → Install.
Configure
Extensions → Payments → Genius Checkout → Edit:
| Setting | Value |
|---|---|
| API Key | Your gc_test_… or gc_live_… key (password field) |
| Webhook Secret | Same value as GC Dashboard → Developers → Webhooks (password field) |
| Test Mode | Toggle while validating |
| Approved Order Status | Status to apply on payment.completed (typically Processing) |
| Failed Order Status | Status to apply on payment.failed (typically Failed) |
| Refunded Order Status | Status to apply on payment.refunded / payment.partially_refunded |
| Geo Zone | Restrict to countries (optional) |
| Sort Order | Display order in the payment-method list |
Then in the GC dashboard, set your OpenCart webhook URL to:
https://your-opencart.example.com/index.php?route=extension/payment/genius_checkout/callbackSubscribe the endpoint to at least: payment.completed, payment.failed, payment.refunded.
Checkout flow
- Shopper reaches OpenCart's checkout and picks Genius Checkout.
- The catalog controller renders a Pay-now block that POSTs to
confirm(). confirm()callsPOST /api/v1/checkout-sessionswith the order total, customer email, and a return URL pointing back atindex.php?route=checkout/success.- We respond with
{checkout_url, session_id}. The plugin redirects the shopper. - After payment, the shopper is returned to OpenCart's success URL with
?gc_charge_id=…. - Asynchronously, GC pushes
payment.completed/payment.failedto the callback endpoint; the plugin transitions the order to the configured status id.
Supported features
| Capability | Status |
|---|---|
| Refunds (full) | Yes — propagated via payment.refunded webhook |
| Partial refunds | Wire-level (handled by the inbound payment.partially_refunded event) |
| Tokenization | Tokens stored on the GC platform; OpenCart doesn't render a saved-card picker today |
| Subscriptions | Not natively — OpenCart has no built-in subscription engine |
Refunds
GC merchants issue refunds from the GC dashboard or via API; the OpenCart order automatically transitions to the configured Refunded status when the payment.refunded webhook arrives. Triggering refunds from inside OpenCart is on the roadmap.
Webhook security
Inbound webhooks are signed with HMAC-SHA256. The OpenCart receiver verifies X-GC-Signature over {timestamp}.{body} (5-minute replay window) and rejects mismatches.
Troubleshooting
- Pay-now button does nothing — open the browser console; missing JS usually means a theme override has stripped the callback URL. Re-run the admin install step.
- Order not transitioning — confirm the webhook URL resolves from the public internet (OpenCart often sits behind WAFs that drop signed POSTs).
alert()showing instead of a styled error — clear the OC cache; the v4.x storefront template uses a Bootstrap.alertblock which won't render until the theme is rebuilt.
Submission
Available on the OpenCart Marketplace.
