Компилятор выдаёт ошибку 1 при выставление счета киви, вроде всё хорошо статус 200-OK , но что не так с компилятором?
ОШИБКА
Exception in thread "main" com.qiwi.billpayments.sdk.exception.BadResponseException: ResponseData{body='{"siteId":"5eqiig-00","billId":"8a4f2539-df89-40ea-9af6-f2399649d47c","amount":{"currency":"RUB","value":"199.90"},"status":{"value":"WAITING","changedDateTime":"2022-12-13T16:43:05.795+03:00"},"customer":{"email":"example@mail.org","account":"758f1a19-ab14-433d-b321-3414f270f07e","phone":"79123456789"},"customFields":{"apiClient":"java_sdk","apiClientVersion":"1.5.0"},"comment":"comment","creationDateTime":"2022-12-13T16:43:05.795+03:00","expirationDateTime":"2023-01-27T16:43:04.734+03:00","payUrl":"https://oplata.qiwi.com/form/?invoice_uid=6dbd3141-d7bb-491c-960a-2e3553e5c902","recipientPhoneNumber":"998909208688"}', httpStatus=200}
at com.qiwi.billpayments.sdk.client.RequestMappingIntercessor.mapToError(RequestMappingIntercessor.java:63)
at com.qiwi.billpayments.sdk.client.RequestMappingIntercessor.deserializeResponseBody(RequestMappingIntercessor.java:54)
at com.qiwi.billpayments.sdk.client.RequestMappingIntercessor.request(RequestMappingIntercessor.java:34)
at com.qiwi.billpayments.sdk.client.BillPaymentClient.createBill(BillPaymentClient.java:47)
at com.company.controller.paymentcontroll.main(paymentcontroll.java:51)
Process finished with exit code 1
КОД
String secretKey = "";
BillPaymentClient client = BillPaymentClientFactory.createDefault(secretKey);
String publicKey = "";
MoneyAmount amount = new MoneyAmount(
BigDecimal.valueOf(499.90),
Currency.getInstance("RUB")
);
String billId = UUID.randomUUID().toString();
String successUrl = "https://merchant.com/payment/success?billId=" + billId;
System.out.println(billId);
String paymentUrl = client.createPaymentForm(new PaymentInfo(publicKey, amount, billId, successUrl));
System.out.println(paymentUrl);
CreateBillInfo billInfo = new CreateBillInfo(
UUID.randomUUID().toString(),
new MoneyAmount(
BigDecimal.valueOf(199.90),
Currency.getInstance("RUB")
),
"comment",
ZonedDateTime.now().plusDays(45),
new Customer(
"example@mail.org",
UUID.randomUUID().toString(),
"79123456789"
),
"http://merchant.ru/success"
);
BillResponse response = null;
try {
response = client.createBill(billInfo);
} catch (URISyntaxException e) {
throw new RuntimeException(e);
}
response.getPayUrl();
Что делать в такой ситуации?