Closed faisalmushtaq007 closed 2 years ago
Can you send a sample payload of what you're sending to the package?
I'm facing the same issue
@irfan-akhan do you see any logs in android studio?
This comes after the first payment is made successfully "Uncaught SyntaxError: Invalid or unexpected token". The first payment is done successfully but the issues starts when I try to make a second onwards. Issue started to come after I pass the order_id in the payload. @vivekshindhe
@vivekshindhe this is the payload i send
{key: rzp_test_myvOpPQKy6X26u, currency: INR, amount: 11500.0, order_id: order_JLHp7k9YxPH1VJ, name: Kiadah, description: Doctor Appointment, prefill: {contact: , email: }}
@vivekshindhe ????
@faisalmushtaq007 we haven't been able to reproduce this. What are you getting in the onPaymentError? Also, are you changing order_id after every payment?
@vivekshindhe thats the thing, event listeners are not being called.
@faisalmushtaq007 can you send the entire log dump here after you click on pay?
@vivekshindhe
I/flutter (32073): 2022-04-21 18:16:41.309413 âšī¸ đ Needs to reconnect : false
I/Timeline(32073): Timeline: Activity_launch_request time:286310617
W/ActivityThread(32073): handleWindowVisibility: no activity for token android.os.BinderProxy@f77ad23
D/com.razorpay.checkout(32073): No permission for reading SMS
D/com.razorpay.checkout(32073): CheckoutActivity onCreate called
D/ForceDarkHelper(32073): updateByCheckExcludeList: pkg: com.dropoutdev.kiadah activity: com.razorpay.CheckoutActivity@6cf6a76
D/EgretLoader(32073): EgretLoader(Context context)
D/EgretLoader(32073): The context is not activity
D/com.razorpay.checkout(32073): {"key":"NTZmNWIwNGZhODc1MmUyY2YxOTM5NmM0","events":[],"context":{"mode":"test","device":{"manufacturer":"Xiaomi","model":"POCO F1","name":"beryllium","type":"phone","version":"Android10","Xiaomi":"Xiaomi","POCO F1":"POCO F1","device_size":"1080w X 2027h","device_resolution":"1080x2027x440"},"sdk":{"version":"1.6.10","type":"checkout"},"network":{"bluetooth":false,"carrier":"Jio 4G","cellular":true,"cellular_network_type":"NA","wifi":false,"carrier_network":"Jio 4G","network_type":-1,"is_roming":false},"screen":{"density":2.75,"width":1080,"height":2027},"locale":"en-IN","timezone":"Asia\/Kolkata","user_agent":"Dalvik\/2.1.0 (Linux; U; Android 10; POCO F1 MIUI\/V12.0.3.0.QEJMIXM)","webview_user_agent":"Mozilla\/5.0 (Linux; Android 10; POCO F1 Build\/QKQ1.190828.002; wv) AppleWebKit\/537.36 (KHTML, like Gecko) Version\/4.0 Chrome\/100.0.4896.88 Mobile Safari\/537.36"}}
D/com.razorpay.checkout(32073): Modified Url: https://api.razorpay.com/v1/checkout/public?version=1.6.10&library=checkoutjs&platform=android
[log] {"name":"Faisal Mushtaq","age":26,"patient_id":"6257c084393f3763dbba7f99","doctor_id":"625951eeeb971df16fc6c5b8","share_documents":true,"start_time":"11:00","start_date":"2022-04-21","payment_status":{"state":"Pending","date":"2022-04-21"},"payment_platform":"Razorpay"}
W/System.err(32073): java.lang.NullPointerException: Attempt to invoke virtual method 'int java.lang.String.length()' on a null object reference
W/System.err(32073): at org.json.JSONTokener.nextCleanInternal(JSONTokener.java:121)
W/System.err(32073): at org.json.JSONTokener.nextValue(JSONTokener.java:98)
W/System.err(32073): at org.json.JSONObject.
Looking into the logs. Will update asap
@faisalmushtaq007 are you sending contact and email as empty in the payload? That is also what's shown in the logs. Just confirming
@vivekshindhe yes sending them empty, so that the user could enter in razorpay
@faisalmushtaq007 in that case you don't have to send anything in the prefill. That entire object won't be necessary. Could you please try with not sending the prefill object?
@vivekshindhe i've already tried that as well, but still nothing
@faisalmushtaq007 can you send me a debug app to check? I haven't been able to reproduce this at all. My email is vivek.shindhe@razorpay.com
@vivekshindhe please check your email
@vivekshindhe login credentials there as well
@vivekshindhe have you found the issue??
@faisalmushtaq007 i was able to make like 8 appointments right now. All successful too. Could you check in your dashboard?
Also, is it possible that you are removing the listeners after the first successful payment and hence not getting callbacks for the subsequent payments?
@vivekshindhe was it taking you to the success screen everytime or appointment screen???
@faisalmushtaq007 i was able to see the issue. If I reopen the application on the first attempt it showed the successful screen and then went to homepage. But subsequently it just came back to appointment page. That's fine. Are you doing
_razorpay.clear() after you get the first callback?
@vivekshindhe yes i do call _razorpay.clear
Can you remove that? That's the call that removes the listener right? Maybe add it in another life cycle event? And check once
@vivekshindhe alright let me check
@vivekshindhe That did the trick, thanks alot brother!
Not getting any success call back fron sdk.
Activity com.razorpay.CheckoutActivity has leaked IntentReceiver com.razorpay.b_J@74ef533 that was originally registered here. Are you missing a call to unregisterReceiver()? E/ActivityThread( 7987): android.app.IntentReceiverLeaked: Activity com.razorpay.CheckoutActivity has leaked IntentReceiver com.razorpay.b_J@74ef533 that was originally registered here. Are you missing a call to unregisterReceiver()?
on the first try payment works fine, but then it doesnt give success or failure. It just closes after submiting payment
I got this from a url that was in debug console { "error": { "code": "BAD_REQUEST_ERROR", "description": "Input fields not set properly", "source": "business", "step": "payment_initiation", "reason": "input_validation_failed", "metadata": {} } } But why wasnt this shown on the first try? What should i do??