@adebisi-fa, thanks for the fix, v0.7.5 did fixed the error, sorry to bother you again.
But I keep getting this error. When I tried using the transfer interface too.
An unhandled exception occurred while processing the request.
NullReferenceException: Object reference not set to an instance of an object.
PayStack.Net.PayStackApi.ParseAndResolveMetadata
(ref string rawJson)
First when I tried creating a recipient like this
var recipentRequest = new CreateTransferRecipientRequest { Name = disbursement.Name, AccountNumber = disbursement.Account, BankCode = "057", Currency = "NGN", Description = $"Fund Transter For {request.Reference}", Type = "nuban" }; var recipientResult = payApi.Transfers.Recipients.Create(recipentRequest);
I tried the exactly code you sent, with real values in place of disbursement.Name, disbursement.Account, and request.Reference variables and everything worked as expected.
Can you please send the values for your variables, so I could try to reproduce the exception?
Thanks for the reply. Sorry, I wasn't online earlier. I noticed that too. I was apparently using the test bank account provided on the Paystack documentation and I got the error that incorrect account number. so I used that with a correct details and all seem to work even with v0.7.5. I will try out v0.7.6 and reply this thread.
Thank you most for trusting Paystack.Net Library much enough to do your Paystack plumbings, and for not giving up when it was getting your fingers burnt!
The code might not be perfect yet, but it will surely get better with time, and with issue report from folks like you. Please don't hesitate to drop by again if your keyboard suddenly gets hotter than you expected (even with the gloves on)!
Happy coding.
Regards.
[PS: Please don't forget to drop a note on if upgrading to 0.7.6 fixes this issue.]
Thanks for the response and for making our work easier with the library, I hope your weekend was great. The v0.7.6 did fixed the previous problems. But I have another issue with the BvnResolve endpoint.
When called like this:
var bvnDetailsResult = payApi.Miscellaneous.ResolveBVN(request.Bvn);
with request.Bvn being a string
Please see error below.
An unhandled exception has occurred while executing the request.
Newtonsoft.Json.JsonReaderException: Error reading JObject from JsonReader. Path '', line 0, position 0.
at Newtonsoft.Json.Linq.JObject.Load(JsonReader reader, JsonLoadSettings settings)
at Newtonsoft.Json.Linq.JObject.Parse(String json, JsonLoadSettings settings)
at PayStack.Net.PayStackApi.ParseAndResolveMetadata[TR](String& rawJson)
at PayStack.Net.PayStackApi.Get[TR](String relativeUrl)
@adebisi-fa, thanks for the fix, v0.7.5 did fixed the error, sorry to bother you again.
But I keep getting this error. When I tried using the transfer interface too.