Search code examples
joomlarequestresponsepayment

Joomla- payment integration


I want to create own plugin for payment integration in joomla. I am using hdfc bank details. How to create form and call it. how to handle request and response.


Solution

  • Here is what you need to do:

    • When the user submits a payment, then you should, in your controller, use curl to submit the payment to the bank.

    Once you submit the payment, you have 2 options, depending on how the bank's API works:

    • You can immediately get the response from the bank when issuing the curl_exec method OR

    • In the curl call, you will specify which page the bank will post to on success and on failure (typically, it'll be the same page but with a different task), and you also specify the merchant transaction ID. The bank will then load the "response" page on success and will post back its response (you can get the information using $_POST).

    Note that in most scenarios, you only need to worry about the first method (getting the response immediately from the bank). The second method is typically used by PayPal and is referred to as IPN (Instant Payment Notification), but it might be the case that your bank uses some kind of IPN to notify you of payment success.