-- url of the page with the problem -- :
www.vividhifi.com
-- HikaShop version -- : 4.7.2 Business Edition
-- Joomla version -- : 4.3.3
-- PHP version -- : 8.1.21
-- url of the page with the problem -- :
www.vividhifi.com
-- HikaShop version -- : 4.7.2 Business Edition
-- Joomla version -- : 4.3.3
-- PHP version -- : 8.1.21
Hi I am making a payment plugin for CC Avenue. I am modifying the example plugin. I am able to make the payment at the gateway but am unable to receive the response from the gateway into the onPaymentNotification(&$statuses) function
The company has provided a PHP integration kit that has 3 files
1. Request handler (sends the encrypted payment request to the gateway)
2. Response handler (receives decrypted response from gateway)
3. Crypto file for encryption/decryption
I have been able to modify the example.php file to send the proper request to the gateway, but cannot read the gateway response into the onPaymentNotification(&$statuses) function
I have tried the following 2 return URLs
$return_url = urlencode(HIKASHOP_LIVE.'index.php?option=com_hikashop&ctrl=checkout&task=after_end&order_id='.$order_id.$this->url_itemid);
$return_url = urlencode(HIKASHOP_LIVE.'index.php?option=com_hikashop&ctrl=checkout&task=notify¬if_payment=hdfc_ccavenue&tmpl=component&lang=EN&order_id='.$order_id.$this->url_itemid);
Both result in a blank page
The encrypted response I get from the gateway is something like this
encResp: a66f9ed977ec2b4a46ef412a180b0f5583afbe7a4db482f37369a2fb68e0ae78b119411a3b11e76535722f8182875213f0145f2ffd6fec56eccec876ea19f0c39bae9f189da5e725fe86f72d4b621ca9e07d30f104bea489b06aa65c501161ac6a188d2aaa24946374bb36f1b780ad60e33188132df818b0054eded3809700f83a7f687b7a402410ff610bab10f8b52286584c46cb8d6ab912abdd2f9ecbc59ca5799a6854489eabd810cc0089a02ab2e6a5188665ca7e421f91c0af04a810a7153880869578b783b4b10a9ccab376e53348f6383e764e05f6b53c6ca77ad4fe778077b06cf82b9e000a00720279d1bdcd48e71a453ba1a160e7e976d41ded68b265adadda42deaed1e212051c72ffd79337b0d5aff02e06c014b7b102e9f27c9447e06be65dbf8b061d3ea651e8648aea5b26a7064f69781c9d3033866baa2515be47329f78bacbe6af740220c0ec8364dafdad210b145b8904895d2c827398ab368c19ea44b5a95f154f752e1875f067d87961aff858b4b8e84bd414912f4f5b6e986568bd245c54a5618c43c5f7e927267d18f16b405560add7328880ad1c234b0f384c1b960f9687761573592475590acb10a33d4aa08b84e9c389eb6fab0828ef4a7f63a870aa3e43e267e3a58da57b749d41df8d82e6c49779ba5e9ff0acbff436fc72dd8dd1b5cc77acd374506ddb06b83236efe374aea3676516f902316d79e769dd45c01181c28b5f92482b82e265032d8929e59a38b5c577e753b3229bfd2d608ac0ecdbe8910f1e6c495a4d7e4cb79f0a7ff73321d3d46812826a9cfdb1ed2d6ce93afcbdcadc8d0d0238415728b86e4702b72ea0d3bbd7d24a7577b9d578487e040cc6e218e4e7ec0730819a6b9ed72cd1f5697507286d7fd38a035273e2e25207f0ff1a32dd2be67697b09afb7c06adb15c0045831daf516b1b774d50f5c7fba3432f4317917b57138b92c082650aba95e63dd75ccc0a9bba9071389fae6a52897f732576130a52e13d121ce3b9cf1955cc8147d31d593de6613eb6dafa270cb42e8d454dd6c3e076d16ae563cb03606007a7af20be1dd4e7ba44cf4b99423174a4c2f33f9632d92045ff429b1004985009fa2671bc7b9b162b54657b75c76b0c896f4cc11992312373150e8343f58dc5ff77bc80ee850038e1bfe275fec4a33041d04bf8ada8aaff1778503b3c378b0c7ff36a0ae5348a62c20259a96ce707b377ccd7f1796e2867eaa486b7709ce1b960b01cb10d8baceeaa8096a58c2e3a820496abb08a8eab359ee113d2ad0cd2058374e8d0e37269525e1a77bb28af42b1576
And the response after decryption is something like this
order_id=123654789&tracking_id=311008298114&bank_ref_no=1652448720867&order_status=Success&failure_message=&payment_mode=Net Banking&card_name=AvenuesTest&status_code=null&status_message=Y¤cy=INR&amount=1.00&billing_name=Charli&billing_address=Room no 1101, near Railway station Ambad&billing_city=Indore&billing_state=MP&billing_zip=425001&billing_country=India&billing_tel=9876543210&billing_email=test@test.com&delivery_name=Chaplin&delivery_address=room no.701 near bus stand&delivery_city=Hyderabad&delivery_state=Andhra&delivery_zip=425001&delivery_country=India&delivery_tel=9876543210&merchant_param1=additional Info&merchant_param2=additional Info&merchant_param3=additional Info&merchant_param4=additional Info&merchant_param5=additional Info&vault=N&offer_type=null&offer_code=null&discount_value=0.0&mer_amount=1.00&eci_value=null&retry=N&response_code=0&billing_notes=&trans_date=13/05/2022 19:04:51&bin_country=
My question is how to receive and read the gateway response into the plugin, so that the order status can be confirmed and email sent
If I receive the response into the response_handler.php file provided by the company, I am able to receive and decrypt the response but the result is displayed on a blank white page like this
But I cannot get the page to be displayed within the Joomla template, and I cannot perform any hikashop functions to change order status/ send email from within this standalone PHP file
I would be happy with both the results -
1. Process the response in the modified example plugin
or
2. Process the response with the company provided response handler file, as long as I can display it within the Joomla template and perform Hikashop order confirmation process
I am also attaching a screenshot of the processing code in the company provided response handler file