osk115 / qiwi4j Goto Github PK
View Code? Open in Web Editor NEWUnofficial Qiwi payments API Java SDK
License: MIT License
Unofficial Qiwi payments API Java SDK
License: MIT License
Выводит в консоль
{
"billId":"c70e944a-dabd-443e-9719-9360d0208691",
"amount":{
"value":1.00,
"currency":"RUB"
},
"expirationDateTime":"2023-01-25T02:07:13.982958700+03:00[Europe/Moscow]"
}
Воспроизвести:
Qiwi4JClient client = Qiwi4JClient.create(Config.getSecretKey(), Config.getPublicKey());
// Создаем сумму платежа
BillAmount billAmount = BillAmount.builder()
.currency(BillAmount.Currency.RUB) // Указываем валюту
.value(BigDecimal.valueOf(1)) // Указываем сумму
.build();
// Создаем объект платежа
Bill bill = Bill.builder()
.billId(UUID.randomUUID().toString()) // Указываем идентификатор платежа
.amount(billAmount) // Указываем сумму платежа
.expirationDateTime(ZonedDateTime.now().plusDays(5)) // Указываем время истечения оплаты счета
.build();
// Создаем платеж
BillInfo billInfo = client.createBill(bill);
// Выводим ссылку на оплату
System.out.println(billInfo.getPayUrl()); //NULL
QIWI такой QIWI...
Qiwi4J/src/main/java/ru/osk/qiwi4j/Qiwi4JClient.java
Lines 50 to 68 in e58e314
2023-06-20T12:50:04.078Z ERROR 1 --- [ scheduling-1] o.s.s.s.TaskUtils$LoggingErrorHandler : Unexpected error occurred in scheduled task
java.lang.NoSuchFieldError: READ_UNKNOWN_ENUM_VALUES_USING_DEFAULT_VALUE
at com.fasterxml.jackson.databind.deser.std.EnumDeserializer.createContextual(EnumDeserializer.java:211) ~[jackson-databind-2.15.0.jar!/:2.15.0]
at com.fasterxml.jackson.databind.DeserializationContext.handlePrimaryContextualization(DeserializationContext.java:836) ~[jackson-databind-2.15.0.jar!/:2.15.0]
at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.resolve(BeanDeserializerBase.java:550) ~[jackson-databind-2.15.0.jar!/:2.15.0]
at com.fasterxml.jackson.databind.deser.DeserializerCache._createAndCache2(DeserializerCache.java:294) ~[jackson-databind-2.15.0.jar!/:2.15.0]
at com.fasterxml.jackson.databind.deser.DeserializerCache._createAndCacheValueDeserializer(DeserializerCache.java:244) ~[jackson-databind-2.15.0.jar!/:2.15.0]
at com.fasterxml.jackson.databind.deser.DeserializerCache.findValueDeserializer(DeserializerCache.java:142) ~[jackson-databind-2.15.0.jar!/:2.15.0]
at com.fasterxml.jackson.databind.DeserializationContext.findNonContextualValueDeserializer(DeserializationContext.java:644) ~[jackson-databind-2.15.0.jar!/:2.15.0]
at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.resolve(BeanDeserializerBase.java:539) ~[jackson-databind-2.15.0.jar!/:2.15.0]
at com.fasterxml.jackson.databind.deser.DeserializerCache._createAndCache2(DeserializerCache.java:294) ~[jackson-databind-2.15.0.jar!/:2.15.0]
at com.fasterxml.jackson.databind.deser.DeserializerCache._createAndCacheValueDeserializer(DeserializerCache.java:244) ~[jackson-databind-2.15.0.jar!/:2.15.0]
at com.fasterxml.jackson.databind.deser.DeserializerCache.findValueDeserializer(DeserializerCache.java:142) ~[jackson-databind-2.15.0.jar!/:2.15.0]
at com.fasterxml.jackson.databind.DeserializationContext.findRootValueDeserializer(DeserializationContext.java:654) ~[jackson-databind-2.15.0.jar!/:2.15.0]
at com.fasterxml.jackson.databind.ObjectMapper._findRootDeserializer(ObjectMapper.java:4956) ~[jackson-databind-2.15.0.jar!/:2.15.0]
at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:4826) ~[jackson-databind-2.15.0.jar!/:2.15.0]
at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3772) ~[jackson-databind-2.15.0.jar!/:2.15.0]
at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3740) ~[jackson-databind-2.15.0.jar!/:2.15.0]
at ru.osk.qiwi4j.Qiwi4JClient.getBillInfo(Qiwi4JClient.java:63) ~[Qiwi4J-1.0.4.jar!/:na]
at main.service.BillingService.lambda$billing$0(BillingService.java:46) ~[classes!/:0.0.1-SNAPSHOT]
at java.base/java.util.ArrayList.forEach(ArrayList.java:1511) ~[na:na]
at main.service.BillingService.billing(BillingService.java:39) ~[classes!/:0.0.1-SNAPSHOT]
at main.config.BotStart.getStatus(BotStart.java:96) ~[classes!/:0.0.1-SNAPSHOT]
at jdk.internal.reflect.GeneratedMethodAccessor35.invoke(Unknown Source) ~[na:na]
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[na:na]
at org.springframework.scheduling.support.ScheduledMethodRunnable.run(ScheduledMethodRunnable.java:84) ~[spring-context-6.0.9.jar!/:6.0.9]
at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54) ~[spring-context-6.0.9.jar!/:6.0.9]
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) ~[na:na]
at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305) ~[na:na]
at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) ~[na:na]
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[na:na]
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[na:na]
at java.base/java.lang.Thread.run(Thread.java:833) ~[na:na]
Bill bill = Bill.builder()
.amount(new BillAmount(BigDecimal.valueOf(value), BillAmount.Currency.RUB))
.comment(comment)
.successfulurl(url); // Нужно типа такого
.expirationDateTime(ZonedDateTime.now().plusMinutes(30))
.build();
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.