drenther / upi_pay

Flutter plugin for UPI (Only in India)
MIT License
60 stars 71 forks source link

Can only use lower 16 bits for requestCode #65

Open gururaja-kambala opened 2 years ago

gururaja-kambala commented 2 years ago

Describe the bug

Getting below exception:

I/flutter ( 3300): appname I/flutter ( 3300): Google Pay I/flutter ( 3300): Starting transaction with id 3857213326 E/upi_pay ( 3300): java.lang.IllegalArgumentException: Can only use lower 16 bits for requestCode I/flutter ( 3300): UpiTransactionResponse { txnId: null, responseCode: null, approvalRefNo: null, status: UpiTransactionStatus.failure, txnRef: null, rawResponse: failed_to_open_app }

when UpiPay.initiateTransaction is called.

as per : https://stackoverflow.com/a/28783626/4758816 , below line should have a number less than 65535

https://github.com/drenther/upi_pay/blob/0cabe8cd6a22cf2d54ea6f95a98d72a4018f6964/android/src/main/kotlin/com/drenther/upi_pay/UpiPayPlugin.kt#L23

https://github.com/drenther/upi_pay/blob/0cabe8cd6a22cf2d54ea6f95a98d72a4018f6964/android/src/main/kotlin/com/drenther/upi_pay/UpiPayPlugin.kt#L83

Environmental Details

gururaja-kambala commented 2 years ago

I am able to cover my use case with above mentioned changes in https://github.com/gururaja-kambala/upi_pay.git. (forked from https://github.com/GJJ2019/upi_pay master)

Before submitting PR do I need to test any specific test case?

reeteshranjan commented 2 years ago

@gururaja-kambala what you have forked is the base of an un-merged PR. Had you done your work in a fork of upi_pay 1.0.1 it would be easy to review, merge and close a PR of your work.