razorpay / razorpay-cscart

Razorpay Payment Extension for CS Cart
11 stars 1 forks source link

PHP Notice Error #23

Closed tabkad12 closed 3 years ago

tabkad12 commented 3 years ago

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 commented 3 years ago

@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 commented 3 years ago

Thanks a ton, It worked as a charm.

On Tue, 23 Mar 2021 at 07:19, Ram Prakash Singh @.***> wrote:

@tabkad12 https://github.com/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']))

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/razorpay/razorpay-cscart/issues/23#issuecomment-804604996, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGUEFQYSFLFSW3OXZSQRDKDTFAJD7ANCNFSM4ZPNRRHQ .

tabkad12 commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

@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 commented 3 years ago

Hi Ayush,

I have shared the video directly from an IOS iPhone. Also I mentioned that it works perfectly fine with iPads or iMacs, Desktop and Android. The issue is on iPhones, We have tests on iPhone X, iPhone XS, iPhone 12 and iPhone

  1. Please share with me the working video from either of these iPhone models.

On Tue, 13 Apr 2021 at 07:12, Ayush Vipul @.***> wrote:

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

[image: Simulator Screen Shot - iPod touch (7th generation) - 2021-04-13 at 09 37 17] https://user-images.githubusercontent.com/78246948/114495848-72a02200-9c3c-11eb-85ce-975da4c8482f.png [image: Simulator Screen Shot - iPod touch (7th generation) - 2021-04-13 at 09 37 17] https://user-images.githubusercontent.com/78246948/114495854-7469e580-9c3c-11eb-933d-a51b37c92cca.png

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

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/razorpay/razorpay-cscart/issues/23#issuecomment-818421164, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGUEFQ2VAVHYIPX6WUJNOGLTIPADLANCNFSM4ZPNRRHQ .

tabkad12 commented 3 years ago

Hi Ayush,

A kind and humble reminder.

ayush-razorpay commented 3 years ago

@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 commented 3 years ago

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

ayush-razorpay commented 3 years ago

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

tabkad12 commented 3 years ago

We are using Unitheme.

On Mon, 19 Apr 2021 at 19:01, Ayush Vipul @.***> wrote:

@tabkad12 https://github.com/tabkad12, can you please confirm if we using 3rd party theme here?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/razorpay/razorpay-cscart/issues/23#issuecomment-822584366, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGUEFQ44SFA6OQRLTELWQTLTJRHT3ANCNFSM4ZPNRRHQ .

ayush-razorpay commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

@tabkad12 , This is fixed .

tabkad12 commented 3 years ago

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

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

ayush-razorpay commented 3 years ago

@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 commented 3 years ago

@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 commented 3 years ago

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 commented 3 years ago

`<!--

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 commented 3 years ago

https://user-images.githubusercontent.com/78246948/121307630-cddd5080-c91d-11eb-9b60-86babd8c7aba.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 commented 3 years ago

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 commented 3 years ago

Thanks for the update @tabkad12