set_js_urls - add js links for payment gateways
To improve the user's experience while is making a payment through your system i recommend to use the ajax calls instead redirects to another website. To understand better what i'm meaning please look at the default Midrub Payments gateways.
With JS links you can use the ajax's calls to process the payments. By default, the Payments theme has jQuery and the Midrub's JS file which allows you to make Ajax calls more professionally.
To add a JS's link in a Payments gateway, please use the code below in the method Payments gateway's class pay:
// For external url set_js_urls(array(your url')); // For internal url set_js_urls(array(base_url('path with file')));
Once done, JS's link will be displayed in the Payments gateway.
- How works the plans subscriptions in Midrub
- How to create new placeholders for an invoice's template
- Please don't ask me to add new payments gateways
- How works the fields and options in the Midrub Payments system
- How to custom or change the payments gateway's icon
- How and where to use a payments gateway library
- Add a view file to your Payments gateway
- set_js_urls - add js links for payment gateways
- set_css_urls - add styles links in a payment gateway
- set_the_title for payments gateway