Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHP Notice Error #23

Closed
tabkad12 opened this issue Mar 19, 2021 · 27 comments
Closed

PHP Notice Error #23

tabkad12 opened this issue Mar 19, 2021 · 27 comments

Comments

@tabkad12
Copy link

2021/03/20 01:34:05 [error] 28189#28189: *179 FastCGI sent in stderr: "PHP message: PHP Notice: Undefined index: is_hosted in /var/www/html/dev05.bigstorez.com/app/payments/razorpay/RazorpayPayment.php on line 36" while reading response header from upstream, client: 188.51.230.8, server: dev05.bigstorez.com, request: "GET /index.php?dispatch=checkout.process_payment HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "dev05.bigstorez.com", referrer: "https://dev05.bigstorez.com/checkout/"

We are receiving PHP notice under the web server error logs. Any help or guidance in this will be really appreciated.

CS-Cart Version: 4.12.2
Razorpay Version - 1.3-2.0

@ramth05
Copy link
Contributor

ramth05 commented Mar 23, 2021

@tabkad12,

Can you please confirm how you are using this plugin and if there are any steps to reproduce it.

To avoid this notice for now you can update the /var/www/html/dev05.bigstorez.com/app/payments/razorpay/RazorpayPayment.php on line 36 with this line
if((isset($fields['is_hosted']) === true) and ($fields['is_hosted']))

@tabkad12
Copy link
Author

tabkad12 commented Mar 23, 2021 via email

@tabkad12
Copy link
Author

After doing the mentioned change, we are not able to make the payment work from mobile devices but working fine with Desktop.

Please your kind guidance will be really appreciated.

WhatsApp Image 2021-03-24 at 6 35 46 PM

@ramth05
Copy link
Contributor

ramth05 commented Mar 25, 2021

mobile devices but working fine with Desktop.

@tabkad12 , I am not sure but don't see this could be the reason for the payments failing on mobile devices. I just tried and it's working fine.

@tabkad12
Copy link
Author

Hi ramth05;

It is really strange, something which was working earlier now it is not working. I reverted the two changes which I had done in the Razorpay plugin, but still the same issue.

The two changes are as follows;

