Can Not Be Able To Add Fields Id In Billing Option Page For Any Payment Gateway Add On

I was trying to add PESA PI fields "Name", "Phone Number", "Verification Code" to validate a payment though mpesa code. I made this into normal php which is running fine. Can you please tell me how to put these fields in CS CART "Billing Options" page for Other payment option for any Payment processor?

Also, how I can make a payment processor add on script for pesa pi in cs cart so that I just run the script into it's DB and it will be added into Payment Processor? I used "mpesa.php" and "mpesa.tpl" file but after running script it's not working. Script is:

REPLACE INTO cscart_payment_processors (processor_id, processor, processor_script,
processor_template, admin_template, callback, type) values ('1000', 'Mpesa Payment',
'mpesa.php', 'mpesa.tpl',

'mpesa_config.tpl', 'Y', 'P');

Need guidelines to make both of them.

Thanks

Pesapi screenshot.bmp

Hello,

In your code 'mpesa.php' should be file inside app/payments/ directory.

And place 'mpesa.tpl' file inside design/themes/responsive/templates/views/orders/components/payments directory.

And you query should be:

REPLACE INTO cscart_payment_processors ( processor, processor_script,
processor_template, admin_template, callback, type) values ( 'MpesaPayment',
'mpesa.php', 'views/orders/components/payments/mpesa.tpl', 'mpesa_config.tpl', 'Y', 'P');

Then create new payment method at admin end:

Check https://www.cs-cart.com/documentation/reference_guide/index.htmld?administration_payment_methods.htmfor more info.

-Himanshu Dangwal

Please also check this article:

http://kb.cs-cart.com/new-payment

Thanks for guidelines. I have another question to ask.

1. Should I create mpesa_config.tpl file as well for the script you gave me?

2. mpesa.php, mpesa.tpl and mpesa_config.tpl these files I have created as "empty" one. Is it correct? Or I have to put information on them? If yes, then please guide me what information should I put into these files so that with script running it will be coming into Payment Processor of Cs-cart.

Thanks again!

Also, where to putmpesa_config.tpl file?Can you please tell me the directory location?

Thanks...