gauravmehta13 / razorpay_web

MIT License
7 stars 9 forks source link

[docs]: need improvement and clarity on how and where to use it. #2

Closed maranix closed 2 years ago

maranix commented 2 years ago

I wasn't able to figure it out how to use it at first. It doesn't work inside other widgets such as Column and etc. I've also tried to push it as route using Navigator and that did not work either.

The only way i could make it work was to implement exactly as it is mentioned in the instructions by passing it into directly the home property of MaterialApp. This approach and method isn't good and viable. Being able to use it as a widget or overlay over the current screen would be great.

I will try to tinker around and see what can be done to improve things, meanwhile these are my initial thoughts as an intial tester.

Cheerios on a great library and taking the initiative to make web integration more easy.

maranix commented 2 years ago

I explored a bit more today and got it working as intended. I'll create a PR regarding docs improvement in a few days.

GauravCalidig commented 2 years ago

Hi, Thanks @ramanverma2k for the feedback, I was in a hurry so wasn't able to add the docs properly, however it should've worked by pushing it as a route using Navigator.

GauravCalidig commented 2 years ago

image

maranix commented 2 years ago

Yeah i got it to work using Navigator. The problem was that i was using it on the same widget where i was initializing the official razorpay SDK. Once i seperated both mobile and web pages and conditionally showed those pages based on the platform, It worked as intended.

maranix commented 2 years ago

image

So internally it uses the official SDK by default when it is not on the Web Platform?

GauravCalidig commented 2 years ago

No, the above lines are from a personal project for which i used this approach, currently the package shows "Platform not supported"

maranix commented 2 years ago

No, This is a personal project for which i used this approach, currently the package shows "Platform not supported"

That makes sense. Anyways i found two issues and wanted to make you aware of it. I will probably make some PRs after this Sunday regarding those issues.

Currently the issues that i've found are:

Example: In order to make a transaction of 10,000rs, I needed to add 00 extra zeros. The data type of amount was double so i tried to do the transaction of 10000.00 and still it returned as 100rs. I don't know what is up with that.

TLDR; 10,000rs came out as 100rs and 10,000,00 were properly showed as 10,000rs.

Closing this issue for now.

GauravCalidig commented 2 years ago

I am not getting enough time as of now, would love a PR otherwise will fix these probably on sunday.