echo $razorpayPayment->getButton(); } else {
The above changes was done in /var/www/dev05../app/payments/razorpay.php to remove the submit form step.

Second change was the one which we are discussing;

changes in var/www/dev05../payments/razorpay/RazorPay.php in line 36;
'if((isset($fields['is_hosted']) === true) and ($fields['is_hosted']))'

Please your kind support will be really appreciated as we have a launch date nearing by.

I am attaching my plugins files in this thread for your kind reference...
Razorpay-Deployed.zip

@ramth05
Copy link
Contributor

ramth05 commented Mar 25, 2021

Hi ramth05;

It is really strange, something which was working earlier now it is not working. I reverted the two changes which I had done in the Razorpay plugin, but still the same issue.

The two changes are as follows;

echo $razorpayPayment->getButton(); } else {
The above changes was done in /var/www/dev05../app/payments/razorpay.php to remove the submit form step.

Second change was the one which we are discussing;

changes in var/www/dev05../payments/razorpay/RazorPay.php in line 36;
'if((isset($fields['is_hosted']) === true) and ($fields['is_hosted']))'

Please your kind support will be really appreciated as we have a launch date nearing by.

I am attaching my plugins files in this thread for your kind reference...
Razorpay-Deployed.zip

@tabkad12 , Please confirm if currently it's giving error ? Because morning I had placed one order without any issue from mobile.

@tabkad12
Copy link
Author

tabkad12 commented Mar 25, 2021

There are certain incomplete transactions which comes when we face the same error message.

i have attached the screenshot for incomplete orders and screen recording from mobile facing that error.

Video Link:

https://www.dropbox.com/s/yq49glw2khtaoa8/IMG_7640.MP4?dl=0

D71C4F28-874D-4594-8752-AF4DF7139A61

@tabkad12
Copy link
Author

tabkad12 commented Apr 1, 2021

Hi Ramth05,

please any luck going through our files why it is not working. It is still the same. Just FYKI, it is not working only on Iphones. Android mobiles are working perfectly. IPads, iMacs, desktop everything is working fine.

please your kind support and co-operation will be highly appreciated.

thanks..

@tabkad12
Copy link
Author

tabkad12 commented Apr 4, 2021

We are getting the following error when we are doing transaction through iPhone, but we don't get this error when we try to do the same with other devices.

2021/04/04 13:33:05 [error] 28189#28189: *12764 FastCGI sent in stderr: "PHP message: PHP Notice: Undefined index: razorpay_order_id in /var/www/html/abcd.com/app/payments/razorpay/RazorpayPayment.php on line 122
PHP message: PHP Notice: Undefined index: merchant_order_id in /var/www/html/abcd.com/app/payments/razorpay/RazorpayPayment.php on line 124" while reading upstream, client: 159.0.226.158, server: dev05.bigstorez.com, request: "POST /index.php?dispatch=payment_notification.return&payment=razorpay HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "dev05.bigstorez.com", referrer: "https://api.razorpay.com/"
2021/04/04 13:35:17 [error] 28189#28189: *12791 FastCGI sent in stderr: "PHP message: PHP Notice: Undefined index: is_hosted in /var/www/html/dev05.bigstorez.com/app/payments/razorpay/RazorpayPayment.php on line 36" while reading response header from upstream, client: 159.0.226.158, server: www.abcd.com, request: "GET /index.php?dispatch=checkout.process_payment&clicked=true HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "dev05.bigstorez.com", referrer: "https://www.abcd.com/index.php?dispatch=checkout.process_payment"
2021/04/04 13:35:35 [error] 28189#28189: *12791 FastCGI sent in stderr: "PHP message: PHP Notice: Undefined index: razorpay_order_id in /var/www/html/abcd.com/app/payments/razorpay/RazorpayPayment.php on line 122
PHP message: PHP Notice: Undefined index: merchant_order_id in /var/www/html/abcd.com/app/payments/razorpay/RazorpayPayment.php on line 124" while reading upstream, client: 159.0.226.158, server: abcd.com, request: "POST /index.php?dispatch=payment_notification.return&payment=razorpay HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "dev05.bigstorez.com", referrer: "https://api.razorpay.com/"

==================================================================================

@ayush-razorpay
Copy link

ayush-razorpay commented Apr 13, 2021

@tabkad12, I tried replicating the issue with the ios emulator but I didn't encounter this after trying multiple times.

Is this issue specific to a device? did we check with other ios devices?

@tabkad12
Copy link
Author

tabkad12 commented Apr 13, 2021 via email

@tabkad12
Copy link
Author

Hi Ayush,

A kind and humble reminder.

@ayush-razorpay
Copy link

ayush-razorpay commented Apr 16, 2021

@tabkad12, we respect and appreciate your patience.

Was able to replicate the issue on iPhone 12.

Please rest assured, we are getting this checked on priority and will keep you updated.

@tabkad12
Copy link
Author

@ayush-razorpay : Looking forward to your swift response.

@ayush-razorpay
Copy link

@tabkad12, can you please confirm if we using 3rd party theme here?

@tabkad12
Copy link
Author

tabkad12 commented Apr 19, 2021 via email

@ayush-razorpay
Copy link

ayush-razorpay commented Apr 21, 2021

hi @tabkad12, upon further investigation of the issue we found that PHP sessions are not working with the above-stated devices with respect to Razorpay Checkout.
Our product team is working on it.
But, the challenge at our end is that we are not yet sure how big the needed fix would be.

We respect your patience and please rest assured we will get this resolved.

There is an anticipated delay here, due to the nature of this issue.
Will keep you posted. Thanks for bearing with us. :)

@tabkad12
Copy link
Author

Thanks Ayush for your response.

Hope that the fix comes soon, before our store launch date. Keeping fingers crossed.

I tried the same with the basic theme also, but still the same issue.
RPReplay_Final1619109562.mp4.zip

@ayush-razorpay
Copy link

@tabkad12 , This is fixed .

@tabkad12
Copy link
Author

Do i have to do any changes on our end to make it work?

C3F2D01C-54A5-4FF6-969D-6FBD4C8FA97A

@ayush-razorpay
Copy link

@tabkad12 , apologies here. We had identified an issue with the beta release. The same is rolled back for now.
We respect your patience here. Will update you ASAP

@ayush-razorpay
Copy link

