Need to get payment plugin parameters without orde

  • Posts: 5
  • Thank you received: 0
9 years 1 month ago #217559

-- 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

Please Log in or Create an account to join the conversation.

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
9 years 1 month ago #217579

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,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 5
  • Thank you received: 0
9 years 1 month ago #217585

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

Please Log in or Create an account to join the conversation.

  • Posts: 26158
  • Thank you received: 4028
  • MODERATOR
9 years 1 month ago #217603

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,


Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.

Please Log in or Create an account to join the conversation.

  • Posts: 5
  • Thank you received: 0
9 years 1 month ago #217681

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

Please Log in or Create an account to join the conversation.

Time to create page: 0.080 seconds
Powered by Kunena Forum