Overview
Stores selling in the Saudi market need a local card gateway inside the Odoo checkout. This module registers a new payment provider with publishable and secret keys, renders the hosted payment form on the checkout page and receives a webhook to confirm the transaction. It depends on the Payment app and integrates with eCommerce and invoices. Shop owners enable it and customers pay by card without leaving the flow.
Usage steps
- 1
Enable the provider
Open Accounting, Configuration, Payment Providers and select the gateway created by the module. Its record is loaded from the data file. Set the state to enabled when ready.
- Code selection added to payment.provider
- State: disabled, test, enabled
- 2
Enter the keys
Fill Publishable Key and Secret Key. Both are required when the provider is used. Use test keys first in test mode.
- Fields: Publishable Key, Secret Key
- Required for this provider
- 3
Customer starts a payment
At checkout the customer selects the gateway. The rendering values are prepared and the form script initialises the hosted card form. The amount and reference come from the transaction.
- Templates gateway_templates
- JS gateway_form.js and payment_form.js
- 4
Transaction is matched
The gateway calls back and the module finds the transaction from the notification data. It queries the gateway API with the secret key to verify the payment. The transaction state is updated.
- Method _process_notification_data
- API header built with the secret key
- 5
Webhook confirmation
A public webhook route receives asynchronous updates from the gateway. This confirms payments even if the customer closes the browser. The sale order is then confirmed.
- Route defined by _webhook_url
- auth public
- 6
Review payments
Payment transactions appear under Payment Transactions with their status. Accountants reconcile them with invoices. Failed ones show the error reason.
- Menu: Payment Transactions
- Reconcile with invoices
Screens
Illustrative mockups with placeholder data.
—
Added by this module
Roles
| Role |
|---|
| Accountant |
| eCommerce manager |
| Customer |
Dependencies
Want to know more or try this app? Contact us
We can arrange a demo or a trial and answer your questions about Card Payment Gateway (Local Cards).