@tabkad12 , we have just released a new version with the required fix.

https://github.com/razorpay/razorpay-cscart/releases/tag/1.3.2

Please update to the latest release .

@tabkad12
Copy link
Author

tabkad12 commented Jun 9, 2021

It worked with the mobile but unfortunately i am getting error from desktop. Please find the attached for your kind reference.
razorpay_desktop_error

@tabkad12
Copy link
Author

tabkad12 commented Jun 9, 2021

`<!--

Twig\Error\SyntaxError

Message
Unknown "localizednumber" filter in "__string_template__1d930bd5235b6154335bd651c2d0a932d5d1859e8f7e082bb5668af14058ac9c" at line 84.

Error at
app/lib/vendor/twig/twig/src/ExpressionParser.php, line: 788

Backtrace
File:app/lib/vendor/twig/twig/src/ExpressionParser.php
Line:568
Function:getFilterNodeClass

File:app/lib/vendor/twig/twig/src/ExpressionParser.php
Line:553
Function:parseFilterExpressionRaw

File:app/lib/vendor/twig/twig/src/ExpressionParser.php
Line:407
Function:parseFilterExpression

File:app/lib/vendor/twig/twig/src/ExpressionParser.php
Line:299
Function:parsePostfixExpression

File:app/lib/vendor/twig/twig/src/ExpressionParser.php
Line:183
Function:parsePrimaryExpression

File:app/lib/vendor/twig/twig/src/ExpressionParser.php
Line:78
Function:getPrimary

File:app/lib/vendor/twig/twig/src/Parser.php
Line:166
Function:parseExpression

File:app/lib/vendor/twig/twig/src/Parser.php
Line:122
Function:subparse

File:app/lib/vendor/twig/twig/src/Environment.php
Line:735
Function:parse

File:app/lib/vendor/twig/twig/src/Environment.php
Line:793
Function:parse

File:app/lib/vendor/twig/twig/src/Environment.php
Line:482
Function:compileSource

File:app/lib/vendor/twig/twig/src/Environment.php
Line:445
Function:loadClass

File:app/lib/vendor/twig/twig/src/Environment.php
Line:542
Function:loadTemplate

File:app/Tygh/Twig/TwigEnvironment.php
Line:38
Function:createTemplate

File:app/Tygh/Template/Renderer.php
Line:78
Function:renderString

File:app/Tygh/Template/Renderer.php
Line:65
Function:render

File:app/Tygh/Template/Document/Order/Type.php
Line:117
Function:renderTemplate

File:app/Tygh/Template/Document/Order/Type.php
Line:137
Function:render

File:app/functions/fn.cart.php
Line:8617
Function:renderById

File:app/functions/fn.common.php
Line:7657
Function:fn_print_order_invoices

File:app/functions/fn.control.php
Line:100
Function:fn_core_mailer_send_pre

File:app/Tygh/Mailer/Mailer.php
Line:240
Function:fn_set_hook

File:app/Tygh/Notifications/Transports/Mail/MailTransport.php
Line:74
Function:send

File:app/Tygh/Notifications/EventDispatcher.php
Line:113
Function:process

File:app/functions/fn.cart.php
Line:2677
Function:dispatch

File:app/functions/fn.cart.php
Line:1730
Function:fn_change_order_status

File:app/payments/razorpay/RazorpayPayment.php
Line:178
Function:fn_finish_payment

File:app/payments/razorpay.php
Line:39
Function:processRazorpayResponse

File:app/controllers/common/payment_notification.php
Line:40
Function:include

File:app/functions/fn.control.php
Line:685
Function:include

File:app/functions/fn.control.php
Line:434
Function:fn_run_controller

File:index.php
Line:25
Function:fn_dispatch

-->`

@ayush-razorpay
Copy link

CS-Cart.session.issue.on.web.mp4

@tabkad12 we tried this on local setup, and it's working at our end. Can you please check if some other plugin is causing this at your end?

@tabkad12
Copy link
Author

Hi Ayush,

Yes, there was an issue with a Twig Template which was giving that error. Not related with the plugins provided by you.

Now it is working fine with the new plugin files.

Thanks for your kind efforts.

@ayush-razorpay
Copy link

Thanks for the update @tabkad12

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants