Xendit payment plugin for Open Journal Systems (OJS). This plugin integrates OJS with Xendit, allowing your journal to accept payments for publication fees, subscriptions, or donations through various payment channels supported by Xendit across Southeast Asia, including Indonesia, Philippines, Malaysia, Thailand, Vietnam, Hongkong and Singapore.
This plugin is compatible with OJS 3.3.x
- Easy Integration: Simply enable and enter your API credentials to get started.
- Secure Redirect: Users are redirected to a secure Xendit payment page to complete the transaction, ensuring no sensitive card data is stored on your OJS server.
- Multi-Channel Support: Supports all payment methods available in your Xendit account (Credit/Debit Cards, Virtual Accounts, E-Wallets, Retail Outlets).
- Automatic Webhooks: Uses secure webhook verification to automatically confirm payment status and mark invoices as paid in OJS.
- Test Mode: Includes a "Test Mode" option for testing the payment flow without real transactions.
- Customer Details: Automatically includes the OJS user's name and email in the Xendit invoice for easy identification.
- OJS version 3.3.x
- PHP 7.4 or newer.
- PHP extensions
curlandjson. - An active Xendit account.
- Composer v2 to manage PHP dependencies.
Watch the complete installation and configuration guide on YouTube:
a. Download the latest release package (.tar.gz) from this repository's Releases page.
b. Log in to your OJS dashboard as an Administrator.
c. Navigate to Settings > Website > Plugins.
d. Click the Upload A New Plugin tab.
e. Upload the .tar.gz file you downloaded.
f. After installation is complete, enable the "Xendit Payment Plugin" from the plugin list under the "Paymethod Plugins" category.
a. Download and extract the latest release package.
b. Copy the xenditPayment directory into the plugins/paymethod/ directory of your OJS installation.
c. From your terminal, navigate to the newly copied plugin directory:
cd /path/to/your/ojs/plugins/paymethod/xenditPaymentd. Run Composer to install the required dependencies:
composer install --no-dev --optimize-autoloadere. Log in to your OJS dashboard, navigate to Settings > Website > Plugins, and enable the plugin.
Once the plugin is enabled, you need to configure it with your Xendit credentials.
a. API Key:
- Log in to your Xendit Dashboard.
- Navigate to
Settings>Developers>API Keys. - Create a new "Secret Key" with
Writepermissions for theMoney-Inproduct. Copy this key.
b. Webhook Secret (Callback Verification Token):
-
Navigate to
Settings>Developers>Webhooks. -
Set your Webhook URL to:
https://[YOUR_JOURNAL_URL]/index.php/[context]/payment/plugin/XenditPayment/webhook- Replace
https://YOUR_JOURNAL_URLwith your OJS site's URL. - Replace
contextwith your journal's path (e.g.,biologyjournal).
- Replace
-
Important Note: If the
disable_path_infosetting in your OJSconfig.inc.phpfile is set toOn, you must use the following URL format instead:https://YOUR_JOURNAL_URL/index.php?journal=context&page=payment&op=plugin&plugin=XenditPayment&path=webhook -
Click "Verify Token" to view or set your verification token. Copy this token.
-
Ensure you check the
Invoice paidevent in the webhook settings.
a. In the OJS dashboard, navigate to Distribution > Payments.
b. Enable general payments (Enable payments).
c. Scroll down to the Xendit Payment Plugin section.
d. API Key: Paste the Secret Key you obtained from the Xendit dashboard.
e. Webhook Secret: Paste the Callback Verification Token you obtained from the Xendit webhook settings.
f. Test Mode: You can enable this mode for testing. Make sure you use an API Key from the test mode in the Xendit dashboard if this option is enabled.
g. Click Save.
- A user chooses to make a payment in OJS (e.g., for a submission fee).
- OJS displays Xendit as one of the payment methods.
- After selecting Xendit, the user is redirected to a secure Xendit invoice page.
- The user selects their desired payment method (e.g., Virtual Account, Credit Card) and completes the payment.
- Upon successful payment, Xendit sends a notification (webhook) to your OJS server.
- The plugin verifies this notification and automatically updates the payment status in OJS to "Completed".
- The user is redirected back to a success page in OJS.
This plugin is released under the GNU General Public License v3. See the docs/COPYING file included with OJS for full details.
