InstallationDownload the code and place it in the
app/Extensions/Gateways/Midtrans directory.
ConfigurationIn the admin panel, go to
Settings > Payment Gateways and click on the
Midtrans gateway. Enter
Midtrans MerchantID/
Server-Key/
Client-Key then
Save.UsageWhen a user selects the
[B]Midtrans</b>[/B] gateway, they will be redirected to the Midtrans payment page. After the payment is completed, the user will be redirected back to the site.
Setup Callback On Midtrans
1. Settings > <b>SNAP</b> Preferences > System Settings
Finish URL <code class="bg-gray-100 dark:bg-gray-800 px-1.5 py-0.5 rounded text-sm font-mono">https://yourdomain.com</code>
Unfinish URL <code class="bg-gray-100 dark:bg-gray-800 px-1.5 py-0.5 rounded text-sm font-mono">https://yourdomain.com</code>
Error Payment URL <code class="bg-gray-100 dark:bg-gray-800 px-1.5 py-0.5 rounded text-sm font-mono">https://yourdomain.com</code>
2. Settings > Payment > Finish Redirect URL
Finish Redirect URL <code class="bg-gray-100 dark:bg-gray-800 px-1.5 py-0.5 rounded text-sm font-mono">https://yourdomain.com</code>
3. Settings > Payment > Notification URL
Notification URL <code class="bg-gray-100 dark:bg-gray-800 px-1.5 py-0.5 rounded text-sm font-mono">https://yourdomain.com/extensions/midtrans/webhook</code>
Recurring payment notification URL <code class="bg-gray-100 dark:bg-gray-800 px-1.5 py-0.5 rounded text-sm font-mono">https://yourdomain.com</code>
Account linking notification URL <code class="bg-gray-100 dark:bg-gray-800 px-1.5 py-0.5 rounded text-sm font-mono">https://yourdomain.com</code>