qiwi-api / bill-payments-dotnet-sdk Goto Github PK
View Code? Open in Web Editor NEW.Net SDK для единого платежного протокола эквайринга и QIWI Кошелька.
License: MIT License
.Net SDK для единого платежного протокола эквайринга и QIWI Кошелька.
License: MIT License
Невозможно добавить кастомные параметры через метод создания формы
public Uri CreatePaymentForm(PaymentInfo paymentInfo, CustomFields customFields = null);
из за того, что при попытке их получения через метод ToDictionary() ничего не возвращается, необходимо добавить флаг BindingFlags.Instance
в строку .GetProperties(BindingFlags.Public)
что бы получилось .GetProperties(BindingFlags.Public| BindingFlags.Instance)
Как проверить. Просто вызовите метод public Uri CreatePaymentForm(PaymentInfo paymentInfo, CustomFields customFields = null);
с не нулевым параметром customFields, в возвращаемом Uri ожидаемых параметров не будет.
Подскажите, в чем может быть проблема?
One or more errors occurred. (Exception of type 'Qiwi.BillPayments.Exception.BillPaymentsServiceException' was thrown.)
когда проходит оплата вылетает ошибка я не знаю почему.
Подскажите, в чем может быть проблема?
руками дёргаю запрос через postman, он все возвращает.
https://api.qiwi.com/partner/bill/v1/bills/225983dd-d225-4100-b57c-bc8dc56201ab
2019-04-28`` 23:27:38.3068||ERROR|Business.Services.Qiwi.QiwiService|Exception of type 'Qiwi.BillPayments.Exception.BillPaymentsServiceException' was thrown. Qiwi.BillPayments.Exception.BillPaymentsServiceException: Exception of type 'Qiwi.BillPayments.Exception.BillPaymentsServiceException' was thrown.
at Qiwi.BillPayments.Client.RequestMappingIntercessor.DeserializeResponseBody[T](ResponseData response)
at Qiwi.BillPayments.Client.RequestMappingIntercessor.RequestAsync[T](String method, String url, Dictionary`2 headers, Object entityOpt)
at Qiwi.BillPayments.Client.BillPaymentsClient.GetBillInfoAsync[T](String billId)
at Qiwi.BillPayments.Client.BillPaymentsClient.GetBillInfoAsync(String billId)
at Common.QiwiClient.GetPaymentInfo(String billId) in C:\GFFG\Services\Common\QiwiClient.cs:line 66
at Business.Services.Qiwi.QiwiService.GetPaymentWaitingByUserId(Int32 userId) in C:\GFFG\Services\Business\Services\Qiwi\QiwiService.cs:line 92
Можно ли сделать более информативные ошибки? из экспешена нифига не понятно, что произошло.
Коллеги, добрый день.
Подскажите, к нам перестали приходить callback-и с инфой об оплате.
Так же перестал работать метод getbillInfo в .net sdk - он падает в попытке спарсить body ответа.
Подскажите, как сейчас можно получить инфу о счёте?
Через постман тестирую запрос https://api.qiwi.com/partner/bill/v1/bills/{billId} - всё работает. Заливаю на свой сервер и при том-же токене авторизации мне возвращает 401.
Добрый день.
Если я правильно понял, все запросы к API QIWI-Кассы в данный момент выполняются синхронно. Планируется ли добавление в SDK асинхронных версий этих методов, например, CreateBillAsync?
Replace https://github.com/QIWI-API/bill-payments-dotcore-sdk
on https://github.com/QIWI-API/bill-payments-dotnet-sdk
Здравствуйте. Приложение зависает без ошибки на client.CreateBill
или client.CreateBillAsync
. То есть строка Console.WriteLine("3");
недостижима. Скажите, пожалуйста, что делать?
Console.WriteLine("1");
var client = BillPaymentsClientFactory.Create(
secretKey: "eyJ2ZXJzaW9***uIjoiUDJQ9"
);
Console.WriteLine("2");
BillResponse billResponse =
client.CreateBill(
info: new CreateBillInfo
{
BillId = billId,
Amount = new MoneyAmount
{
ValueDecimal = Convert.ToDecimal(amount),
CurrencyEnum = CurrencyEnum.Rub
},
Comment = "Перевод личных средств",
ExpirationDateTime = DateTime.Now.AddDays(45),
Customer = new Customer
{
Email = "[email protected]",
Account = billId,
Phone = "380674351024"
}
}
);
Console.WriteLine("3");
fail: Microsoft.AspNetCore.Server.Kestrel[13] Connection id "0HMT3BJ79IH6T", Request id "0HMT3BJ79IH6T:00000001": An unhandled exception was thrown by the application. System.NullReferenceException: Object reference not set to an instance of an object. at Qiwi.BillPayments.Client.BillPaymentsClient.CreateBillAsync[T](CreateBillInfo info, CustomFields customFields) at Qiwi.BillPayments.Client.BillPaymentsClient.CreateBillAsync(CreateBillInfo info, CustomFields customFields) at PaxelSite.Controllers.DashboardController.Qiwi(QiwiData data) at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.TaskOfIActionResultExecutor.Execute(ActionContext actionContext, IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments) at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Awaited|12_0(ControllerActionInvoker invoker, ValueTask
1 actionResultValueTask)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeInnerFilterAsync()
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|25_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, Object state, Boolean isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(State&
next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.InvokeFilterPipelineAsync()
--- End of stack trace from previous location ---
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
at Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.g__Awaited|17_0(ResourceInvoker invoker, Task task, IDisposable scope)
at Microsoft.AspNetCore.Routing.EndpointMiddleware.g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger)
at Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Authentication.AuthenticationMiddleware.Invoke(HttpContext context)
at Microsoft.AspNetCore.Server.Kestrel.Core.Internal.Http.HttpProtocol.ProcessRequests[TContext](IHttpApplication1 application)
Вот такая ошибка происходит на Ubuntu. На Windows всё работает.
Что делать?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.