- Posts: 5
- Thank you received: 0
Need to get payment plugin parameters without orde
- aravindarao
-
Topic Author
- Offline
Less
More
10 years 11 months ago #217559
by aravindarao
Need to get payment plugin parameters without orde was created by aravindarao
-- HikaShop version -- : 2.6.0
-- Joomla version -- : 3.4.4
-- Error-message(debug-mod must be tuned on) -- : None
Hi,
I'm implementing a payment plugin for CCAvenue. I'm handling the response in onPaymentNotification method of the plugin. The response from the gateway is encoded with a key. The key is available in my configuration of the payment plugin. How can I read the payment param for my plugin?
Other examples use loadPaymentParms with order id. Unfortunately I do not have the order ID in the URL. Some issues in the way they handle return url.
Can you suggest some other method that I can use to read parameters of the plugin without using the order id (or anything else for that matter)?
Thanks and regards,
Aravinda
-- Joomla version -- : 3.4.4
-- Error-message(debug-mod must be tuned on) -- : None
Hi,
I'm implementing a payment plugin for CCAvenue. I'm handling the response in onPaymentNotification method of the plugin. The response from the gateway is encoded with a key. The key is available in my configuration of the payment plugin. How can I read the payment param for my plugin?
Other examples use loadPaymentParms with order id. Unfortunately I do not have the order ID in the URL. Some issues in the way they handle return url.
Can you suggest some other method that I can use to read parameters of the plugin without using the order id (or anything else for that matter)?
Thanks and regards,
Aravinda
Please Log in or Create an account to join the conversation.
10 years 11 months ago #217579
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Replied by Jerome on topic Need to get payment plugin parameters without orde
Hi,
I don't know how you give the order notification ; but they are two kind of solution.
- Give the "order_id" in the parameter.
- Use a short url (a php in the root of your joomla) where it will link to one plugin method id.
Regards,
I don't know how you give the order notification ; but they are two kind of solution.
- Give the "order_id" in the parameter.
- Use a short url (a php in the root of your joomla) where it will link to one plugin method id.
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
- aravindarao
-
Topic Author
- Offline
Less
More
- Posts: 5
- Thank you received: 0
10 years 11 months ago #217585
by aravindarao
Replied by aravindarao on topic Need to get payment plugin parameters without orde
Hello Jerome,
I'm able to get the order notification since I use the short URL (using notify task and name of my plugin as parameter). And it is also firing the onPaymentNotification method. Within that method, I need to read the plugin parameters. this_payment_params is not initialized when that method is called.
I'm also able to get the response from ccavenue in that method. However to process that response, I need to decrypt it with a key. This key is is stored as plugin parameter. Hence I need to read the plugin parameter.
Regards,
Aravinda
I'm able to get the order notification since I use the short URL (using notify task and name of my plugin as parameter). And it is also firing the onPaymentNotification method. Within that method, I need to read the plugin parameters. this_payment_params is not initialized when that method is called.
I'm also able to get the response from ccavenue in that method. However to process that response, I need to decrypt it with a key. This key is is stored as plugin parameter. Hence I need to read the plugin parameter.
Regards,
Aravinda
Please Log in or Create an account to join the conversation.
10 years 11 months ago #217603
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Replied by Jerome on topic Need to get payment plugin parameters without orde
Hi,
Like I wrote ; you can use the "short notify url" using a PHP file in the root ; but that method won't load the plugin parameters for you. You still need to read the method from the URL parameters and load his configuration.
The other solution is to not create a "multiple" plugin ; which means that you could just have one single configuration for the plugin in the database ; which make the reading of the configuration easier.
You can use the function "pluginParams($id)".
If you have one single instance ; you can just pass "0" for the $id ; otherwise you need to give the ID of the payment configuration instance.
Regards,
Like I wrote ; you can use the "short notify url" using a PHP file in the root ; but that method won't load the plugin parameters for you. You still need to read the method from the URL parameters and load his configuration.
The other solution is to not create a "multiple" plugin ; which means that you could just have one single configuration for the plugin in the database ; which make the reading of the configuration easier.
You can use the function "pluginParams($id)".
If you have one single instance ; you can just pass "0" for the $id ; otherwise you need to give the ID of the payment configuration instance.
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Please Log in or Create an account to join the conversation.
- aravindarao
-
Topic Author
- Offline
Less
More
- Posts: 5
- Thank you received: 0
10 years 11 months ago #217681
by aravindarao
Replied by aravindarao on topic Need to get payment plugin parameters without orde
Thanks Jerome. I had seen pluginParams but I was using it wrongly. I was expecting it to populate payment_params and later realized it populates plugin_params.
My plugin works perfectly.
Cheers,
Aravinda
My plugin works perfectly.
Cheers,
Aravinda
Please Log in or Create an account to join the conversation.
Time to create page: 0.163 seconds