razorpay / razorpay-go

Razorpay Go SDK
MIT License
37 stars 24 forks source link

Handle error responses #23

Closed ashwinimanoj closed 2 years ago

ashwinimanoj commented 3 years ago

When response is anything other than StatusOK, the razorpay sdk panicked. The Decode of error message did not pass in a pointer, that has been corrected. Tests have been added to validate the error response.

Should fix issue #22

trufflesec-julian commented 3 years ago

Bump on this. Found the same issue and was going to make a similar PR :)

ashwinimanoj commented 2 years ago

Closing this PR as this #58 has fixed the issue.